:root {
    --pmba-teal: #2d4a4d;
    --pmba-gold: #c9a227;
    --pmba-border: #ddb94a;
    --pmba-ink: #1e1e1e;
    --pmba-muted: #5a5a5a;
    --pmba-red: rgb(255, 0, 0);
}

html, body {
    margin: 0;
    padding: 0;
    background: #f0f0f0;
    font-family: AvertaCY-regular, AvertaCY, Averta, Arial, Helvetica, sans-serif;
    color: var(--pmba-ink);
}

.pmba-page {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
}

.pmba-header {
    background: var(--pmba-teal);
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(16px, 2.4vh, 28px) clamp(20px, 3vw, 40px);
}

.pmba-logo {
    height: clamp(60px, 10vh, 120px);
    width: auto;
    padding-left: 50px;
}

.pmba-header-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pmba-program-title {
    font-size: clamp(1.15rem, 2.1vw, 1.7rem);
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.25;
}

.pmba-subtitle {
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 400;
    margin-top: 4px;
    color: #dce8e8;
}

.pmba-time-range {
    font-size: clamp(0.85rem, 1.2vw, 1.05rem);
    margin-top: 2px;
    color: #b9cdcd;
}

tr.pmba-days-row th {
    background: var(--pmba-teal);
    color: #fff;
    text-transform: uppercase;
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    font-weight: 700;
    letter-spacing: 2px;
    padding: clamp(10px, 1.6vh, 16px) 8px;
    text-align: center;
    border: 1px solid var(--pmba-teal);
}

.pmba-scroll {
    overflow-x: auto;
}

table.pmba-schedule {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

table.pmba-schedule th,
table.pmba-schedule td {
    border: 1px solid var(--pmba-border);
    vertical-align: top;
}

/* Banner + cards fuse into one visual block per section; the gap row
   below is what separates one section from the next, matching how the
   source flyer groups a label with the cards directly under it. */
tr.pmba-banner-row th,
tr.pmba-banner-row td {
    border-bottom: none;
}

tr.pmba-cards-row td {
    border-top: none;
}

tr.pmba-banner-row th.pmba-banner-label {
    background: var(--pmba-gold);
    color: #fff;
    font-size: clamp(0.68rem, 0.95vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: center;
    padding: clamp(6px, 1vh, 9px) 10px;
}

tr.pmba-banner-row td.pmba-banner-gap {
    background: #fff;
}

tr.pmba-cards-row td.pmba-card {
    padding: clamp(16px, 2.4vh, 24px) clamp(12px, 1.6vw, 20px);
    text-align: center;
}

tr.pmba-cards-row td.pmba-card-empty {
    background: #fff;
}

.pmba-title {
    margin: 0 0 10px;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--pmba-ink);
}

/* Faculty stands alone with breathing room on both sides; the three lines
   below it (Study format / Course / Prerequisite) read as one tight group,
   matching the source flyer's spacing rhythm. */
.pmba-faculty {
    margin: 0 0 14px;
    font-size: clamp(0.72rem, 0.95vw, 0.85rem);
    font-weight: 700;
}

.pmba-meta {
    margin: 0 0 14px;
}

.pmba-field {
    margin: 0;
    font-size: clamp(0.72rem, 0.95vw, 0.85rem);
    font-weight: 700;
    line-height: 1.5;
}

.pmba-field strong {
    font-weight: 700;
}

.pmba-online {
    color: var(--pmba-red);
    font-weight: 800;
}

.pmba-room {
    margin: 0;
    font-weight: 800;
    font-size: clamp(0.78rem, 1vw, 0.92rem);
    color: var(--pmba-ink);
}

.pmba-note {
    margin: 10px 0 0;
    color: var(--pmba-red);
    font-weight: 700;
    font-size: clamp(0.66rem, 0.85vw, 0.75rem);
    line-height: 1.4;
}

.pmba-footer {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pmba-muted);
    padding: clamp(16px, 2.4vh, 26px) 12px;
    margin: 0;
}

/* 2800px, not 1800px: ordinary desktop monitors (1920px, 2560px, even
   most ultrawides) are well under this, so they get the normal-sized
   clamp() values above and look like a regular webpage viewed up close.
   Only the actual 4K kiosk (confirmed running at 3840px CSS width, 100%
   OS scaling) crosses this and gets the "TV viewed from across a room"
   sizing below. Matches schedule.css's own breakpoint at the same value. */
