/* ============================================================
   Display Informasi MA Negeri 4 Jombang
   display.css — Room Display / Digital Signage Page
   Optimized for TV, Projector, Large Screens, Tablets, Phones
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--clr-bg, #0f172a);
    color: var(--clr-text, #f1f5f9);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---- Grid Base ---- */
.display-wrapper {
    width: 100vw;
    height: 100vh;
    display: grid;
    overflow: hidden;
    position: relative;
    gap: 0;
}

/* Layout 1: Slideshow Full + Ticker Bottom */
.layout_1 .display-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar"
        "slides"
        "bottom";
}
.layout_1 .grid-area-news,
.layout_1 .grid-area-schedule-list,
.layout_1 .grid-area-info { display: none; }

/* Layout 2: Slideshow Left + Schedule & News Right + Ticker Bottom */
.layout_2 .display-wrapper {
    grid-template-columns: 2.5fr 1fr;
    grid-template-rows: auto 1fr 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "slides news"
        "slides schedule"
        "bottom bottom";
}
.layout_2 .grid-area-slides { grid-area: slides; }
.layout_2 .grid-area-topbar { grid-area: topbar; }
.layout_2 .grid-area-bottom { grid-area: bottom; }
.layout_2 .grid-area-info { display: none; }
.layout_2 .grid-area-news { 
    grid-area: news; height: 100%;
    border-left: 1px solid rgba(255,255,255,0.1);
}
.layout_2 .grid-area-schedule-list { 
    grid-area: schedule; height: 100%;
    border-left: 1px solid rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Layout 3: Slides Left + News (top right) + Schedule (bottom right) + Ticker */
.layout_3 .display-wrapper {
    grid-template-columns: 2.5fr 1fr;
    grid-template-rows: auto 1.5fr 1fr auto;
    grid-template-areas:
        "topbar  topbar"
        "slides  news"
        "slides  schedule"
        "bottom  bottom";
}
.layout_3 .grid-area-slides {
    grid-area: slides;
}
.layout_3 .grid-area-info { display: none; }
.layout_3 .grid-area-news {
    grid-area: news;
    border-left: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.layout_3 .grid-area-schedule-list {
    grid-area: schedule;
    border-left: 1px solid rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

/* ============================================================
   LAYOUT 4: DASHBOARD — Slide Large Left · Schedule Mid · News Right
   ============================================================ */
.layout_4 .display-wrapper {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar  topbar   topbar"
        "slides  schedule news"
        "bottom  bottom   bottom";
}
.layout_4 .grid-area-slides        { grid-area: slides; }
.layout_4 .grid-area-schedule-list {
    grid-area: schedule;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(255,255,255,0.08);
}
.layout_4 .grid-area-news          { grid-area: news; }
.layout_4 .grid-area-info          { display: none; }

/* ============================================================
   LAYOUT 5: FULL TEXT — Info Large Left · News Right (No Slide)
   ============================================================ */
.layout_5 .display-wrapper {
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "info   news"
        "bottom bottom";
}
.layout_5 .grid-area-slides        { display: none; }
.layout_5 .grid-area-schedule-list { display: none; }
.layout_5 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: center;
    background: linear-gradient(160deg, var(--clr-primary), #10203e);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 3rem;
}
.layout_5 .info-content { font-size: clamp(1.4rem,2.5vw,2.4rem); text-align: left; padding: 0; }
.layout_5 .grid-area-news { grid-area: news; }

/* ============================================================
   LAYOUT 6: SPLIT VIDEO — Slide Full Top · Schedule Left · News Right Bottom
   ============================================================ */
.layout_6 .display-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1.3fr 1fr auto;
    grid-template-areas:
        "topbar   topbar"
        "slides   slides"
        "schedule news"
        "bottom   bottom";
}
.layout_6 .grid-area-slides        { grid-area: slides; }
.layout_6 .grid-area-schedule-list {
    grid-area: schedule;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.06);
}
.layout_6 .grid-area-news {
    grid-area: news;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: 1px solid rgba(255,255,255,0.06);
}
.layout_6 .grid-area-info          { display: none; }

/* ============================================================
   LAYOUT 7: VIDEO NEWS-SPLIT — Slide Left · News Right Only
   ============================================================ */
.layout_7 .display-wrapper {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "slides news"
        "bottom bottom";
}
.layout_7 .grid-area-slides        { grid-area: slides; }
.layout_7 .grid-area-news          { grid-area: news; border-left: 1px solid rgba(255,255,255,0.1); }
.layout_7 .grid-area-schedule-list { display: none; }
.layout_7 .grid-area-info          { display: none; }

/* ============================================================
   LAYOUT 8: TRIO MIXED — Info Left · Slide Middle · Schedule Right
   ============================================================ */
.layout_8 .display-wrapper {
    grid-template-columns: 1fr 1.5fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar topbar topbar"
        "info   slides schedule"
        "bottom bottom bottom";
}
.layout_8 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--clr-primary), #0f1f3d);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 2rem; text-align: center;
}
.layout_8 .info-content            { font-size: clamp(1.1rem,1.8vw,1.9rem); padding: 0; }
.layout_8 .grid-area-slides        { grid-area: slides; }
.layout_8 .grid-area-schedule-list { grid-area: schedule; border-left: 1px solid rgba(255,255,255,0.1); }
.layout_8 .grid-area-news          { display: none; }

