/* ==========================================================================
   The City Scholars School - Stylesheet

   Contents (search for the banner text):
     1. Design tokens            6. Homepage sections (about, academics, ...)
     2. Reset & base             7. Buttons
     3. Header & navigation      8. Section styles, cards, stats, CTA banner
     4. Eyebrow / badge          9. Forms, testimonials, alerts, FAQ
     5. Hero                    10. Footer
                                11. Responsive overrides
   ========================================================================== */

/* ==========================================================================
   1. Design tokens
   Edit colours here only. theme_helper.php re-emits --primary / --accent from
   the active theme row in the database, so the admin theme still wins.
   ========================================================================== */
:root {
    /* Brand palette (The City Scholars School crest) */
    --primary: #123F73;          /* navy: dominant brand colour */
    --primary-dark: #082B50;     /* deep navy: text-safe buttons, dark sections */
    --primary-darker: #061F3A;   /* hover state of navy buttons, footer */
    --secondary: #F8B923;        /* gold: highlights and icons on navy */
    --accent: #F8B923;           /* gold: CTAs and small highlights (always with navy text) */
    --accent-dark: #E0A00C;      /* gold hover */
    --on-accent: #082B50;        /* text on gold (8.1:1) */
    --accent-ink: #8A5D00;       /* gold-toned text/icons on light backgrounds (5.3:1) */
    --cream: #F2F5F9;            /* light section background */
    --text: #253449;             /* main text */
    --soft-sage: #E6EDF6;        /* soft navy tint: backgrounds, chips */
    --border: #D8E0EA;
    --white: #FFFFFF;

    /* Supporting neutrals and RGB triplets (for translucent overlays) */
    --text-light: #4E5D72;
    --muted: #5B6A80;
    --ink-rgb: 37, 52, 73;
    --overlay-rgb: 8, 43, 80;    /* deep navy used over photos */
    --accent-rgb: 248, 185, 35;
    --primary-line: rgba(18, 63, 115, 0.35);

    /* Feedback colours (form alerts) */
    --success: #1e7e4d;
    --success-bg: #eafaf1;
    --success-border: #c3ecd6;
    --error: #b3261e;
    --error-bg: #fdecec;
    --error-border: #f8cfcc;

    /* Legacy names: aliases of the tokens above, kept so existing rules and
       inline styles keep working. Prefer the short names in new code. */
    --primary-color: var(--primary);
    --secondary-color: var(--white);     /* text colour used on --primary backgrounds */
    --accent-color: var(--accent);
    --primary-soft: var(--soft-sage);
    --sage: var(--secondary);
    --sage-soft: var(--soft-sage);
    --ink: var(--text);
    --text-dark: var(--text);
    --border-color: var(--border);
    --bg-light: var(--cream);
    --surface: var(--white);

    /* Typography */
    --font-display: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;

    /* Type scale (body text; headings use clamp() so they scale with the screen) */
    --fs-xs: 12.5px;             /* labels, meta lines */
    --fs-sm: 13.5px;             /* captions, hints */
    --fs-body-sm: 14.5px;        /* card text, lists */
    --fs-body: 15px;             /* default paragraph */
    --fs-md: 16px;               /* lead text in cards */
    --fs-lg: 18px;               /* card titles */
    --fs-xl: 20px;               /* large card titles */
    --fs-2xl: 24px;              /* panel titles */
    --fs-h2: clamp(28px, 3.4vw, 40px);

    /* Spacing */
    --section-y: clamp(56px, 7vw, 96px);   /* vertical padding of every section */
    --gap: 24px;                            /* default grid gap */

    /* Radii: small controls -> cards -> large panels */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(var(--ink-rgb), 0.05), 0 2px 8px rgba(var(--ink-rgb), 0.04);
    --shadow-sm: 0 4px 14px rgba(var(--ink-rgb), 0.07);
    --shadow-md: 0 10px 26px rgba(var(--ink-rgb), 0.10);
    --shadow-lg: 0 18px 44px rgba(var(--ink-rgb), 0.14);
    --shadow: var(--shadow-sm);
    --shadow-lg-legacy: var(--shadow-md);
    --shadow-accent: 0 8px 20px rgba(var(--accent-rgb), 0.35);       /* gold buttons */
    --shadow-accent-lg: 0 12px 26px rgba(var(--accent-rgb), 0.45);   /* gold buttons on hover */
    --shadow-panel: 0 30px 60px rgba(4, 18, 36, 0.3);                /* forms on navy */

    /* Focus ring: one look for every keyboard focus */
    --ring: 0 0 0 3px rgba(var(--accent-rgb), 0.55);
    --ring-soft: 0 0 0 4px rgba(18, 63, 115, 0.12);

    /* Layout */
    --container-width: 1240px;
    --transition: 280ms cubic-bezier(.4,0,.2,1);
    --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;   /* anchors land below the sticky header */
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* One focus style for everything that can be reached with the keyboard */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: rgba(var(--accent-rgb), 0.35);
    color: var(--primary-darker);
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h4, h5, h6 {
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

ul {
    list-style: none;
}

p {
    color: var(--text-light);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header & Navigation
   Optional deep-navy utility strip (contact details / social links that are
   filled in under Settings) above a white bar with the crest, the main menu
   and the gold Apply button. The whole header is sticky; when the utility
   strip exists it scrolls out of view and only the white bar stays pinned.
   Below 1280px the menu becomes a slide-in drawer from the right.
   ======================================== */
.skip-link {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 2000;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    transition: box-shadow var(--transition);
}

.site-header:has(.utility-bar) {
    top: -40px;
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-md);
}

/* ---- Utility strip ---- */
.utility-bar {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--fs-sm);
}

.utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 40px;
}

.utility-info {
    display: flex;
    align-items: center;
    gap: 6px 26px;
    min-width: 0;
    overflow: hidden;
}

.utility-info li,
.utility-info a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    white-space: nowrap;
}

.utility-info i {
    color: var(--accent);
    font-size: var(--fs-xs);
}

.utility-info a:hover {
    color: var(--white);
}

.utility-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.utility-social a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-xs);
}

.utility-social a:hover {
    background: var(--accent);
    color: var(--on-accent);
}

/* ---- Main bar ---- */
.main-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.main-bar .container {
    max-width: 1360px;
}

.main-bar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 82px;
    transition: min-height var(--transition);
}

.site-header.is-scrolled .main-bar-inner {
    min-height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
}

.brand-logo {
    width: 60px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    transition: width var(--transition), height var(--transition);
}

.site-header.is-scrolled .brand-logo {
    width: 52px;
    height: 48px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.brand-text strong {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-lg);
    color: var(--primary-dark);
    white-space: nowrap;
}

.brand-text small {
    margin-top: 3px;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.site-nav > a,
.nav-dropdown-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 11px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.site-nav > a:focus-visible,
.nav-dropdown-trigger:focus-visible,
.nav-dropdown-panel a:focus-visible,
.apply-btn:focus-visible,
.nav-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.nav-caret {
    font-size: 10px;
    opacity: .7;
    transition: transform var(--transition);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    display: flex;
    flex-direction: column;
}

.nav-dropdown-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: var(--fs-body-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown-panel a i {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--soft-sage);
    color: var(--primary);
    font-size: var(--fs-sm);
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a.is-active {
    background: var(--cream);
    color: var(--primary-dark);
}

.nav-dropdown-panel a:hover i,
.nav-dropdown-panel a.is-active i {
    background: var(--primary);
    color: var(--white);
}

.nav-drawer-head,
.site-nav .nav-drawer-apply {
    display: none;
}

.main-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--on-accent);
    font-size: var(--fs-body-sm);
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow-accent);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.apply-btn i {
    font-size: var(--fs-xs);
    transition: transform var(--transition);
}

.apply-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-lg);
}

.apply-btn:hover i {
    transform: translateX(3px);
}

/* ---- Hamburger + drawer backdrop ---- */
.nav-toggle {
    display: none;
    position: relative;
    z-index: 1202;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
}

.nav-toggle-bar {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-dark);
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(4, 18, 36, 0.55);
}

/* ---- Desktop menu: underline indicator + hover dropdowns ---- */
@media (min-width: 1024px) {
    .site-nav > a::after,
    .nav-dropdown-trigger::after {
        content: '';
        position: absolute;
        left: 11px;
        right: 11px;
        bottom: 3px;
        height: 3px;
        border-radius: 3px;
        background: var(--accent);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--transition);
    }

    .site-nav > a:hover,
    .site-nav > a.is-active,
    .nav-dropdown:hover .nav-dropdown-trigger,
    .nav-dropdown:focus-within .nav-dropdown-trigger,
    .nav-dropdown.is-open .nav-dropdown-trigger,
    .nav-dropdown.is-active .nav-dropdown-trigger {
        color: var(--primary);
    }

    .site-nav > a:hover::after,
    .site-nav > a.is-active::after,
    .nav-dropdown:hover .nav-dropdown-trigger::after,
    .nav-dropdown.is-open .nav-dropdown-trigger::after,
    .nav-dropdown.is-active .nav-dropdown-trigger::after {
        transform: scaleX(1);
    }

    .nav-dropdown:hover .nav-caret,
    .nav-dropdown:focus-within .nav-caret,
    .nav-dropdown.is-open .nav-caret {
        transform: rotate(180deg);
    }

    .nav-dropdown-panel {
        position: absolute;
        top: calc(100% + 12px);
        left: 50%;
        z-index: 1001;
        min-width: 250px;
        padding: 10px;
        background: var(--white);
        border: 1px solid var(--border);
        border-top: 3px solid var(--accent);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, 8px);
        transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }

    /* invisible bridge so the panel stays open while the pointer crosses the gap */
    .nav-dropdown-panel::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: -16px;
        height: 16px;
    }

    .nav-dropdown:hover .nav-dropdown-panel,
    .nav-dropdown:focus-within .nav-dropdown-panel,
    .nav-dropdown.is-open .nav-dropdown-panel {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
}