@media (min-width: 2800px) {
    .pmba-logo {
        height: clamp(120px, 8vh, 170px);
    }

    .pmba-program-title {
        font-size: clamp(2.3rem, 2.7vw, 3.7rem);
    }

    .pmba-subtitle {
        font-size: clamp(1.5rem, 1.8vw, 2.3rem);
    }

    .pmba-time-range {
        font-size: clamp(1.25rem, 1.45vw, 1.85rem);
    }

    tr.pmba-days-row th {
        font-size: clamp(1.25rem, 1.45vw, 1.85rem);
        padding: clamp(18px, 2.3vh, 30px) 8px;
    }

    tr.pmba-banner-row th.pmba-banner-label {
        font-size: clamp(1.15rem, 1.25vw, 1.5rem);
        padding: clamp(12px, 1.6vh, 19px) 14px;
    }

    tr.pmba-cards-row td.pmba-card {
        padding: clamp(32px, 3.6vh, 50px) clamp(24px, 2.3vw, 37px);
    }

    .pmba-title {
        font-size: clamp(1.85rem, 2.2vw, 2.65rem);
        margin-bottom: 18px;
    }

    .pmba-faculty {
        font-size: clamp(1.2rem, 1.4vw, 1.6rem);
        margin-bottom: 25px;
    }

    .pmba-meta {
        margin-bottom: 25px;
    }

    .pmba-field {
        font-size: clamp(1.2rem, 1.4vw, 1.6rem);
    }

    .pmba-room {
        font-size: clamp(1.25rem, 1.5vw, 1.7rem);
    }

    .pmba-note {
        font-size: clamp(1.1rem, 1.2vw, 1.4rem);
        margin-top: 16px;
    }

    .pmba-footer {
        font-size: clamp(1.25rem, 1.35vw, 1.6rem);
    }
}

@media (max-width: 700px) {
    /* 4 columns of dense course-card text can't be squeezed into a phone's
       width and stay legible, so each day column gets a real, readable
       width (like a day-per-page calendar) and the whole table scrolls
       horizontally instead - same "scroll, don't shrink to unreadable"
       approach schedule.css already uses for the main schedule on mobile. */
    table.pmba-schedule {
        min-width: 1080px;
        table-layout: auto;
    }

    table.pmba-schedule th,
    table.pmba-schedule td {
        width: 270px;
    }

    .pmba-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 10px;
        padding: 14px 16px;
    }

    .pmba-header-text {
        position: static;
        transform: none;
        text-align: left;
    }

    .pmba-logo {
        height: 40px;
    }

    .pmba-program-title {
        font-size: 1.15rem;
    }

    .pmba-subtitle {
        font-size: 0.9rem;
    }

    .pmba-time-range {
        font-size: 0.8rem;
    }

    tr.pmba-days-row th {
        font-size: 0.85rem;
        padding: 10px 8px;
    }

    tr.pmba-banner-row th.pmba-banner-label {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    tr.pmba-cards-row td.pmba-card {
        padding: 14px 12px;
    }

    .pmba-title {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    .pmba-faculty,
    .pmba-field {
        font-size: 0.8rem;
    }

    .pmba-faculty,
    .pmba-meta {
        margin-bottom: 10px;
    }

    .pmba-room {
        font-size: 0.85rem;
    }

    .pmba-note {
        font-size: 0.7rem;
    }

    .pmba-footer {
        font-size: 0.75rem;
        padding: 14px 10px;
    }
}

/* Manual override for the automatic time-based swap between this page and
   index.php - kept small and low-contrast since the primary use case is a
   passive kiosk display, not a page someone is meant to click around. */
.page-swap-link {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 20px;
    opacity: 0.55;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.page-swap-link:hover,
.page-swap-link:focus {
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
}


.page-swap-link--top {
    position: absolute;
    top: 50%;
    right: 25px;
    bottom: auto;
    transform: translateY(-50%);
    background: var(--pmba-gold);
    border: none;
    border-radius: 6px;
    padding: 15px 23px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.page-swap-link--top:hover,
.page-swap-link--top:focus {
    background: var(--pmba-teal);
}
