/* Vertical Digital Signage Styling */
:root {
    --bg-dark: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --accent-1: #e2e8f0;
    --accent-2: #f1f5f9;
    --accent-3: #e0e7ff;
    --accent-4: #3b82f6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: auto;
    /* Allow scrolling for computer screens */
    position: relative;
    /* Optimize for 9:16 aspect ratio displays */
}

/* Dynamic Background Shapes */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(80px);
    opacity: 0.6;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-1), var(--accent-2));
    top: -10%;
    left: -20%;
    animation-delay: 0s;
}

.shape-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-3), var(--accent-4));
    bottom: -10%;
    right: -20%;
    animation-delay: -5s;
}

.shape-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2), var(--accent-3));
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 100px) scale(1.1);
    }
}

/* Signage Layout Structure */
.signage-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    /* Aspect ratio specific padding to look like a frame padding */
    padding: 2rem;
    gap: 2rem;
}

/* Reusable Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand i {
    font-size: 3rem;
    color: var(--accent-1);
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.brand span:not(.powered-by) {
    color: var(--accent-1);
    font-weight: 300;
}

.powered-by {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.time-widget {
    text-align: right;
}

.time {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
}

.date {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

.weather-widget {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-4);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    margin-bottom: 0.4rem;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.weather-widget i {
    font-size: 1.4rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 0;
    overflow-y: auto;
}

.main-content>section {
    min-height: 0;
}

/* Featured Media Card */
.featured-card {
    flex: 0 0 45%;
    /* Increased from 28% to give more prominence to the slideshow */
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.media-quote {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    max-width: min(42%, 360px);
    padding: 0.9rem 1rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.media-quote i {
    display: block;
    font-size: 0.95rem;
    color: var(--accent-4);
    margin-bottom: 0.45rem;
}

.media-quote p {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text-main);
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--accent-4);
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.media-overlay h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.media-overlay h2.new-arrival-title {
    font-size: 1.5rem;
}

/* Info Grid */
.info-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem;
    flex: 0 0 auto;
    width: 100%;
    align-items: stretch;
}

.info-card {
    flex: 1 !important;
    min-width: 0;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
    overflow: hidden;
}

/* Prevent text overflow */
.info-card p,
.patron-info {
    min-width: 0;
    overflow: hidden;
}

.info-card p {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.1;
    word-break: break-word;
}