/* ---- Drawer menu ---- */
@media (max-width: 1023.98px) {
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1201;
        width: min(360px, 88vw);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 18px 22px 28px;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 360ms cubic-bezier(.4,0,.2,1), visibility 0s linear 360ms;
    }

    .site-nav.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 360ms cubic-bezier(.4,0,.2,1), visibility 0s;
    }

    .nav-backdrop.is-open { display: block; }

    .nav-drawer-head {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 50px;
        padding: 0 60px 16px 0;
        margin-bottom: 6px;
        border-bottom: 2px solid var(--accent);
    }

    .nav-drawer-head img { width: 43px; height: 40px; object-fit: contain; }

    .nav-drawer-head strong {
        font-family: var(--font-display);
        font-size: var(--fs-body);
        line-height: 1.25;
        color: var(--primary-dark);
    }

    .site-nav > a,
    .nav-dropdown-trigger {
        width: 100%;
        min-height: 52px;
        padding: 0 6px;
        justify-content: space-between;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        font-size: var(--fs-md);
        text-align: left;
    }

    .site-nav > a.is-active,
    .nav-dropdown.is-active > .nav-dropdown-trigger {
        color: var(--primary);
        box-shadow: inset 4px 0 0 var(--accent);
        padding-left: 16px;
    }

    .nav-dropdown { width: 100%; }

    .nav-dropdown-panel {
        display: none;
        padding: 6px 0 10px 8px;
        border-bottom: 1px solid var(--border);
    }

    .nav-dropdown.is-open .nav-dropdown-panel { display: flex; }
    .nav-dropdown.is-open .nav-caret { transform: rotate(180deg); }

    .nav-dropdown-panel a { min-height: 46px; font-size: var(--fs-body); }

    .site-nav > a.nav-drawer-apply {
        display: flex;
        justify-content: center;
        width: 100%;
        min-height: 52px;
        margin-top: 22px;
        padding: 0 24px;
        border: 0;
        border-radius: var(--radius-pill);
        background: var(--accent);
        color: var(--on-accent);
        font-weight: 700;
        box-shadow: var(--shadow-accent);
    }
}

@media (max-width: 760px) {
    .utility-hours { display: none; }
}

@media (max-width: 600px) {
    .main-bar-inner { min-height: 68px; gap: 12px; }
    .site-header.is-scrolled .main-bar-inner { min-height: 62px; }
    .brand { gap: 9px; }
    .brand-logo,
    .site-header.is-scrolled .brand-logo { width: 46px; height: 43px; }
    .brand-text strong { font-size: var(--fs-body-sm); white-space: normal; }
    .brand-text small { display: none; }
    .apply-btn { padding: 10px 16px; font-size: var(--fs-sm); }
    .apply-btn i { display: none; }
    .utility-info a[href^="mailto:"] { display: none; }
}

@media (max-width: 400px) {
    .apply-btn { display: none; }
}

/* ========================================
   Eyebrow / Badge
   ======================================== */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.eyebrow.on-dark {
    background: rgba(255,255,255,0.12);
    color: var(--white);
}

/* Inner-page hero: left-aligned text over a photo that fades to deep navy on the left.
   Breadcrumb, label, title, accent line and subtitle rise in one after another on load,
   and the photo drifts in slowly. Visitors who ask for reduced motion get it static. */
.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 380px;
    padding: 72px 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--primary-dark);
    border-bottom: 4px solid var(--accent);
}

.page-hero.is-compact {
    min-height: 320px;
    padding: 58px 0;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transform-origin: 75% center;
    animation: pageHeroZoom 22s ease-out forwards;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(var(--overlay-rgb), 0.95) 0%, rgba(var(--overlay-rgb), 0.84) 42%, rgba(var(--overlay-rgb), 0.38) 100%);
}

.page-hero .container {
    width: 100%;
}

.page-hero-content {
    max-width: 700px;
    text-align: left;
}

.page-hero-content > *:not(.page-hero-line) {
    opacity: 0;
    animation: pageHeroIn .85s cubic-bezier(.2, .7, .2, 1) forwards;
}

.page-hero-content > :nth-child(1) { animation-delay: .10s; }
.page-hero-content > :nth-child(2) { animation-delay: .24s; }
.page-hero-content > :nth-child(3) { animation-delay: .38s; }
.page-hero-content > :nth-child(5) { animation-delay: .70s; }

/* breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: var(--white);
    font-weight: 600;
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary);
}

.breadcrumb i.fa-chevron-right {
    font-size: 9px;
    opacity: .6;
}

.breadcrumb [aria-current] {
    color: var(--secondary);
    font-weight: 600;
}

.page-hero .eyebrow {
    margin-bottom: 0;
}

.page-hero h1 {
    margin: 16px 0 14px;
    font-family: var(--font-display);
    font-size: clamp(32px, 4.4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--white);
}

.page-hero-line {
    display: block;
    width: 0;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 4px;
    background: var(--accent);
    animation: pageHeroLine .9s .55s cubic-bezier(.2, .7, .2, 1) forwards;
}

.page-hero p {
    max-width: 620px;
    margin: 0;
    font-size: var(--fs-lg);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes pageHeroIn {
    from { opacity: 0; transform: translate3d(0, 24px, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes pageHeroLine {
    to { width: 72px; }
}

@keyframes pageHeroZoom {
    from { transform: scale(1.02); }
    to   { transform: scale(1.12); }
}

@media (max-width: 768px) {
    .page-hero,
    .page-hero.is-compact {
        min-height: 280px;
        padding: 50px 0;
    }

    .page-hero::before {
        background: rgba(var(--overlay-rgb), 0.82);
    }

    .page-hero p { font-size: var(--fs-md); }
    .breadcrumb { margin-bottom: 14px; font-size: var(--fs-sm); }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero-bg { animation: none; }
    .page-hero-content > *:not(.page-hero-line) { opacity: 1; animation: none; }
    .page-hero-line { width: 72px; animation: none; }
}

/* ==========================================================================
   Homepage hero: background photos (Home Slider) crossfade behind one fixed
   headline. A deep-navy shade keeps the text readable on any photo.
   ========================================================================== */
.home-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(580px, 84vh, 780px);
    padding: 110px 0 160px;
    overflow: hidden;
    background: var(--primary-dark);
    color: var(--white);
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide picture,
.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    object-fit: cover;
    object-position: 72% center;
}

.hero-slide.is-active img {
    animation: heroZoom 9s ease-out both;
}

@keyframes heroZoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(var(--overlay-rgb), 0.97) 0%, rgba(var(--overlay-rgb), 0.9) 36%, rgba(var(--overlay-rgb), 0.45) 68%, rgba(var(--overlay-rgb), 0.2) 100%),
        linear-gradient(0deg, rgba(var(--overlay-rgb), 0.7) 0%, transparent 38%);
}

.hero-inner {
    position: relative;
    width: 100%;
}

.hero-copy {
    max-width: 660px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 6px 18px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--white);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .03em;
}

.hero-eyebrow img {
    width: 28px;
    height: 26px;
    object-fit: contain;
}

.hero-title {
    margin-bottom: 22px;
    color: var(--white);
    font-size: clamp(38px, 5.4vw, 66px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.text-gold {
    color: var(--accent);
}

.hero-text {
    max-width: 570px;
    margin-bottom: 36px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 1.45vw, 19px);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    max-width: 580px;
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: var(--fs-body);
    font-weight: 600;
}

.hero-points i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--accent);
    font-size: var(--fs-body-sm);
}

/* entrance: label, headline, text, buttons and highlights rise in one after another */
.hero-copy > * {
    animation: heroRise .9s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-copy > :nth-child(2) { animation-delay: .12s; }
.hero-copy > :nth-child(3) { animation-delay: .24s; }
.hero-copy > :nth-child(4) { animation-delay: .36s; }
.hero-copy > :nth-child(5) { animation-delay: .48s; }

@keyframes heroRise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

/* slider controls: arrows + dots, bottom right, clear of the quick-link cards */
.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - var(--container-width)) / 2 + 24px));
    bottom: 96px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hero-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width var(--transition), background var(--transition);
}

/* larger touch target than the visible dot */
.hero-dot::after {
    content: '';
    position: absolute;
    inset: -10px -4px;
}

.hero-dot.is-active {
    width: 30px;
    background: var(--accent);
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.hero-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
}

.hero-slider.is-running .hero-progress span {
    animation: heroProgress var(--hero-interval, 5000ms) linear forwards;
}

.hero-slider.is-hovered .hero-progress span {
    animation-play-state: paused;
}

@keyframes heroProgress {
    to { width: 100%; }
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 0;
        padding: 64px 0 130px;
    }

    .hero-shade {
        background:
            linear-gradient(180deg, rgba(var(--overlay-rgb), 0.78) 0%, rgba(var(--overlay-rgb), 0.9) 55%, rgba(var(--overlay-rgb), 0.97) 100%);
    }

    .hero-slide img { object-position: 78% center; }

    .hero-actions .btn { flex: 1 1 100%; }

    .hero-points { gap: 12px 20px; margin-top: 30px; }

    .hero-controls {
        left: 50%;
        right: auto;
        bottom: 84px;
        transform: translateX(-50%);
    }

    .hero-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
    .hero-slide.is-active img,
    .hero-copy > * { animation: none; }
}

.about-media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-copy h2 {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--ink);
    margin: 14px 0 16px;
    line-height: 1.2;
}

.about-points {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.about-values {
    margin-bottom: 32px;
}

.about-values h3 {
    font-size: var(--fs-body);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.about-values ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.about-values li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: var(--fs-body-sm);
    font-weight: 600;
    color: var(--primary-dark);
}

.about-values li i {
    color: var(--accent-ink);
    font-size: var(--fs-sm);
}

@media (max-width: 900px) {

    .about-media img {
        aspect-ratio: 16 / 10;
    }
}

/* Why Choose Us: 3-column feature cards with a soft icon tile that fills on hover */
.card-grid.why-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.why-grid .card {
    padding: 32px 28px;
    overflow: hidden;
}

.why-grid .card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    box-shadow: inset 0 3px 0 var(--accent-color), var(--shadow-md);
}

.why-grid .card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    box-shadow: none;
    font-size: var(--fs-2xl);
    transition: background var(--transition), color var(--transition);
}

.why-grid .card:hover .card-icon {
    background: var(--primary-color);
    color: var(--white);
}

.why-grid .card h3 {
    font-size: var(--fs-xl);
    margin-bottom: 8px;
}

.why-grid .card p {
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--text-light);
}

@media (max-width: 960px) {
    .card-grid.why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .card-grid.why-grid { grid-template-columns: 1fr; }
}

/* Academics: four level cards */
.card-grid.level-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .card-grid.level-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .card-grid.level-grid { grid-template-columns: 1fr; }
}

.admissions-intro {
    padding: 56px 48px;
    color: var(--white);
}

.admissions-intro h2 {
    color: var(--white);
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    margin: 16px 0;
}

.admissions-intro > p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--fs-lg);
    line-height: 1.75;
    margin-bottom: 28px;
}

.admissions-intro .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 32px;
}