/* ============================================================
   LAYOUT 9: SPLIT GALLERY — Slide Left · Info Right Top · News Full Width Bottom
   ============================================================ */
.layout_9 .display-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1.4fr 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "slides info"
        "news   news"
        "bottom bottom";
}
.layout_9 .grid-area-slides { grid-area: slides; }
.layout_9 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--clr-primary), #162040);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 2rem; text-align: center;
}
.layout_9 .info-content            { font-size: clamp(1rem,1.6vw,1.7rem); padding: 0; }
.layout_9 .grid-area-news {
    grid-area: news;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.layout_9 .layout_9 .news-title    { font-size: 1.2rem; }
.layout_9 .grid-area-schedule-list { display: none; }

/* ============================================================
   LAYOUT 10: NEWS HIGHLIGHT — News Left · Schedule Right · Info Banner Below
   ============================================================ */
.layout_10 .display-wrapper {
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: auto 1fr minmax(80px,12vh) auto;
    grid-template-areas:
        "topbar  topbar"
        "news    schedule"
        "info    info"
        "bottom  bottom";
}
.layout_10 .grid-area-slides       { display: none; }
.layout_10 .grid-area-news         { grid-area: news; border-right: 1px solid rgba(255,255,255,0.08); }
.layout_10 .grid-area-schedule-list{ grid-area: schedule; border-left: 1px solid rgba(255,255,255,0.08); }
.layout_10 .grid-area-info {
    grid-area: info;
    display: flex;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-primary));
    border-top: 2px solid var(--clr-accent);
}
.layout_10 .info-content { font-size: clamp(1.2rem,2.2vw,2rem); text-align: left; padding: 0; font-weight: 800; }

/* ============================================================
   LAYOUT 11: ANNOUNCEMENT — Slide Left · Info Box Colored Right
   ============================================================ */
.layout_11 .display-wrapper {
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "slides info"
        "bottom bottom";
}
.layout_11 .grid-area-slides { grid-area: slides; }
.layout_11 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--clr-accent), var(--clr-primary));
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem; text-align: center;
}
.layout_11 .info-content           { font-size: clamp(1.2rem,2.2vw,2rem); padding: 0; font-weight: 700; }
.layout_11 .grid-area-news         { display: none; }
.layout_11 .grid-area-schedule-list{ display: none; }

/* ============================================================
   LAYOUT 12: FOCUS VIDEO — Info Box Colored Left · Slide Right
   ============================================================ */
.layout_12 .display-wrapper {
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar topbar"
        "info   slides"
        "bottom bottom";
}
.layout_12 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--clr-accent), var(--clr-primary));
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem; text-align: center;
}
.layout_12 .info-content           { font-size: clamp(1.2rem,2.2vw,2rem); padding: 0; font-weight: 700; }
.layout_12 .grid-area-slides       { grid-area: slides; }
.layout_12 .grid-area-news         { display: none; }
.layout_12 .grid-area-schedule-list{ display: none; }

/* ============================================================
   LAYOUT 13: FULL SLIDE — Slideshow Full + Info Text Overlay Bottom
   ============================================================ */
.layout_13 .display-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar"
        "slides"
        "bottom";
}
.layout_13 .grid-area-slides { grid-area: slides; }
.layout_13 .grid-area-info {
    grid-area: slides;
    align-self: stretch;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 45%, transparent 75%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 2rem 3rem;
    pointer-events: none;
    backdrop-filter: none;
}
.layout_13 .info-content {
    font-size: clamp(1.5rem,4vw,3rem); text-align: left; padding: 0;
    font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}