.info-card .icon-box {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Smaller heading */
.info-card h3 {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

/* Patron info alignment */
.patron-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.patron-info .temp {
    font-size: 1.2rem;
}

.patron-info .cond {
    font-size: 1rem;
}

/* Announcements List */
.announcements-card {
    flex: 1;
    min-height: 0;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
}

.card-header h3 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.card-header h3 i {
    color: var(--accent-4);
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.announcement-list li {
    position: absolute;
    /* Stack items on top of each other */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* Hidden by default */
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 1.5rem;
    border-left: 4px solid var(--accent-4);
    box-sizing: border-box;
    animation: fadeIn 0.8s ease-out;
    /* Smooth entry */
}

.announcement-list li.active {
    display: flex;
    /* Show only the active one */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.time-bullet {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-4);
    min-width: 45px;
    flex-shrink: 0;
}

.announcement-text {
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 400;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-year {
    color: #f59e0b;
    /* Amber/Orange catchy color */
    font-weight: 800;
    margin-right: 8px;
    display: inline-block;
}

/* Footer Ticker - FLASH NEWS STYLE */
.footer {
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #1e293b;
    /* Deep slate background */
    border-radius: 1.5rem;
    position: relative;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.flash-label {
    background: #ef4444;
    /* Alert Red */
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 5;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
}

.flash-label::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    border-top: 40px solid transparent;
    border-bottom: 40px solid transparent;
    border-left: 20px solid #ef4444;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-anim 800s linear infinite;
}

.ticker-item {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    display: inline-block;
    padding: 0 4rem;
    letter-spacing: 0.5px;
}

.ticker-category {
    color: #fbbf24;
    /* Amber for Category Tags */
    font-weight: 800;
    margin-right: 10px;
    text-transform: uppercase;
}

@keyframes ticker-anim {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Large Signage TV Constraints (1080x1920 / Portrait) */
@media (max-aspect-ratio: 4/5),
(min-height: 1200px) and (max-aspect-ratio: 1/1) {
    body {
        overflow: hidden;
    }

    .signage-container {
        padding: 2.5rem;
        gap: 2rem;
    }

    .glass-panel {
        border-radius: 3rem;
    }

    .header {
        padding: 2.5rem 3.5rem;
    }

    .brand i {
        font-size: 4rem;
    }

    .brand h1 {
        font-size: 3.5rem;
    }

    .powered-by {
        font-size: 1.2rem;
    }

    .time {
        font-size: 4.5rem;
    }

    .date {
        font-size: 1.5rem;
    }

    .weather-widget {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .weather-widget i {
        font-size: 2.2rem;
    }

    #weather-text {
        white-space: normal;
        line-height: 1.3;
    }

    .featured-card {
        border-radius: 3rem;
        flex: 0 0 32%;
    }

    .media-overlay {
        padding: 3rem;
    }

    .badge {
        font-size: 1.4rem;
        padding: 0.8rem 2rem;
        margin-bottom: 2rem;
    }

    .media-overlay h2 {
        font-size: 4.5rem;
    }

    .media-overlay h2.new-arrival-title {
        font-size: 2.4rem;
    }

    .info-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem;
    }

    .info-card {
        flex: 1 !important;
        padding: 1.2rem;
        min-height: 120px;
    }

    .icon-box {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .info-card h3 {
        font-size: 1.3rem;
    }

    .info-card p {
        font-size: 1.6rem;
    }

    .patron-info .temp {
        font-size: 1.8rem;
    }

    .patron-info .cond {
        font-size: 1.4rem;
    }

    .announcements-card {
        padding: 2.5rem;
    }

    .card-header h3 {
        font-size: 2.6rem;
        margin-bottom: 2rem;
    }

    .announcement-list {
        gap: 1.2rem;
    }

    .announcement-list li {
        padding: 1.5rem 2rem;
        border-radius: 2rem;
        border-left-width: 6px;
        gap: 2rem;
    }

    .time-bullet {
        font-size: 1.6rem;
        min-width: 80px;
        flex-shrink: 0;
    }

    .announcement-text {
        font-size: 2rem;
    }

    .quote-card {
        padding: 2.5rem;
    }

    .quote-icon {
        font-size: 4rem;
        margin-bottom: 2rem;
    }

    #quote-text {
        font-size: 2.5rem;
    }

    #quote-author {
        font-size: 1.8rem;
    }

    .bottom-grid {
        gap: 2rem;
    }

    .footer {
        height: 100px;
        border-radius: 2rem;
    }

    .flash-label {
        font-size: 2rem;
        padding: 0 3rem;
    }

    .flash-label::after {
        border-top-width: 50px;
        border-bottom-width: 50px;
        border-left-width: 25px;
        right: -25px;
    }

    .ticker-item {
        font-size: 2.2rem;
        padding: 0 4rem;
    }

}

.provider {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    margin-top: -1rem;
    /* Pull it closer to the footer */
}

.provider-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    opacity: 0.8;
}


/* Landscape screens (computer monitors) - Reduce sizes to fit without scrolling */
@media (orientation: landscape) {
    .signage-container {
        padding: 1rem;
        gap: 1rem;
    }

    .header {
        padding: 1rem 1.5rem;
    }

    .brand i {
        font-size: 2rem;
    }

    .brand h1 {
        font-size: 1.5rem;
    }

    .powered-by {
        font-size: 0.7rem;
    }

    .time {
        font-size: 2rem;
    }

    .date {
        font-size: 0.8rem;
    }

    .featured-card {
        flex: 0 0 25%;
    }

    .media-overlay {
        padding: 2rem;
    }

    .media-quote {
        top: 1rem;
        right: 1rem;
        max-width: min(38%, 300px);
        padding: 0.75rem 0.85rem;
        border-radius: 1rem;
    }

    .media-quote i {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }

    .media-quote p {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
    }

    .media-overlay h2 {
        font-size: 2.5rem;
    }

    .info-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem;
    }

    .info-card {
        flex: 1 !important;
        padding: 1.5rem;
    }

    .icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .info-card h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .info-card p {
        font-size: 1.2rem;
    }

    .patron-info .temp {
        font-size: 1.4rem;
    }

    .patron-info .cond {
        font-size: 1rem;
    }

    .announcements-card {
        padding: 1.5rem;
    }

    .card-header h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .announcement-list {
        gap: 1rem;
    }

    .announcement-list li {
        padding: 1rem;
        gap: 1rem;
    }

    .time-bullet {
        font-size: 1rem;
        min-width: 60px;
    }

    .announcement-text {
        font-size: 1rem;
        -webkit-line-clamp: 3;
    }

    .footer {
        height: 60px;
    }

    .ticker-item {
        font-size: 1.2rem;
        padding: 0 2rem;
    }
}


/* Pagination Dots */
.pagination-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dot.active {
    background: #fff;
    width: 25px;
    border-radius: 10px;
}