.admissions-details {
    background: var(--surface);
    padding: 48px;
}

.admissions-details h3 {
    font-size: var(--fs-lg);
    color: var(--ink);
    margin-bottom: 18px;
}

.admissions-steps {
    list-style: none;
    counter-reset: adm-step;
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.admissions-steps li {
    counter-increment: adm-step;
    position: relative;
    padding-left: 52px;
}

.admissions-steps li::before {
    content: counter(adm-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-soft);
    border: 1px solid var(--border-color);
    color: var(--primary-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admissions-steps strong {
    display: block;
    color: var(--ink);
    font-size: var(--fs-md);
}

.admissions-steps span {
    font-size: var(--fs-body-sm);
    color: var(--text-light);
    line-height: 1.6;
}

.admissions-docs {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.admissions-docs li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: var(--fs-body);
    color: var(--text-dark);
}

.admissions-docs i {
    color: var(--primary-color);
    margin-top: 4px;
}

@media (max-width: 960px) {
    .admissions-intro,
    .admissions-details { padding: 36px 24px; }
}

/* Campus Life tiles */
.campus-life-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 960px) {
    .campus-life-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .campus-life-grid { grid-template-columns: 1fr; }
}

/* News & Events cards */
.card-grid.update-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card.update-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

@media (max-width: 960px) {
    .card-grid.update-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .card-grid.update-grid { grid-template-columns: 1fr; }
}

/* anchored entries on events.php should clear the sticky header */
[id^="event-"], [id^="news-"] {
    scroll-margin-top: 150px;
}

.cta-band-inner {
    max-width: 760px;
    margin: 0 auto;
}

/* Campus Life photo cards (one per gallery category) */
.life-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.life-photo {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    background: var(--soft-sage);
    transition: box-shadow var(--transition), transform var(--transition);
}

.life-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.life-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--overlay-rgb), 0.82) 0%, rgba(var(--overlay-rgb), 0) 55%);
}

.life-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.life-photo:hover img {
    transform: scale(1.04);
}

@media (max-width: 960px) {
    .life-photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Courses page: academic path, stage sections, course cards, requirements
   ========================================================================== */
.path-section {
    background: var(--white);
    padding-bottom: 40px;
}

.path-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 22px;
    counter-reset: path;
    position: relative;
}

.path-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 30px 18px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.path-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-line);
}

.path-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: var(--fs-body-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px var(--white);
}

.path-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.path-step:hover .path-icon {
    transform: translateY(-2px);
}

.path-step strong {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    color: var(--ink);
}

.path-step small {
    font-size: var(--fs-sm);
    color: var(--text-light);
}

/* connecting line between the steps on wide screens */
@media (min-width: 900px) {
    .path-steps::before {
        content: '';
        position: absolute;
        left: 8%;
        right: 8%;
        top: 1px;
        border-top: 2px dashed var(--border);
        z-index: 0;
    }
    .path-step { z-index: 1; }
}

.stage-section {
    scroll-margin-top: 140px;
}

/* course cards */
.course-list {
    display: grid;
    gap: 26px;
}

.course-list.is-multi {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}

.course-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-line);
}

.course-card.is-wide {
    grid-template-columns: 1.05fr 1fr;
}

/* side-by-side cards: the subject lists start on the same line whatever the title length */
.course-list.is-multi .course-card {
    grid-template-rows: 1fr auto;
}

.course-main {
    padding: 32px 32px 28px;
    display: flex;
    flex-direction: column;
}

.course-head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.course-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.course-card:hover .course-icon {
    transform: rotate(-6deg) scale(1.06);
}

.course-head h3 {
    font-size: var(--fs-xl);
    line-height: 1.25;
    margin: 0 0 6px;
}

.course-classes {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--soft-sage);
    color: var(--primary-dark);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .02em;
}

.course-desc {
    flex: 1;
    font-size: var(--fs-body);
    line-height: 1.75;
    color: var(--text-light);
    margin-bottom: 22px;
}

.course-apply {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: var(--fs-body-sm);
    color: var(--primary-dark);
    transition: color var(--transition), gap var(--transition);
}

.course-apply:hover {
    color: var(--accent-ink);
    gap: 14px;
}

.course-side {
    padding: 32px;
    background: var(--cream);
    border-top: 1px solid var(--border);
}

.course-card.is-wide .course-side {
    border-top: 0;
    border-left: 1px solid var(--border);
}

.course-side h4 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--primary-dark);
    margin-bottom: 14px;
}

.course-subjects {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
}

.course-subjects li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: var(--fs-body-sm);
    line-height: 1.45;
    color: var(--text);
}

.course-subjects i {
    flex-shrink: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-list.is-multi .course-subjects {
    grid-template-columns: 1fr;
}

/* admission requirements */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 26px;
    max-width: 760px;
    margin: 0 auto;
}

.req-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.req-head .card-icon {
    margin: 0;
    width: 50px;
    height: 50px;
    font-size: var(--fs-xl);
}

.req-head h3 {
    margin: 0;
}

.req-list {
    list-style: none;
}

.req-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-body);
}

.req-list li:last-child {
    border-bottom: 0;
}

.req-list i {
    color: var(--primary);
}

@media (max-width: 900px) {
    .course-card.is-wide { grid-template-columns: 1fr; }
    .course-card.is-wide .course-side { border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 520px) {
    .course-main, .course-side { padding: 24px 22px; }
    .course-subjects { grid-template-columns: 1fr; }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: var(--fs-body);
    letter-spacing: .01em;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Primary: navy (deep navy keeps white text above 4.5:1 contrast) */
.btn-primary {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-darker);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary: gold, for conversion actions such as Apply Now */
.btn-secondary {
    background: var(--accent-color);
    color: var(--on-accent);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--accent-dark);
    color: var(--on-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Outline on light backgrounds: navy border */
.btn-outline-dark {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

.btn-outline-dark:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Outline on deep navy sections: white border (an navy border would disappear) */
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Safety net: an navy primary button on a deep navy section would vanish,
.page-hero .btn-primary,
.admissions-intro .btn-primary {
    background: var(--white);
    color: var(--primary-dark);
}

.page-hero .btn-primary:hover,
.admissions-intro .btn-primary:hover {
    background: var(--primary-soft);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: var(--section-y) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: var(--fs-h2);
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-light);
    font-size: var(--fs-lg);
    max-width: 700px;
    margin: 0 auto;
}

.bg-light { background: var(--bg-light); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 30px; }

/* ========================================
   Cards
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 30px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-line);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: var(--fs-2xl);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--ink);
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-light);
    line-height: 1.75;
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    background: var(--primary-dark);
    color: var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    position: relative;
    padding: 8px 0;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 12%;
    bottom: 12%;
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
}

.stat-item h3 {
    font-size: 46px;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-item p {
    font-size: var(--fs-body);
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .stat-item + .stat-item::before { display: none; }
    .stat-value { font-size: 38px; }
}

/* ========================================
   Form Styles
   ======================================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: var(--fs-body-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--fs-md);   /* 16px: anything smaller makes iPhones zoom in on tap */
    line-height: 1.5;
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring-soft);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   Testimonial Carousel
   ======================================== */
.testimonial-carousel {
    position: relative;
    padding: 0 10px;
}

.testimonial-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 6px 6px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonial-track::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    position: relative;
    flex: 0 0 360px;
    scroll-snap-align: start;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 30px 28px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition), transform var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    color: var(--accent-color);
    margin-bottom: 14px;
    font-size: var(--fs-body-sm);
    letter-spacing: 2px;
}

.testimonial-quote {
    margin: 0 0 24px;
    color: var(--text-dark);
    font-size: var(--fs-body);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
}

.testimonial-author strong {
    display: block;
    color: var(--ink);
    font-size: var(--fs-body-sm);
}

.testimonial-author span {
    color: var(--text-light);
    font-size: var(--fs-xs);
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: var(--fs-lg);
    z-index: 2;
    transition: all var(--transition);
}

.testimonial-nav:hover {
    background: var(--primary-color);
    color: var(--white);
}

.testimonial-nav.prev {
    left: -14px;
}

.testimonial-nav.next {
    right: -14px;
}

@media (max-width: 768px) {
    .testimonial-nav {
        display: none;
    }

    .testimonial-card {
        flex-basis: 290px;
    }
}

/* ========================================
   Alerts (form success/error feedback)
   ======================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert i {
    font-size: var(--fs-2xl);
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error-border);
}

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item.is-open {
    box-shadow: var(--shadow-sm);
    border-color: transparent;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-md);
    color: var(--ink);
    cursor: pointer;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq-item.is-open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.is-open .faq-answer {
    max-height: 400px;
}

/* ==========================================================================
   Motion: scroll reveal, stagger, count-up, scroll progress, back-to-top
   Elements are hidden only when JavaScript is running (html.js), and not at all
   for visitors who ask their system for reduced motion.
   ========================================================================== */
.js .reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity .7s var(--ease-out) var(--delay, 0s),
                transform .7s var(--ease-out) var(--delay, 0s);
    will-change: opacity, transform;
}

