/* Reference palette: deep navy, warm gold and soft cream. */
:root {
    --school-navy: #05275a;
    --school-navy-dark: #031b40;
    --school-gold: #d7aa43;
    --school-cream: #fbf8f2;
}

.school-header {
    position: sticky;
    top: 0;
    z-index: 40;
    color: #fff;
    background: var(--school-navy);
    border-bottom: 3px solid var(--school-gold);
    box-shadow: 0 4px 18px rgb(3 27 64 / 14%);
    font-family: 'Inter', Arial, sans-serif;
    transition: transform 0.3s ease;
    will-change: transform;
}

.school-header a {
    text-decoration: none;
}

.school-header a:focus-visible {
    outline: 3px solid #f5d98c;
    outline-offset: 5px;
}

.header-main {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100%, 1280px);
    min-height: 104px;
    margin: 0 auto;
    padding: 11px 32px;
    background: var(--school-navy);
}

.header-brand {
    display: block;
    width: 280px;
    flex: 0 0 auto;
    border-radius: 4px;
}

.header-brand img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.header-programmes {
    display: grid;
    flex: 1;
    gap: 5px;
    min-width: 0;
    padding-inline: 24px;
    border-left: 1px solid rgb(215 170 67 / 45%);
    text-align: center;
}

.header-eyebrow {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    line-height: 1.5;
    text-transform: uppercase;
}

.header-eyebrow strong {
    color: #f5d98c;
    font-weight: 700;
}

.header-programmes p {
    margin: 0;
    color: #f5d98c;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.header-address {
    color: #dce3ef;
    font-size: 10px;
    line-height: 1.5;
}

.header-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    flex: 0 0 auto;
    border: 1.5px solid var(--school-gold);
    border-radius: 999px;
    color: #fff;
    background: rgb(255 255 255 / 3%);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.header-call i {
    color: #f5d98c;
    font-size: 13px;
    transition: color 0.2s ease;
}

.header-call:hover {
    color: var(--school-navy-dark);
    background: #f5d98c;
}

.header-call:hover i {
    color: var(--school-navy-dark);
}

.header-announcement {
    display: none;
}

.school-cta {
    background: linear-gradient(115deg, #0b3a83, #05275a 65%, #031b40);
    border-bottom: 3px solid var(--school-gold);
}

@media (max-width: 1023px) {
    .header-main {
        min-height: 94px;
    }

    .header-brand {
        width: 250px;
    }

    .header-programmes {
        padding-inline: 16px;
    }

    .header-programmes p {
        font-size: 14px;
    }

    .header-eyebrow {
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    .header-address {
        font-size: 9px;
    }
}

@media (max-width: 899px) {
    .header-programmes {
        display: none;
    }

    .header-announcement {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1;
        display: grid;
        gap: 3px;
        width: 100%;
        padding: 10px 16px;
        border-top: 1px solid rgb(215 170 67 / 25%);
        border-bottom: 2px solid var(--school-gold);
        background: var(--school-navy);
        text-align: center;
        box-shadow: 0 3px 8px rgb(3 27 64 / 12%);
        transform: translateY(0);
        opacity: 1;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .header-announcement p {
        margin: 0;
        line-height: 1.5;
    }

    .header-announcement__session {
        font-size: 12px;
        font-weight: 500;
    }

    .header-announcement__session strong {
        color: #f5d98c;
    }

    .header-announcement__classes {
        color: #f5d98c;
        font-family: 'Poppins', Arial, sans-serif;
        font-size: 15px;
        font-weight: 600;
    }

    .header-announcement > span {
        color: #dce3ef;
        font-size: 12px;
        line-height: 1.5;
    }

    .announcement-hidden .header-announcement {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 639px) {
    .header-main {
        min-height: 76px;
        gap: 8px;
        padding: 10px 14px;
    }

    .header-brand {
        width: clamp(185px, 54vw, 245px);
        max-width: calc(100% - 122px);
    }

    .header-call {
        min-height: 42px;
        padding-inline: 10px;
        gap: 6px;
        font-size: 12px;
        letter-spacing: 0;
        flex-shrink: 0;
    }

    .header-call i {
        font-size: 11px;
    }

    .header-announcement__classes {
        font-size: 14px;
    }
}

/* A balanced, three-column masthead for desktop; mobile stays unchanged. */
@media (min-width: 900px) {
    .school-header {
        background:
            radial-gradient(ellipse at 50% 0, rgb(98 145 205 / 13%), transparent 65%),
            linear-gradient(110deg, #031d46, #082e64 50%, #031d46);
        border-bottom-color: #d9b45c;
        box-shadow: 0 1px 0 rgb(245 217 140 / 18%) inset, 0 5px 22px rgb(3 27 64 / 18%);
    }

    .header-main {
        display: grid;
        grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.3fr) minmax(160px, 1fr);
        gap: 20px;
        width: min(100%, 1360px);
        min-height: 112px;
        padding: 14px 24px;
        background: transparent;
    }

    .header-brand {
        width: 280px;
        max-width: 100%;
        justify-self: start;
    }

    .header-programmes {
        gap: 6px;
        padding-inline: 10px;
        border-inline: 1px solid rgb(215 170 67 / 25%);
    }

    .header-eyebrow {
        color: #edf1f8;
        font-size: 9px;
        font-weight: 500;
        line-height: 1.6;
        letter-spacing: 0.5px;
    }

    .header-eyebrow strong {
        display: inline-block;
        margin-left: 4px;
        padding: 2px 7px;
        border: 1px solid rgb(245 217 140 / 40%);
        border-radius: 4px;
        background: rgb(215 170 67 / 10%);
        color: #f5d98c;
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .header-programmes p {
        color: #f2d28a;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: clamp(17px, 1.6vw, 23px);
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 0.1px;
    }

    .header-address {
        color: #d2dced;
        font-size: 9px;
        line-height: 1.6;
        letter-spacing: 0.1px;
    }

    .header-call {
        justify-self: end;
        gap: 9px;
        min-height: 48px;
        padding: 6px 14px 6px 7px;
        border-color: #e0bb66;
        background: linear-gradient(110deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2%));
        box-shadow: 0 0 0 4px rgb(215 170 67 / 5%);
        font-size: 14px;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.5px;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .header-call i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 31px;
        height: 31px;
        flex: 0 0 31px;
        border-radius: 50%;
        background: linear-gradient(135deg, #f4d990, #d4a64a);
        color: #05275a;
        font-size: 12px;
    }

    .header-call:hover {
        background: #f5d98c;
        box-shadow: 0 0 0 5px rgb(215 170 67 / 12%);
    }
}

@media (min-width: 1200px) {
    .header-main {
        gap: 28px;
        min-height: 116px;
        padding-inline: 32px;
    }

    .header-brand {
        width: 300px;
    }

    .header-programmes {
        padding-inline: 24px;
    }

    .header-eyebrow {
        font-size: 10px;
        letter-spacing: 0.8px;
    }

    .header-eyebrow strong {
        font-size: 11px;
    }

    .header-address {
        font-size: 10px;
    }

    .header-call {
        gap: 11px;
        padding-right: 18px;
        font-size: 16px;
    }

    .header-call i {
        width: 33px;
        height: 33px;
        flex-basis: 33px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .school-header,
    .school-header *,
    .school-header *::before,
    .school-header *::after {
        transition: none !important;
    }
}