.layout_13 .grid-area-news         { display: none; }
.layout_13 .grid-area-schedule-list{ display: none; }

/* ============================================================
   LAYOUT 14: ANNOUNCEMENT FULL — Full Screen Info / Pengumuman
   ============================================================ */
.layout_14 .display-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar"
        "info"
        "bottom";
}
.layout_14 .grid-area-slides        { display: none; }
.layout_14 .grid-area-news          { display: none; }
.layout_14 .grid-area-schedule-list { display: none; }
.layout_14 .grid-area-info {
    grid-area: info;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-primary) 100%);
    text-align: center;
    padding: 4rem;
    position: relative;
}
.layout_14 .grid-area-info::before {
    content: 'INFORMASI PENTING';
    position: absolute;
    top: 2rem; left: 50%; transform: translateX(-50%);
    font-size: 0.65rem; font-weight: 700; letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 0.3rem 1.2rem; border-radius: 100px;
    white-space: nowrap;
}
.layout_14 .info-content {
    font-size: clamp(2rem,6vw,5rem); padding: 0;
    font-weight: 900; line-height: 1.15;
    color: white; text-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ============================================================
   LAYOUT 15: SLIDE BESAR KIRI · JADWAL KANAN · TICKER BAWAH
   Left (large): Slideshow
   Right:        Schedule list (full height)
   Bottom:       Ticker bar
   ============================================================ */
.layout_15 .display-wrapper {
    grid-template-columns: 3fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar   topbar"
        "slides   schedule"
        "bottom   bottom";
}
.layout_15 .grid-area-slides {
    grid-area: slides;
}
.layout_15 .grid-area-schedule-list {
    grid-area: schedule;
    border-left: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.layout_15 .grid-area-info { display: none; }
.layout_15 .grid-area-news { display: none; }

/* ============================================================
   LAYOUT 16: JADWAL KIRI · SLIDE BESAR KANAN · TICKER BAWAH
   ============================================================ */
.layout_16 .display-wrapper {
    grid-template-columns: 1.2fr 1.8fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar   topbar"
        "schedule slides"
        "bottom   bottom";
}
.layout_16 .grid-area-slides {
    grid-area: slides;
}
.layout_16 .grid-area-schedule-list {
    grid-area: schedule;
    border-right: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.layout_16 .grid-area-info { display: none; }
.layout_16 .grid-area-news { display: none; }

/* ============================================================
   LAYOUT 17: SLIDE ATAS (BESAR) · JADWAL BAWAH · TICKER BAWAH
   ============================================================ */
.layout_17 .display-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1.6fr 1fr auto;
    grid-template-areas:
        "topbar"
        "slides"
        "schedule"
        "bottom";
}
.layout_17 .grid-area-slides {
    grid-area: slides;
}
.layout_17 .grid-area-schedule-list {
    grid-area: schedule;
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.layout_17 .grid-area-info { display: none; }
.layout_17 .grid-area-news { display: none; }

/* ============================================================
   LAYOUT 18: SPLIT SIMETRIS (SLIDE 50% · JADWAL 50%)
   ============================================================ */
.layout_18 .display-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "topbar   topbar"
        "slides   schedule"
        "bottom   bottom";
}
.layout_18 .grid-area-slides {
    grid-area: slides;
}
.layout_18 .grid-area-schedule-list {
    grid-area: schedule;
    border-left: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.layout_18 .grid-area-info { display: none; }
.layout_18 .grid-area-news { display: none; }

/* ============================================================
   LAYOUT 19: SIGNAGE COMPLETE (Slide + Box Info Visi Misi Bawah · Jadwal Tengah · Berita Kanan)
   ============================================================ */
.layout_19 .display-wrapper {
    grid-template-columns: 1.8fr 1fr 1fr;
    grid-template-rows: auto 1.4fr 1fr auto;
    grid-template-areas:
        "topbar   topbar   topbar"
        "slides   schedule news"
        "info     schedule news"
        "bottom   bottom   bottom";
}
.layout_19 .grid-area-slides {
    grid-area: slides;
}
.layout_19 .grid-area-info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, var(--clr-primary, #006837) 0%, #034b28 100%);
    border-top: 3px solid var(--clr-accent, #d97706);
    padding: 1.5rem 2.2rem;
    color: #ffffff;
    overflow-y: auto;
}
.layout_19 .info-content {
    font-size: clamp(1.25rem, 2.1vw, 2.3rem);
    font-weight: 800;
    line-height: 1.45;
    text-align: left;
    padding: 0;
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    width: 100%;
}
.layout_19 .info-content strong,
.layout_19 .info-content b,
.layout_19 .info-content h1,
.layout_19 .info-content h2,
.layout_19 .info-content h3 {
    color: #facc15 !important;
    font-weight: 900;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.15em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.layout_19 .grid-area-schedule-list {
    grid-area: schedule;
    border-left: 1px solid var(--clr-card-border, rgba(255,255,255,0.1));
    border-right: 1px solid var(--clr-card-border, rgba(255,255,255,0.1));
    overflow: hidden;
}
.layout_19 .grid-area-news {
    grid-area: news;
    overflow: hidden;
}

/* Common overrides for areas not used in standard ticker layout */
.display-wrapper > aside,
.display-wrapper > section {
    background: var(--clr-card, #ffffff);
    color: var(--clr-text, #0f172a);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.area-header {
    background: var(--clr-primary, #006837);
    padding: 1rem 1.5rem;
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #ffffff;
    border-bottom: 2px solid var(--clr-accent, #d97706);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--clr-text, #0f172a);
}


/* ---- Topbar ---- */
.display-topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    background: var(--clr-card, #ffffff);
    border-bottom: 3px solid var(--clr-primary, #006837);
    color: var(--clr-text, #0f172a);
    z-index: 20;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(var(--clr-primary-rgb, 0,104,55), 0.3);
}

.brand-text .school-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--clr-text, #0f172a);
    line-height: 1.2;
}

.brand-text .school-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-muted, #047857);
}

.topbar-room {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.room-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.topbar-clock-area {
    text-align: right;
    flex-shrink: 0;
}

.display-clock {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--clr-secondary), var(--clr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    line-height: 1;
}

.display-date {
    font-size: 0.72rem;
    color: var(--clr-muted);
    margin-top: 2px;
    white-space: nowrap;
}

/* ---- Slideshow Area ---- */
.slideshow-area {
    grid-area: slides;
    position: relative;
    overflow: hidden;
    background: #000;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Fade transition */
.slide.fade-in  { animation: slideFadeIn  0.8s ease forwards; }
.slide.fade-out { animation: slideFadeOut 0.8s ease forwards; }

@keyframes slideFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Slide image */
.slide-image {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Slide video */
.slide-video {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Slide overlay */
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.1) 40%,
        transparent 70%
    );
    z-index: 3;
    pointer-events: none;
}

.slide-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 4;
    pointer-events: none;
}

.slide-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    line-height: 1.2;
}

/* Empty/No Slide State */
.slide-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--clr-bg), var(--clr-card));
    z-index: 5;
}

.slide-empty-icon {
    font-size: 5rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    animation: emptyPulse 2s ease-in-out infinite;
}

@keyframes emptyPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50%       { transform: scale(1.05); opacity: 0.5; }
}

.slide-empty-text {
    font-size: 1.2rem;
    color: var(--clr-muted);
    font-weight: 500;
}

/* Progress bar */
.slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--grad-from), var(--grad-to));
    z-index: 10;
    transition: width linear;
    transform-origin: left;
}

/* Slide counter dots */
.slide-dots {
    position: absolute;
    bottom: 1.2rem;
    right: 1.5rem;
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

.slide-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: all 0.3s;
}

.slide-dot.active {
    background: var(--clr-accent);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(var(--clr-accent-rgb, 96,165,250), 0.6);
}

/* ---- Bottom Bar / Ticker ---- */
.bottom-bar {
    grid-area: bottom;
    background: var(--clr-primary, #006837);
    border-top: 3px solid var(--clr-accent, #d97706);
    display: flex;
    align-items: stretch;
    min-height: 56px;
    max-height: 56px;
    z-index: 20;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker {
    display: flex;
    width: max-content;
    gap: 0;
    white-space: nowrap;
    animation: scheduleTicker 40s linear infinite;
    align-items: center;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.ticker::after {
    content: attr(data-fallback);
    padding-left: 3rem;
}

/* News List Item styling */
.news-list { padding: 1.2rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.news-item {
    background: var(--clr-input-bg, rgba(0,0,0,0.03));
    border-radius: 10px;
    padding: 1.1rem;
    border-left: 4px solid var(--clr-primary, #006837);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.news-title {
    font-weight: 800;
    font-size: var(--news-title-size, 1.05rem);
    margin-bottom: 0.4rem;
    color: var(--clr-text, #064e3b);
    line-height: 1.35;
}
.news-content {
    font-size: var(--news-content-size, 0.9rem);
    color: var(--clr-muted, #047857);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Schedule List Item styling */
.schedule-list { padding: 1.2rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }
.v-sched-item {
    display: flex;
    gap: 1rem;
    background: var(--clr-input-bg, rgba(0,0,0,0.03));
    padding: 1rem;
    border-radius: 10px;
    align-items: center;
    border-left: 4px solid var(--clr-accent, #d97706);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.v-sched-time {
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 0.5rem 0.7rem;
    background: var(--clr-card, #ffffff);
    border-radius: 10px;
    border: 1px solid var(--clr-card-border, rgba(0,0,0,0.08));
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.v-sched-clock {
    font-weight: 700;
    color: var(--clr-muted, #475569);
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}
.v-sched-date {
    font-weight: 800;
    color: var(--clr-primary, #006837);
    font-size: 1.1rem;
    line-height: 1.25;
    white-space: nowrap;
}
.v-sched-details { flex: 1; }
.v-sched-title {
    font-weight: 700;
    font-size: var(--sched-title-size, 1rem);
    color: var(--clr-text, #0f172a);
}
.v-sched-location {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-accent, #d97706);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}
.v-sched-desc {
    font-size: var(--sched-desc-size, 0.82rem);
    color: var(--clr-muted, #475569);
    margin-top: 0.2rem;
}

/* ============================================================
   RESPONSIVE — PORTRAIT / MOBILE
   ============================================================ */

@media (max-width: 768px) {
    .display-wrapper {
        grid-template-rows: auto 1fr auto;
    }
    .display-topbar {
        padding: 0.6rem 1rem;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .topbar-room { order: 3; width: 100%; justify-content: center; }
    .display-clock { font-size: 1.3rem; }
    .slide-title { font-size: 1rem; }
    .schedule-bar { min-height: 48px; max-height: 48px; }
    .schedule-label { padding: 0 0.8rem; font-size: 0.65rem; }
    .schedule-item { font-size: 0.78rem; }
    .brand-text .school-name { font-size: 0.85rem; }
}

/* ============================================================
   LARGE SCREENS — TV / PROJECTOR
   ============================================================ */

@media (min-width: 1920px) {
    .display-topbar { padding: 1.2rem 3rem; min-height: 90px; }
    .brand-icon { width: 60px; height: 60px; font-size: 1.6rem; }
    .brand-text .school-name { font-size: 1.3rem; }
    .brand-text .school-sub { font-size: 0.85rem; }
    .room-badge { font-size: 1.1rem; padding: 0.5rem 1.6rem; }
    .display-clock { font-size: 2.5rem; }
    .display-date { font-size: 0.9rem; }
    .slide-title { font-size: 2.5rem; }
    .schedule-bar { min-height: 70px; max-height: 70px; }
    .schedule-item { font-size: 1rem; }
    .schedule-label { font-size: 0.9rem; padding: 0 2rem; }
}

@media (min-width: 2560px) {
    .display-topbar { min-height: 110px; }
    .display-clock { font-size: 3rem; }
    .slide-title { font-size: 3rem; }
}

/* ============================================================
   PORTRAIT MODE (Tablets/Phones in portrait)
   ============================================================ */
@media (max-aspect-ratio: 1/1) {
    .display-wrapper {
        grid-template-rows: auto 1fr auto auto;
        grid-template-areas:
            "topbar"
            "slideshow"
            "schedule-list"
            "schedule-bar";
    }

    .schedule-list-panel {
        display: block !important;
        grid-area: schedule-list;
        background: rgba(0,0,0,0.6);
        border-top: 1px solid rgba(255,255,255,0.05);
        padding: 1rem;
        max-height: 200px;
        overflow-y: auto;
    }
}

.schedule-list-panel { display: none; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--clr-accent-rgb, 96,165,250), 0.3); border-radius: 2px; }

@keyframes scheduleTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Audio Prompt Badge ---- */
.audio-prompt-badge {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--clr-accent-rgb, 96, 165, 250), 0.5);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: audioPulse 2s infinite alternate;
    transition: all 0.3s ease;
}

.audio-prompt-badge:hover {
    transform: scale(1.05);
    border-color: var(--clr-accent, #60a5fa);
    background: rgba(30, 58, 138, 0.95);
}

@keyframes audioPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--clr-accent-rgb, 96, 165, 250), 0.6); }
    100% { box-shadow: 0 0 0 12px rgba(var(--clr-accent-rgb, 96, 165, 250), 0); }
}