.js .reveal-left  { transform: translate3d(-24px, 0, 0); }
.js .reveal-right { transform: translate3d(24px, 0, 0); }
.js .reveal-zoom  { transform: scale(.97); }

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* on narrow screens nothing slides in sideways (it would widen the page); it just fades up */
@media (max-width: 900px) {
    .js .reveal-left,
    .js .reveal-right { transform: translate3d(0, 18px, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal,
    .js .reveal-left,
    .js .reveal-right,
    .js .reveal-zoom {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* section headings: the small label pops in and an accent bar grows under the title */
.section-header h2 {
    position: relative;
    padding-bottom: 18px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 4px;
    border-radius: 4px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width .7s var(--ease-out) .25s;
}

.section-header.is-visible h2::after,
.section-header:not(.reveal) h2::after {
    width: 48px;
}

@media (prefers-reduced-motion: reduce) {
    .section-header h2::after { width: 48px; transition: none; }
}

/* small micro-interactions on hover */
.card .card-icon,
.quick-card .quick-icon {
    transition: transform .4s cubic-bezier(.2, .7, .2, 1), background var(--transition);
}

.card:hover .card-icon,
.quick-card:hover .quick-icon {
    transform: translateY(-2px);
}

.about-values li {
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.about-values li:hover {
    transform: translateY(-3px);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

/* reading-progress line at the very top of the page */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 1300;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* back-to-top button */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1150;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--primary-dark);
    color: var(--white);
    font-size: var(--fs-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}

.back-to-top.is-shown {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    background: var(--accent);
    color: var(--on-accent);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

/* ==========================================================================
   Quick links strip (under the hero)
   ========================================================================== */
.quick-strip {
    padding: 40px 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-line);
}

.quick-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xl);
}

.quick-card:hover .quick-icon {
    background: var(--accent);
    color: var(--on-accent);
}

.quick-text {
    flex: 1;
    min-width: 0;
}

.quick-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: var(--fs-md);
    color: var(--ink);
    margin-bottom: 2px;
}

.quick-text span {
    display: block;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--text-light);
}

.quick-arrow {
    color: var(--primary);
    font-size: var(--fs-body-sm);
    transition: transform var(--transition), color var(--transition);
}

.quick-card:hover .quick-arrow {
    transform: translateX(5px);
    color: var(--accent-ink);
}

@media (max-width: 1100px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .quick-strip { padding: 28px 0; }
    .quick-grid { grid-template-columns: 1fr; gap: 14px; }
    .back-to-top { right: 14px; bottom: 14px; }
}

/* Responsive Design */

/* Tablet Landscape and Below (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 clamp(16px, 3vw, 24px);
    }

    .grid-2,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 42px !important;
    }

    .hero p {
        font-size: 18px !important;
    }

    .hero .container {
        padding: 0 20px !important;
    }

    .nav-links a {
        padding: 15px 13px;
        font-size: var(--fs-xs);
    }

    .brand-text small {
        display: none;
    }
}

/* Tablet Portrait and Below (768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero {
        padding: 60px 0 !important;
        min-height: 440px !important;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .hero .tagline {
        font-size: 20px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px !important;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Grid utilities */
    .grid-2,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 34px;
    }

    .stat-item p {
        font-size: var(--fs-body-sm);
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 26px;
    }

    .section-header p {
        font-size: var(--fs-md);
    }

    /* Card Grid */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Legacy inline-style pages - two column layouts collapse on mobile */
    section [style*="grid-template-columns: 1fr 1fr"],
    section [style*="grid-template-columns: 350px 1fr"],
    section [style*="grid-template-columns: 1fr 350px"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Campus detail rows (campuses.php) - class-based, not tied to a
       specific pixel value like the legacy attribute-selector rules above */
    .campus-row {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Keep the image first on mobile regardless of desktop left/right order */
    .campus-row-reverse > div:first-child {
        order: 2;
    }

    .campus-row-reverse > div:last-child {
        order: 1;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:first-child {
        order: 2;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:last-child {
        order: 1;
    }

    section [style*="grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Only (480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px !important;
    }

    .hero .tagline {
        font-size: 18px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .section-header h2 {
        font-size: var(--fs-2xl);
    }

    .btn {
        padding: 12px 25px !important;
        font-size: 14px !important;
    }

    .card {
        padding: 24px 20px;
    }

    .card h3 {
        font-size: var(--fs-xl);
    }

    section [style*="width: 250px; height: 250px"] {
        width: 180px !important;
        height: 180px !important;
        font-size: 60px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: var(--fs-md); /* Prevents zoom on iOS */
    }

}

/* ==========================================================================
   Homepage polish: section rhythm, notice bar, philosophy band, campuses,
   FAQ + contact pairing
   ========================================================================== */

/* Two neighbouring sections with the same background read as one block,
   so the second one drops its top padding instead of doubling the gap */
.bg-light + .bg-light,
section:not([class]) + section:not([class]) {
    padding-top: 0;
}

.stats { padding: clamp(44px, 5vw, 64px) 0; }

/* Scrolling notices under the quick links */

.notice-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.notice-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.notification-ticker {
    display: flex;
    white-space: nowrap;
    animation: notice-scroll 30s linear infinite;
}

.notification-ticker:hover { animation-play-state: paused; }

.notice-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 40px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.notice-item i { font-size: 6px; color: var(--accent-ink); }
a.notice-item:hover { color: var(--primary-dark); }

@keyframes notice-scroll {
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .notification-ticker { animation: none; }
}

/* Campus Life: a few categories sit centred instead of hugging the left */
.life-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 280px));
    justify-content: center;
}

@media (max-width: 600px) {
    .notice-label { font-size: var(--fs-xs); padding: 10px 14px; }
}

/* ==========================================================================
   Leadership messages (includes/leadership_section.php)
   ========================================================================== */
.leader-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 40px;
    padding: 50px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.leader-card:last-child { margin-bottom: 0; }

/* Photo on the right for every second message */
.leader-card-reverse { grid-template-columns: 1fr 300px; }
.leader-card-reverse .leader-profile { order: 2; }

.leader-profile { text-align: center; }

.leader-photo {
    position: relative;
    width: 230px;
    height: 230px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.leader-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Fallback icon, covered by the photo when one loads */
.leader-photo .fa-user-tie { font-size: 72px; color: var(--white); }

.leader-profile h3 {
    color: var(--primary-dark);
    font-size: var(--fs-2xl);
    margin-bottom: 4px;
}

.leader-name {
    color: var(--text);
    font-weight: 700;
    font-size: var(--fs-xl);
    margin-bottom: 4px;
}

.leader-designation {
    color: var(--text-light);
    font-size: var(--fs-body-sm);
    line-height: 1.6;
}

.leader-message {
    position: relative;
    padding-left: 30px;
    border-left: 4px solid var(--accent);
}

.leader-quote {
    position: absolute;
    top: -10px;
    left: -20px;
    font-size: 40px;
    color: var(--accent);
    opacity: .3;
}

.leader-text {
    font-size: var(--fs-md);
    line-height: 1.8;
    color: var(--text);
}

.leader-sign {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.leader-sign img { height: 50px; margin-bottom: 10px; }

.leader-sign-name {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: var(--fs-md);
}

/* ==========================================================================
   Responsive layer
   Laptop (≤1180) · Tablet (≤960) · Small tablet / large phone (≤768) · Phone (≤600)
   ========================================================================== */

/* Laptop: slightly tighter two-column blocks */
@media (max-width: 1180px) {
    .leader-card { grid-template-columns: 240px 1fr; gap: 36px; padding: 40px; }
    .leader-card-reverse { grid-template-columns: 1fr 240px; }
    .leader-photo { width: 200px; height: 200px; }
    .grid-2 { gap: 36px; }
}

/* Tablet: four-across grids become two-across */
@media (max-width: 960px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .card-grid.level-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .faq-contact { grid-template-columns: 1fr; }
}

/* Small tablet / large phone: stack the leadership cards, photo first */
@media (max-width: 768px) {
    .leader-card,
    .leader-card-reverse {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 24px;
    }

    .leader-card-reverse .leader-profile { order: 0; }
    .leader-photo { width: 170px; height: 170px; }

    /* Quote mark sits above the text instead of eating the left margin */
    .leader-message { padding-left: 18px; }
    .leader-quote { position: static; display: block; font-size: 30px; margin-bottom: 8px; }
    .leader-text { font-size: var(--fs-body); line-height: 1.75; }

    .assessment-panel { padding: 28px 22px; gap: 22px; }
}

/* Phone */
@media (max-width: 600px) {
    /* Stats: 2 × 2 instead of one long column */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 28px 12px; }
    .stat-item h3 { font-size: 30px; }
    .stat-item p { font-size: var(--fs-xs); letter-spacing: .04em; }

    /* Feature cards: icon beside the text, so the list is half as long */
    .why-grid .card,
    .grid-4 .card:not(.text-center) {
        display: grid;
        grid-template-columns: 48px 1fr;
        column-gap: 16px;
        padding: 22px 20px;
    }

    .why-grid .card .card-icon,
    .grid-4 .card:not(.text-center) .card-icon {
        grid-row: span 2;
        width: 48px;
        height: 48px;
        font-size: var(--fs-xl);
        margin: 0;
    }

    .why-grid .card h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
    .why-grid .card p { font-size: var(--fs-body-sm); }

    .grid-4 { grid-template-columns: 1fr; gap: 16px; }
    .card-grid.level-grid { grid-template-columns: 1fr; }

    .philosophy-inner p { font-size: var(--fs-md); }
    .faq-question { padding: 16px 18px; font-size: var(--fs-body); }
    .faq-answer p { padding: 0 18px 16px; }
    .faq-form-card { padding: 24px 18px; }
}
.fee-amount { font-weight: 700; color: var(--primary-dark); white-space: nowrap; }

@media (max-width: 600px) {
    /* Older pages set large paddings inline; give phones their width back */
    .card[style*="padding: 40px"] {
        padding: 24px 18px !important;
    }
}

/* Events: news cards */
@media (max-width: 600px) {
    .news-body { padding: 22px 18px !important; }
    .news-head h3 { font-size: var(--fs-xl); }
}

/* Downloads: each row becomes a small card on phones */
@media (max-width: 600px) {
    .downloads-table thead { display: none; }
    .downloads-table,
    .downloads-table tbody,
    .downloads-table tr,
    .downloads-table td { display: block; width: 100%; }
    .downloads-table tr { padding: 14px 4px; }
    .downloads-table td { padding: 6px 14px !important; text-align: left !important; }
    .downloads-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: var(--fs-xs);
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 2px;
    }
    .downloads-table .download-action .btn { width: 100%; justify-content: center; }
}

/* Tablets (601–768px): buttons keep their natural width and sit side by side;
   only phones get full-width stacked buttons */
@media (min-width: 601px) and (max-width: 768px) {
    .btn { width: auto; }
    .btn-group { flex-direction: row; flex-wrap: wrap; }
}

/* ==========================================================================
   Consistency layer: shared components used across inner pages
   ========================================================================== */

/* Every form control uses the site font (some forms sit outside .form-group) */
input, select, textarea, button { font-family: inherit; }

/* Empty list placeholder (renderEmptyState) */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--soft-sage);
    color: var(--primary-dark);
    font-size: var(--fs-2xl);
}

.empty-state h3 { font-size: var(--fs-xl); margin-bottom: 6px; color: var(--text); }
.empty-state p { color: var(--text-light); max-width: 420px; margin: 0 auto; }

/* Admission requirements (courses.php): all three cards in one row on wide screens */
.req-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    max-width: none;
}

/* Visible keyboard focus everywhere, in the brand colour */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Photo gallery, lightbox and videos (gallery.php)
   ========================================================================== */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: var(--fs-body-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.gallery-filter span {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: var(--soft-sage);
    color: var(--primary-dark);
    font-size: var(--fs-xs);
}

.gallery-filter:hover { border-color: var(--primary); }

.gallery-filter.is-active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.gallery-filter.is-active span { background: rgba(255, 255, 255, 0.2); color: var(--white); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

.gallery-item {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--soft-sage);
    box-shadow: var(--shadow-xs);
}

.gallery-item[hidden] { display: none; }

.gallery-link { display: block; position: relative; }

.gallery-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-link:hover .gallery-img,
.gallery-link:focus-visible .gallery-img { transform: scale(1.06); }

.gallery-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    font-size: var(--fs-body);
    opacity: 0;
    transform: scale(.8);
    transition: opacity var(--transition), transform var(--transition);
}

.gallery-link:hover .gallery-zoom,
.gallery-link:focus-visible .gallery-zoom { opacity: 1; transform: none; }

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 14px 12px;
    background: linear-gradient(to top, rgba(var(--overlay-rgb), 0.85), transparent);
    color: var(--white);
    font-size: var(--fs-body-sm);
    font-weight: 600;
    pointer-events: none;
}

/* Lightbox */
body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 56px 16px 24px;
    background: rgba(4, 18, 36, 0.94);
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
    margin: 0;
    max-width: min(1200px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.04);
}

.lightbox-figure figcaption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-body-sm);
}

.lightbox-count { color: rgba(255, 255, 255, 0.6); white-space: nowrap; }

.lightbox-close,
.lightbox-arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-size: var(--fs-lg);
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-arrow:hover { background: var(--accent); color: var(--on-accent); }

.lightbox-close { position: absolute; top: 14px; right: 14px; }

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-item { border-radius: var(--radius-md); }
    .gallery-caption { font-size: var(--fs-xs); padding: 20px 10px 8px; }
    .gallery-zoom { display: none; }
    .gallery-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
    .gallery-filters::-webkit-scrollbar { display: none; }
    .gallery-filter { flex: 0 0 auto; padding: 8px 14px; font-size: var(--fs-body-sm); }

    /* Arrows sit at the bottom corners on phones; swiping also works */
    .lightbox { padding: 56px 8px 84px; }
    .lightbox-arrow { position: absolute; bottom: 18px; }
    .lightbox-prev { left: 18px; }
    .lightbox-next { right: 18px; }
}

/* Videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 24px;
}

.video-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.video-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity var(--transition), transform .5s ease; }
.video-frame:hover img { opacity: 1; transform: scale(1.04); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: var(--fs-2xl);
    padding-left: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform var(--transition);
}

.video-frame:hover .video-play { transform: scale(1.08); }

.video-body { padding: 18px 20px 20px; }
.video-body h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.video-body p { color: var(--text-light); font-size: var(--fs-body-sm); margin: 0; }

/* Text for screen readers and search engines only (keeps the heading outline complete) */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Working hours list (contact.php, edited under Page Content) */
.hours-list { list-style: none; padding: 0; margin: 0; }
.hours-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.hours-list li:last-child { border-bottom: 0; }
.hours-day { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.hours-day i { color: var(--primary-color); width: 18px; text-align: center; }
.hours-closed { color: var(--error); font-weight: 600; }

/* Spam trap field on public forms: hidden from people (and screen readers), seen by bots */
.form-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Shared helpers used by the homepage and forms
   ========================================================================== */
.section-title {
    margin-bottom: 18px;
    font-size: clamp(28px, 3.4vw, 42px);
}

.lead {
    margin-bottom: 28px;
    color: var(--text-light);
    font-size: 17.5px;
    line-height: 1.8;
}

.is-placeholder {
    color: var(--muted);
    font-style: italic;
}

.btn-lg { padding: 16px 34px; font-size: var(--fs-md); }
.btn-sm { padding: 10px 20px; font-size: var(--fs-body-sm); }
.btn-block { width: 100%; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: var(--fs-body-sm);
    font-weight: 700;
    transition: gap var(--transition), color var(--transition);
}

.text-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* section header with the button on the right (news, gallery) */
.section-header-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 32px;
    text-align: left;
}

.section-header-split p {
    margin: 0;
}

.section-header-split h2::after {
    left: 0 !important;
    transform: none !important;
}

.section-header-split .btn {
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .section-header-split {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---- Forms: two-column rows, required markers, accessible error states ---- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-group .req { color: var(--error); }

.form-group .optional {
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23123F73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-color: var(--error);
    background-color: #fffafa;
}

.field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--error);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.form-card {
    position: relative;
    padding: clamp(24px, 3.5vw, 40px);
    border-top: 5px solid var(--accent);
    border-radius: var(--radius-xl);
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow-panel);
}

.form-card h3 {
    margin-bottom: 6px;
    font-size: var(--fs-2xl);
}

.form-card-text {
    margin-bottom: 22px;
    font-size: var(--fs-body);
}

.form-card .form-group {
    margin-bottom: 16px;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b9c6d6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a96a8;
}
.form-card textarea { min-height: 96px; }

.form-card .alert {
    align-items: flex-start;
    padding: 14px 16px;
    font-size: var(--fs-body-sm);
    line-height: 1.55;
}

.form-card .alert i { font-size: var(--fs-lg); margin-top: 1px; }

.form-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    text-align: center;
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Homepage sections
   ========================================================================== */

/* ---- Quick links overlapping the bottom of the hero ---- */
.quick-strip {
    position: relative;
    z-index: 3;
    margin-top: -64px;
    padding: 0;
    background: transparent;
    border: 0;
}

.quick-card {
    border: 0;
    border-bottom: 3px solid transparent;
    box-shadow: var(--shadow-lg);
}

.quick-card:hover {
    border-bottom-color: var(--accent);
}

/* ---- Notices ---- */
.notice-bar {
    padding: 36px 0 0;
}

.notice-inner {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}

.notice-label {
    border-radius: var(--radius-pill);
}

/* ---- Welcome / About ---- */
.home-about {
    padding-top: clamp(72px, 8vw, 112px);
}

.home-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

.home-about-media {
    position: relative;
    padding-bottom: 36px;
}

.home-about-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.home-about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-about-badge {
    position: absolute;
    right: -16px;
    bottom: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
    padding: 14px 18px;
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    color: var(--text-light);
    font-size: var(--fs-xs);
    line-height: 1.4;
}

.home-about-badge img {
    width: 52px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.home-about-badge strong {
    display: block;
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
}

.home-about-points {
    display: grid;
    gap: 14px;
    margin-bottom: 32px;
}

.home-about-point {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.home-about-point:hover {
    border-color: var(--primary-line);
    box-shadow: var(--shadow-sm);
}

.point-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--soft-sage);
    color: var(--primary);
    font-size: var(--fs-lg);
    transition: background var(--transition), color var(--transition);
}

.home-about-point:hover .point-icon {
    background: var(--primary);
    color: var(--white);
}

.home-about-point h3 {
    margin-bottom: 4px;
    font-size: var(--fs-lg);
}

.home-about-point p {
    margin: 0;
    font-size: var(--fs-body);
    line-height: 1.65;
}

@media (max-width: 900px) {
    .home-about-grid { grid-template-columns: 1fr; }
    .home-about-media { max-width: 520px; width: 100%; margin: 0 auto; }
}

@media (max-width: 480px) {
    .home-about-media { padding-bottom: 22px; }
    .home-about-badge { right: 0; bottom: 44px; max-width: 240px; }
}

/* ---- Statistics (only figures entered in Settings) ---- */
.stat-value {
    margin-bottom: 8px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-body);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---- Academic programs ---- */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 24px;
}

.program-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 26px 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.program-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.program-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.program-card:hover::after { transform: scaleX(1); }

.program-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.program-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-lg);
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-2xl);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), color var(--transition);
}

.program-card:hover .program-icon {
    background: var(--accent);
    color: var(--on-accent);
}

.program-stage {
    color: transparent;
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    -webkit-text-stroke: 1.5px var(--border);
}

.program-card h3 {
    margin-bottom: 10px;
    font-size: var(--fs-xl);
}

.program-card p {
    flex: 1;
    margin-bottom: 20px;
    font-size: var(--fs-body);
    line-height: 1.7;
}

/* ---- Why choose us ---- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-card {
    padding: 32px 30px;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    background: var(--cream);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.bg-light .why-card {
    border-color: var(--border);
    background: var(--white);
}

.why-card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.why-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--primary);
    font-size: var(--fs-2xl);
    box-shadow: var(--shadow-xs);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.why-card:hover .why-icon {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: var(--accent);
}

.why-card h3 {
    margin-bottom: 10px;
    font-size: var(--fs-lg);
}

.why-card p {
    margin: 0;
    font-size: var(--fs-body);
    line-height: 1.7;
}

@media (max-width: 960px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .why-grid { grid-template-columns: 1fr; gap: 14px; }
    .why-card { display: grid; grid-template-columns: 52px 1fr; gap: 0 16px; padding: 22px 20px; }
    .why-icon { grid-row: span 2; width: 52px; height: 52px; margin: 0; font-size: var(--fs-xl); }
}

/* ---- Facilities & campus life ---- */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.facility-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.facility-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--soft-sage);
    color: var(--primary);
    font-size: var(--fs-xl);
}

.facility-card h3 { margin-bottom: 4px; font-size: var(--fs-lg); }
.facility-card p { margin: 0; font-size: var(--fs-body-sm); line-height: 1.6; }

.life-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}

.life-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.life-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.life-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(var(--overlay-rgb), 0.92) 0%, rgba(var(--overlay-rgb), 0.15) 55%, transparent 100%);
}

.life-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 26px;
    color: var(--white);
}

.life-card-caption strong {
    font-family: var(--font-display);
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.25;
}

.life-card-caption small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
}

.life-card:hover img { transform: scale(1.06); }

.life-card:hover .life-card-caption small {
    background: var(--accent);
    color: var(--on-accent);
}

.life-card:focus-visible,
.mosaic-item:focus-visible,
.quick-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ---- Admissions ---- */
.home-admissions {
    position: relative;
    overflow: hidden;
    background: var(--primary-dark);
    color: var(--white);
}

.admissions-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}

.home-admissions .eyebrow.on-dark {
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
}

.admissions-copy h2 {
    margin-bottom: 18px;
    color: var(--white);
    font-size: clamp(30px, 3.6vw, 44px);
}

.admissions-copy .lead {
    color: rgba(255, 255, 255, 0.85);
}

.admission-steps {
    counter-reset: step;
    display: grid;
    gap: 16px;
    margin: 0 0 34px;
}

.admission-steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 16px;
    align-items: start;
}

.admission-steps li::before {
    content: counter(step);
    grid-row: span 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-display);
    font-weight: 800;
}

.admission-steps strong {
    color: var(--white);
    font-family: var(--font-display);
    font-size: var(--fs-md);
}

.admission-steps span {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-body-sm);
    line-height: 1.6;
}

@media (max-width: 960px) {
    .admissions-shell { grid-template-columns: 1fr; }
}

/* ---- News & events ---- */
.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.news-layout.is-single {
    grid-template-columns: 1fr;
}

.news-col-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--accent-ink);
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.news-col-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.news-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.news-list .news-col-title { grid-column: 1 / -1; margin-bottom: 0; }

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.news-card.is-featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.news-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--cream);
}

.news-card.is-featured .news-media {
    flex: 0 0 44%;
    aspect-ratio: auto;
    min-height: 230px;
}

.news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.news-card:hover .news-media img { transform: scale(1.05); }

.news-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--soft-sage);
}

.news-placeholder img {
    width: 64px !important;
    height: 60px !important;
    object-fit: contain;
    opacity: .9;
}

.news-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 20px 22px 22px;
}

.news-card.is-featured .news-body { padding: 28px; }

.news-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.news-card h4 {
    font-size: var(--fs-lg);
    line-height: 1.4;
}

.news-card.is-featured h4 { font-size: clamp(19px, 2vw, 22px); }

.news-card h4 a:hover { color: var(--primary); }

.news-card p {
    margin: 0;
    font-size: var(--fs-body);
    line-height: 1.7;
}

.events-panel {
    position: sticky;
    top: 100px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--primary-dark);
    color: var(--white);
}

.events-panel .news-col-title { color: var(--accent); }
.events-panel .news-col-title::after { background: rgba(255, 255, 255, 0.15); }

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.event-item:last-child { border-bottom: 0; padding-bottom: 0; }

.event-date {
    flex: 0 0 60px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--on-accent);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.event-date strong {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    letter-spacing: 0;
}

.event-item h4 {
    margin-bottom: 6px;
    color: var(--white);
    font-size: var(--fs-md);
}

.event-item h4 a:hover { color: var(--accent); }

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-sm);
}

.event-meta i { color: var(--accent); margin-right: 4px; }

.events-empty {
    display: flex;
    gap: 10px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.events-empty i { color: var(--accent); margin-top: 5px; }

@media (max-width: 960px) {
    .news-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .news-list { grid-template-columns: 1fr; }
    .news-card.is-featured { flex-direction: column; }
    .news-card.is-featured .news-media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
    .news-card:not(.is-featured) { flex-direction: row; }
    .news-card:not(.is-featured) .news-media { flex: 0 0 104px; aspect-ratio: auto; }
    .news-card:not(.is-featured) .news-body { padding: 16px 18px; }
    .news-card:not(.is-featured) h4 { font-size: var(--fs-body); }
    .news-placeholder img { width: 44px !important; height: 41px !important; }
    .events-panel { padding: 22px; }
}

/* ---- Photo gallery mosaic (5 photos: one large, four small) ---- */
.mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(150px, 16vw, 210px);
    gap: 14px;
}

.mosaic-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--soft-sage);
}

.mosaic-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.mosaic-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--overlay-rgb), 0.45);
    opacity: 0;
    transition: opacity var(--transition);
}

.mosaic-zoom {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    opacity: 0;
    transform: translate(-50%, -50%) scale(.7);
    transition: opacity var(--transition), transform var(--transition);
}

.mosaic-item:hover img { transform: scale(1.06); }
.mosaic-item:hover::after { opacity: 1; }
.mosaic-item:hover .mosaic-zoom { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@media (max-width: 760px) {
    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; }
}

/* ---- Contact ---- */
.contact-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: clamp(36px, 5vw, 72px);
    align-items: start;
}

.contact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 26px;
}

.contact-list li {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--cream);
}

.contact-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-md);
}

.contact-list strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--fs-body);
}

.contact-list div > span,
.contact-list div > a {
    color: var(--text-light);
    font-size: var(--fs-body-sm);
    line-height: 1.6;
    word-break: break-word;
}

.contact-list a:hover { color: var(--primary); }

.contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-social a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--primary);
}

.contact-social a:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.contact-map {
    aspect-ratio: 16 / 9;
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 960px) {
    .contact-shell { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .contact-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    position: relative;
    overflow: hidden;
    padding: 80px 0 0;
    border-top: 4px solid var(--accent);
    background: var(--primary-darker);
    color: rgba(255, 255, 255, 0.78);
}

/* faint crest watermark */
.site-footer::before {
    content: '';
    position: absolute;
    right: -70px;
    top: -30px;
    width: 360px;
    height: 335px;
    background: url("../images/city-scholars-crest-sm.png") no-repeat center / contain;
    opacity: .05;
    pointer-events: none;
}

.footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
    gap: 48px;
    padding-bottom: 56px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 78px;
    height: 72px;
    flex-shrink: 0;
    object-fit: contain;
}

.footer-logo strong {
    display: block;
    color: var(--white);
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    line-height: 1.25;
}

.footer-logo small {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.footer-brand p {
    max-width: 380px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-body);
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.footer-social a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-3px);
}

.footer-heading {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: var(--fs-lg);
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.footer-links {
    display: grid;
    gap: 11px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-body);
}

.footer-links a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.5);
    transition: background var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-links a:hover::before { background: var(--accent); }

.footer-contact-list {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.footer-contact-list li {
    display: flex;
    gap: 12px;
    font-size: var(--fs-body);
    line-height: 1.6;
}

.footer-contact-list i {
    width: 18px;
    flex-shrink: 0;
    margin-top: 5px;
    color: var(--accent);
    text-align: center;
}

.footer-contact-list a { color: rgba(255, 255, 255, 0.85); word-break: break-word; }
.footer-contact-list a:hover { color: var(--accent); }
.site-footer .is-placeholder { color: rgba(255, 255, 255, 0.55); }

.site-footer a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.footer-bottom {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--fs-body-sm);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-legal a { color: rgba(255, 255, 255, 0.7); }
.footer-legal a:hover { color: var(--accent); }
.footer-legal span { color: rgba(255, 255, 255, 0.35); }

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 600px) {
    .site-footer { padding-top: 56px; }
    .footer-grid { gap: 36px 20px; padding-bottom: 40px; }
    .footer-brand,
    .footer-contact { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; text-align: center; font-size: var(--fs-sm); }
}

@media (max-width: 360px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Inner pages: shared components (includes/components.php)
   ========================================================================== */

/* first section under a banner sits a little closer to it */
.page-intro {
    padding-top: clamp(56px, 6vw, 84px);
}

.prose {
    margin-bottom: 18px;
    color: var(--text-light);
    font-size: var(--fs-md);
    line-height: 1.85;
}

.muted { color: var(--muted); }

.group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    color: var(--primary-dark);
    font-size: var(--fs-xl);
}

.group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: var(--soft-sage);
    color: var(--primary-dark);
    font-size: var(--fs-sm);
    font-weight: 700;
}

/* ---- Empty state ---- */
.empty-state {
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(36px, 5vw, 56px) 28px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    text-align: center;
}

.bg-light .empty-state { background: var(--white); }

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--soft-sage);
    color: var(--primary);
    font-size: 28px;
}

.empty-state h3 {
    margin-bottom: 8px;
    font-size: var(--fs-xl);
}

.empty-state p {
    margin: 0 auto;
    max-width: 440px;
    font-size: var(--fs-body);
    line-height: 1.7;
}

.empty-state .btn { margin-top: 22px; }

/* ---- Link cards (related pages) ---- */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.link-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-line);
    box-shadow: var(--shadow-md);
}

.link-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.link-card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-lg);
    transition: background var(--transition), color var(--transition);
}

.link-card:hover .link-card-icon {
    background: var(--accent);
    color: var(--on-accent);
}

.link-card-body {
    flex: 1;
    min-width: 0;
}

.link-card-body strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--fs-md);
}

.link-card-body span {
    display: block;
    color: var(--text-light);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.link-card-arrow {
    color: var(--primary);
    font-size: var(--fs-sm);
    transition: transform var(--transition);
}

.link-card:hover .link-card-arrow { transform: translateX(4px); }

/* ---- Call-to-action panel ---- */
.cta-section {
    padding-top: 0;
}

.bg-light + .cta-section,
.page-intro.bg-light + .cta-section {
    padding-top: clamp(56px, 7vw, 96px);
}

.cta-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
    padding: clamp(32px, 5vw, 56px);
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--primary-dark);
    color: var(--white);
}

.cta-panel::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 240px;
    height: 224px;
    background: url("../images/city-scholars-crest-sm.png") no-repeat center / contain;
    opacity: .07;
    pointer-events: none;
}

.cta-panel-copy {
    position: relative;
    max-width: 620px;
}

.cta-panel h2 {
    margin-bottom: 10px;
    color: var(--white);
    font-size: clamp(24px, 2.8vw, 34px);
}

.cta-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-lg);
}

.cta-panel .btn-group { position: relative; }

.cta-social {
    position: relative;
    display: flex;
    gap: 10px;
}

.cta-social a {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: var(--white);
    font-size: var(--fs-lg);
}

.cta-social a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

@media (max-width: 600px) {
    .cta-panel .btn-group .btn { flex: 1 1 100%; }
}

/* ---- Two-column intro (Campus Life) ---- */
.intro-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.intro-split .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .intro-split { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .intro-split .link-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   About
   ========================================================================== */
.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 24px;
}

.mv-card {
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
}

.mv-card.is-dark {
    border-color: transparent;
    background: var(--primary-dark);
}

.mv-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    background: var(--soft-sage);
    color: var(--primary);
    font-size: var(--fs-2xl);
}

.mv-card.is-dark .mv-icon {
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--accent);
}

.mv-card h2 {
    margin-bottom: 12px;
    font-size: var(--fs-2xl);
}

.mv-card p {
    margin: 0;
    font-size: var(--fs-md);
    line-height: 1.85;
}

.mv-card.is-dark h2 { color: var(--white); }
.mv-card.is-dark p { color: rgba(255, 255, 255, 0.86); }

.crest-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: center;
}

.crest-figure {
    position: relative;
    display: grid;
    place-items: center;
    padding: clamp(24px, 4vw, 48px);
    border-radius: 50%;
    background: var(--cream);
}

.crest-figure img {
    width: 100%;
    max-width: 380px;
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(8, 43, 80, 0.2));
}

.crest-symbols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.crest-symbols li {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.crest-symbol-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--primary-dark);
    color: var(--accent);
    font-size: var(--fs-lg);
}

.crest-symbols strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--fs-body);
}

.crest-symbols div > span {
    display: block;
    color: var(--text-light);
    font-size: var(--fs-body-sm);
    line-height: 1.55;
}

@media (max-width: 900px) {
    .crest-grid { grid-template-columns: 1fr; }
    .crest-figure { max-width: 340px; margin: 0 auto; }
}

@media (max-width: 520px) {
    .crest-symbols { grid-template-columns: 1fr; }
}

.principal-card {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    text-align: center;
}

.principal-photo {
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    overflow: hidden;
    border: 4px solid var(--accent);
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 54px;
}

.principal-photo img { width: 100%; height: 100%; object-fit: cover; }

.principal-card blockquote {
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.6;
}

.principal-card p { line-height: 1.85; }

/* ==========================================================================
   Academics: faculty, examination, downloads
   ========================================================================== */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 24px;
}

.faculty-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.faculty-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.faculty-photo {
    position: relative;
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    margin: 28px auto 0;
    overflow: hidden;
    border: 4px solid var(--white);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--accent), var(--shadow-sm);
    color: rgba(255, 255, 255, 0.85);
    font-size: 46px;
}

.faculty-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faculty-body {
    padding: 20px 24px 26px;
}

.faculty-body h3 {
    margin-bottom: 4px;
    font-size: var(--fs-lg);
}

.faculty-role {
    margin-bottom: 14px;
    color: var(--accent-ink);
    font-size: var(--fs-body-sm);
    font-weight: 600;
}

.faculty-facts {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: left;
}

.faculty-facts div {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 8px;
    font-size: var(--fs-body-sm);
}

.faculty-facts dt {
    color: var(--muted);
    font-weight: 600;
}

.faculty-facts dt i {
    width: 16px;
    color: var(--primary);
}

.faculty-facts dd {
    margin: 0;
    color: var(--text);
}

.table-card {
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
}

.table-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.table-card-head h3 {
    font-size: var(--fs-xl);
}

.table-card-empty {
    margin: 0;
    padding: 24px;
}

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

.table-scroll:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.data-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: var(--fs-body-sm);
}

.data-table thead th {
    padding: 14px 16px;
    background: var(--primary-dark);
    color: var(--white);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.data-table thead th:first-child { text-align: left; }

.data-table thead th small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-xs);
    font-weight: 500;
}

.data-table tbody th {
    padding: 14px 16px;
    background: var(--cream);
    color: var(--ink);
    text-align: left;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-align: center;
}

.data-table tbody tr:hover td { background: #f8fafc; }

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.result-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    transition: transform var(--transition), box-shadow var(--transition);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.result-media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--cream);
}

.result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-body {
    display: block;
    padding: 16px 18px 18px;
}

.result-body strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--fs-md);
}

.result-body small {
    color: var(--muted);
    font-size: var(--fs-sm);
}

.download-list {
    display: grid;
    gap: 14px;
    max-width: 960px;
    margin: 0 auto;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.download-item:hover {
    border-color: var(--primary-line);
    box-shadow: var(--shadow-sm);
}

.download-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--soft-sage);
    color: var(--primary);
    font-size: var(--fs-2xl);
}

.download-body {
    flex: 1;
    min-width: 0;
}

.download-body strong {
    display: block;
    color: var(--ink);
    font-size: var(--fs-md);
    line-height: 1.45;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: var(--muted);
    font-size: var(--fs-sm);
}

@media (max-width: 560px) {
    .download-item { flex-wrap: wrap; }
    .download-item .btn { width: 100%; }
}

/* ==========================================================================
   Admission
   ========================================================================== */
.apply-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 32px;
    align-items: start;
}

.form-card-title {
    margin-bottom: 6px;
    font-size: clamp(24px, 2.6vw, 30px);
}

.form-fieldset {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
}

.form-fieldset legend {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
    padding-top: 8px;
    color: var(--primary-dark);
    font-family: var(--font-display);
    font-size: var(--fs-md);
    font-weight: 700;
}

.form-fieldset legend::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.field-hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.form-group input[type="file"] {
    padding: 10px;
    background: var(--cream);
}

.form-row.is-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 760px) {
    .form-row.is-3 { grid-template-columns: 1fr; }
}

.apply-aside {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 20px;
}

.aside-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
}

.aside-card.is-dark {
    border-color: transparent;
    background: var(--primary-dark);
    color: var(--white);
}

.aside-card.is-dark p { color: rgba(255, 255, 255, 0.85); }

.aside-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: var(--fs-lg);
}

.aside-card.is-dark .aside-title { color: var(--white); }

.aside-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.admission-steps.is-light {
    margin: 0;
}

.admission-steps.is-light strong { color: var(--ink); }
.admission-steps.is-light span { color: var(--text-light); }

.check-list {
    display: grid;
    gap: 10px;
}

.check-list li {
    display: flex;
    gap: 10px;
    font-size: var(--fs-body);
    line-height: 1.55;
}

.check-list i {
    margin-top: 4px;
    color: var(--success);
}

.fee-panel {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
}

.fee-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.fee-list li:last-child { border-bottom: 0; }

.fee-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 600;
}

.fee-label i {
    width: 20px;
    color: var(--primary);
    text-align: center;
}

.fee-note {
    display: flex;
    gap: 10px;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--cream);
    font-size: var(--fs-body-sm);
}

.fee-note i { margin-top: 4px; color: var(--primary); }

@media (max-width: 960px) {
    .apply-layout { grid-template-columns: 1fr; }
    .apply-aside { position: static; }
}

/* ==========================================================================
   Events & news
   ========================================================================== */
.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 22px;
}

.event-cards.is-full {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

.event-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    scroll-margin-top: 110px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.event-card:target {
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.event-card-media {
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: var(--cream);
}

.event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-body {
    display: flex;
    gap: 18px;
    padding: 22px;
}

.event-card h3 {
    margin-bottom: 8px;
    font-size: var(--fs-lg);
}

.event-card .event-meta {
    margin-bottom: 10px;
    color: var(--muted);
}

.event-card .event-meta i { color: var(--primary); }

.event-text {
    margin-bottom: 12px;
    font-size: var(--fs-body);
    line-height: 1.7;
}

.event-card.is-past .event-date {
    background: var(--soft-sage);
    color: var(--primary-dark);
}

.news-feed {
    display: grid;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.news-article {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    scroll-margin-top: 110px;
}

.news-article:target {
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.news-article-media {
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--cream);
}

.news-article-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-article-body {
    padding: clamp(22px, 3.5vw, 34px);
    border-left: 4px solid var(--accent);
}

.news-article .news-date { margin-bottom: 8px; }

.news-article h3 {
    margin-bottom: 12px;
    font-size: clamp(19px, 2vw, 23px);
}

.news-article .prose { margin: 0; }

/* ==========================================================================
   Campus Life: campuses, alumni
   ========================================================================== */
.campus-feature {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    margin-bottom: 28px;
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: var(--white);
}

.campus-feature:last-child { margin-bottom: 0; }

.campus-feature.is-reverse .campus-feature-media { order: 2; }

.campus-feature-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--primary);
}

.campus-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.campus-feature-icon {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 72px;
}

.campus-feature-body h3 {
    margin-bottom: 14px;
    font-size: clamp(24px, 2.6vw, 32px);
}

.campus-contact {
    display: grid;
    gap: 10px;
    margin: 18px 0 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.campus-contact li {
    display: flex;
    gap: 12px;
    color: var(--text-light);
}

.campus-contact i {
    width: 18px;
    margin-top: 5px;
    color: var(--primary);
}

@media (max-width: 860px) {
    .campus-feature { grid-template-columns: 1fr; }
    .campus-feature.is-reverse .campus-feature-media { order: 0; }
}

.page-alert {
    padding-top: 28px;
}

.page-alert .alert { margin: 0; }

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 22px;
}

.alumni-card {
    padding: 28px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--white);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.alumni-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.alumni-card img {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border: 3px solid var(--white);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px var(--accent);
}

.alumni-card h3 {
    margin-bottom: 4px;
    font-size: var(--fs-lg);
}

.alumni-batch {
    margin-bottom: 8px;
    color: var(--accent-ink);
    font-size: var(--fs-body-sm);
    font-weight: 600;
}

.alumni-job {
    margin: 0;
    font-size: var(--fs-body-sm);
}

.alumni-job i { color: var(--primary); }

.alumni-forms {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.alumni-forms .form-card,
.apply-layout .form-card,
.page-intro .contact-shell .form-card {
    border: 1px solid var(--border);
    border-top: 5px solid var(--accent);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 960px) {
    .alumni-forms { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Contact page, 404
   ========================================================================== */
.hours-card {
    margin-top: 24px;
}

.contact-map.is-wide {
    aspect-ratio: 21 / 9;
    margin-top: 0;
}

@media (max-width: 700px) {
    .contact-map.is-wide { aspect-ratio: 4 / 3; }
}

.not-found {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.not-found .link-grid { text-align: left; }

/* Exactly four icon cards: one row of four (two by two on tablets) instead of 3 + 1 */
@media (min-width: 961px) {
    .why-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 601px) and (max-width: 960px) {
    .why-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Responsive refinements (checked at 320-1440px)
   ========================================================================== */

/* Phones: the school name wraps onto two lines rather than pushing the buttons off screen */
@media (max-width: 600px) {
    .brand-text strong { line-height: 1.2; }
}

@media (max-width: 360px) {
    .container { padding-inline: 14px; }
    .brand-logo,
    .site-header.is-scrolled .brand-logo { width: 40px; height: 37px; }
    .brand-text strong { font-size: 13.5px; }
}

/* Touch targets: at least 44px tall where people tap */
.breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-block: -12px;
}

.text-link {
    padding-block: 10px;
    margin-block: -10px;
}

.gallery-filter { min-height: 44px; }

.hero-dot::after { inset: -17px -7px; }

/* Long words (e-mail addresses, file names) wrap instead of widening a card */
.contact-list,
.footer-contact-list,
.download-body,
.campus-contact {
    overflow-wrap: anywhere;
}

/* Tables scroll inside their card on narrow screens; show that they can */
@media (max-width: 760px) {
    .table-scroll {
        background:
            linear-gradient(90deg, var(--white) 30%, rgba(255, 255, 255, 0)) left / 24px 100% no-repeat local,
            linear-gradient(270deg, var(--white) 30%, rgba(255, 255, 255, 0)) right / 24px 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, rgba(var(--ink-rgb), 0.15), transparent) left / 10px 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, rgba(var(--ink-rgb), 0.15), transparent) right / 10px 100% no-repeat scroll;
    }
}

/* the logo link is a comfortable tap target on the narrowest phones too */
.brand { padding-block: 4px; }

/* Program cards: 4 across, then 2 by 2 (never 3 + 1), then one column */
.program-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .program-grid { grid-template-columns: 1fr; } }

/* Gallery filters wrap onto a second line on phones instead of hiding chips off screen */
@media (max-width: 768px) {
    .gallery-filters { flex-wrap: wrap; justify-content: center; overflow-x: visible; padding-bottom: 0; }
}

/* Campus Life intro: the link cards sit in one column beside the text on small laptops */
@media (min-width: 901px) and (max-width: 1200px) {
    .intro-split .link-grid { grid-template-columns: 1fr; }
}

/* <picture> wrappers (pictureImg()) fill their frame like the image inside */
.home-about-photo picture,
.crest-figure picture { display: block; width: 100%; height: 100%; }
.crest-figure picture { display: grid; place-items: center; }

/* ==========================================================================
   Homepage v2: photo band, split "Why choose us", stacked contact details
   ========================================================================== */

/* ---- Photo band ---- */
.home-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--primary-dark);
    color: var(--white);
}

.home-band-media,
.home-band-media picture,
.home-band-media img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
}

.home-band-media img { object-fit: cover; object-position: center 15%; }   /* group photos: keep heads and any banner above them in view */

.home-band::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(var(--overlay-rgb), 0.95) 0%, rgba(var(--overlay-rgb), 0.86) 45%, rgba(var(--overlay-rgb), 0.55) 100%);
}

.home-band-inner { max-width: 640px; }

.home-band h2 {
    margin-bottom: 16px;
    color: var(--white);
    font-size: var(--fs-h2);
}

.home-band p {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: var(--fs-lg);
    line-height: 1.75;
}

.home-band .eyebrow.on-dark {
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
}

@media (max-width: 768px) {
    .home-band::before { background: rgba(var(--overlay-rgb), 0.88); }
    .home-band .btn-group .btn { flex: 1 1 100%; }
}

/* ---- Why choose us: heading left, priorities right ---- */
.why-split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
}

.why-intro {
    position: sticky;
    top: 110px;
}

.why-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 32px;
}

.why-item {
    display: flex;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.why-item .why-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin: 0;
    border: 0;
    background: var(--soft-sage);
    font-size: var(--fs-lg);
    box-shadow: none;
}

.why-item:hover .why-icon {
    background: var(--primary-dark);
    color: var(--accent);
}

.why-item h3 {
    margin-bottom: 6px;
    font-size: var(--fs-md);
}

.why-item p {
    margin: 0;
    font-size: var(--fs-body-sm);
    line-height: 1.65;
}

@media (max-width: 960px) {
    .why-split { grid-template-columns: 1fr; }
    .why-intro { position: static; }
}

@media (max-width: 600px) {
    .why-list { grid-template-columns: 1fr; gap: 0; }
    .why-intro .btn-group .btn { flex: 1 1 100%; }
}

/* the "Why choose us" heading column is a little wider so the title breaks into two lines */
@media (min-width: 961px) {
    .why-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
}

/* Campus life photo cards: an incomplete last row sits centred (e.g. 3 + 2) */
.life-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.life-grid > .life-card {
    flex: 0 1 calc((100% - 48px) / 3);
    min-width: min(100%, 300px);
}

@media (max-width: 1000px) {
    .life-grid > .life-card { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 640px) {
    .life-grid > .life-card { flex-basis: 100%; }
}


/* ==========================================================================
   Hero v3: two-line headline, controls in one row under the text
   (counter 01 / 03, segment bars that fill while a photo is shown, arrows)
   ========================================================================== */
.home-hero { padding-bottom: 210px; }
.hero-copy { max-width: 780px; }
.hero-title { max-width: 760px; }

/* "Inspiring Young Minds." / "Building Bright Futures." on two lines */
@media (min-width: 769px) {
    .hero-title { font-size: clamp(40px, 4.4vw, 58px); }
    .hero-title .text-gold { display: block; text-wrap: wrap; }
}

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100px;
    z-index: 2;
    display: block;
    transform: none;
}

.hero-controls-inner {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hero-count {
    min-width: 64px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .08em;
}

.hero-count strong {
    color: var(--white);
    font-size: var(--fs-xl);
    letter-spacing: 0;
}

.hero-dots { gap: 10px; }

.hero-dot {
    width: 44px;
    height: 4px;
    overflow: visible;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot > span {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    background: var(--accent);
}

.hero-dot.is-done > span { width: 100%; opacity: .55; }

.hero-dot.is-active {
    width: 44px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-slider.is-running .hero-dot.is-active > span {
    animation: heroProgress var(--hero-interval, 5000ms) linear forwards;
}

.hero-slider.is-hovered .hero-dot.is-active > span { animation-play-state: paused; }

/* bigger click/touch area than the thin bar */
.hero-dot::after { inset: -14px -3px; }

.hero-arrows {
    display: flex;
    gap: 10px;
    margin-left: 6px;
}

.hero-arrow {
    width: 46px;
    height: 46px;
    font-size: var(--fs-body-sm);
}

/* the old thin progress line along the bottom edge is replaced by the bars */
.hero-progress { display: none; }

@media (max-width: 1100px) {
    .hero-title { max-width: 640px; }
}

@media (max-width: 768px) {
    .hero-controls {
        left: 0;
        right: 0;
        bottom: 84px;
        transform: none;
    }

    .hero-controls-inner { justify-content: center; gap: 16px; }
    .hero-arrows { display: none; }   /* swipe on phones */
    .hero-dot { width: 34px; }
    .hero-dot.is-active { width: 34px; }

    .hero-eyebrow { font-size: var(--fs-xs); padding-right: 14px; }

    /* the three highlights stay on one line */
    .hero-points { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
    .hero-points li { gap: 7px; font-size: var(--fs-sm); white-space: nowrap; }
    .hero-points i { width: 30px; height: 30px; font-size: 12px; }
}

@media (max-width: 360px) {
    .hero-points i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider.is-running .hero-dot.is-active > span { animation: none; width: 100%; }
}


/* ==========================================================================
   Header v2: light brand bar (crest, name, contact, Apply, social)
   over a navy menu bar with an icon above every link.
   On desktop only the menu bar stays stuck to the top while scrolling.
   ========================================================================== */
.site-header {
    --brand-bar-h: 84px;
    background: var(--cream);
}

.main-bar {
    background: var(--cream);
    border-bottom: 0;
}

.main-bar .container { max-width: var(--container-width); }

.main-bar-inner {
    justify-content: space-between;
}

.main-bar-actions { gap: 18px; }

/* phone | email */
.brand-contact {
    display: flex;
    align-items: center;
}

.brand-contact li + li {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.brand-contact a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition);
}

.brand-contact a:hover { color: var(--primary); }
.brand-contact i { color: var(--accent-ink); font-size: 12px; }

.apply-btn {
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    box-shadow: none;
}

.apply-btn:hover { box-shadow: var(--shadow-accent); }

.brand-social {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-social a {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(18, 63, 115, 0.06);
    color: var(--primary);
    font-size: 13px;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.brand-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.brand-social a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ---- Navy menu bar (desktop) ---- */
@media (min-width: 1024px) {
    .site-header { top: calc(-1 * var(--brand-bar-h)); }

    .main-bar-inner,
    .site-header.is-scrolled .main-bar-inner {
        height: var(--brand-bar-h);
        min-height: 0;
    }

    .site-header.is-scrolled .brand-logo { width: 60px; height: 56px; }

    .nav-bar {
        background: var(--primary);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 0;
        width: 100%;
        min-height: 66px;
        margin: 0;
    }

    .site-nav > a,
    .site-nav > .nav-dropdown {
        flex: 1 1 0;
        min-width: 0;
    }

    .site-nav > .nav-dropdown { display: flex; }

    .site-nav > a,
    .nav-dropdown-trigger {
        flex-direction: column;
        justify-content: center;
        gap: 7px;
        width: 100%;
        padding: 10px 4px;
        border-radius: 0;
        color: rgba(255, 255, 255, 0.86);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: .01em;
    }

    .site-nav > a > span,
    .nav-dropdown-trigger > span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .nav-icon {
        font-size: 17px;
        line-height: 1;
        transition: transform 300ms cubic-bezier(.34, 1.56, .64, 1), color var(--transition);
    }

    .nav-caret { font-size: 9px; opacity: .8; }

    .site-nav > a::after,
    .nav-dropdown-trigger::after {
        left: 22%;
        right: 22%;
        bottom: 0;
        border-radius: 3px 3px 0 0;
        transform-origin: center;
    }

    .site-nav > a:hover,
    .site-nav > a.is-active,
    .nav-dropdown:hover .nav-dropdown-trigger,
    .nav-dropdown:focus-within .nav-dropdown-trigger,
    .nav-dropdown.is-open .nav-dropdown-trigger,
    .nav-dropdown.is-active .nav-dropdown-trigger {
        color: var(--accent);
        background: rgba(255, 255, 255, 0.07);
    }

    .site-nav > a:hover .nav-icon,
    .site-nav > a.is-active .nav-icon,
    .nav-dropdown:hover .nav-icon,
    .nav-dropdown.is-open .nav-icon,
    .nav-dropdown.is-active .nav-icon {
        transform: translateY(-2px);
    }

    .site-nav > a:focus-visible,
    .nav-dropdown-trigger:focus-visible { outline-offset: -3px; }

    /* dropdowns hang straight from the bar */
    .nav-dropdown-panel {
        top: 100%;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

/* Small laptops: no room for the e-mail address next to the Apply button */
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .brand-contact li + li { display: none; }
    .site-nav > a,
    .nav-dropdown-trigger { font-size: 12.5px; }
}

/* ---- Drawer (tablets and phones): the menu bar collapses into the side drawer ---- */
@media (max-width: 1023.98px) {
    .site-nav > a,
    .nav-dropdown-trigger {
        justify-content: flex-start;
        gap: 14px;
    }

    .nav-dropdown-trigger > span {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-icon {
        width: 20px;
        text-align: center;
        color: var(--primary);
        font-size: 16px;
    }

    .site-nav > a.nav-drawer-apply { gap: 10px; }

    .brand-contact li + li { display: none; }
}

@media (max-width: 767.98px) {
    .brand-contact,
    .brand-social { display: none; }
    .main-bar-actions { gap: 10px; }
}
