/* ═══════════════════════════════════════════════════════════════════════
   HEADER — two-tier: thin navy utility bar + tall bold main bar
   ───────────────────────────────────────────────────────────────────────
   The logo block is deliberately the strongest element in the header.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Emergency alert slot ──────────────────────────────────────────────
   Hidden by default. The developer wires this to the admin portal; adding
   the .is-active class (or removing [hidden]) reveals it. */
#emergency-alert {
  background:
    linear-gradient(90deg, #7f0f15 0%, #b42318 48%, #7f0f15 100%);
  color: #fff;
  padding: .85rem 0;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(13, 31, 59, .2);
  font-weight: 700;
}
#emergency-alert[hidden] { display: none; }
#emergency-alert .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem 1.25rem;
  text-align: left;
}
#emergency-alert .emergency-alert-copy {
  display: grid;
  gap: .4rem;
  min-width: 0;
}
#emergency-alert .emergency-alert-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
#emergency-alert .emergency-alert-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#emergency-alert .emergency-alert-label::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: .8rem;
  line-height: 1;
}
#emergency-alert .emergency-alert-title {
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 900;
  line-height: 1.2;
}
#emergency-alert .emergency-alert-message {
  color: #fff;
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
  max-width: 78rem;
}
#emergency-alert .emergency-alert-message p {
  margin: 0;
}
#emergency-alert .emergency-alert-message p + p,
#emergency-alert .emergency-alert-message ul,
#emergency-alert .emergency-alert-message ol {
  margin-top: .35rem;
}
#emergency-alert .emergency-alert-message a {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .18em;
}
#emergency-alert .emergency-alert-message a:hover,
#emergency-alert .emergency-alert-message a:focus-visible {
  color: var(--gold);
}
#emergency-alert .emergency-alert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: .38rem .75rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
#emergency-alert .emergency-alert-link:hover,
#emergency-alert .emergency-alert-link:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

@media (max-width: 760px) {
  #emergency-alert .wrap {
    grid-template-columns: 1fr;
    text-align: left;
  }

  #emergency-alert .emergency-alert-link {
    width: fit-content;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   TIER 1 — UTILITY BAR (thin, navy)
   ═══════════════════════════════════════════════════════════════════════ */
#utility-bar {
  background: var(--navy-deep);
  color: rgba(255,255,255,.85);
  font-size: var(--fs-sm);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.utility-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  min-height: var(--utility-h);
  flex-wrap: wrap;
}

.utility-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  font-weight: 500;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  /* Utility bar is dense; 44px targets would break the thin bar, so we
     meet the WCAG 2.5.5 "inline" spacing exception with generous padding */
  min-height: 32px;
}
.utility-link:hover { color: var(--gold); background: rgba(255,255,255,.06); }

/* Thin gold divider between utility links */
.utility-sep { color: rgba(255,255,255,.28); user-select: none; }

/* External-link icon */
.utility-link .ext-icon { width: 11px; height: 11px; opacity: .7; }

/* ── Google Translate widget ───────────────────────────────────────────
   The Google script injects its own markup; we restyle the trigger and
   keep our own accessible button as the visible control. */
.translate-wrap { position: relative; display: inline-flex; }

.translate-btn {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 32px;
  transition: background var(--dur-fast) var(--ease);
}
.translate-btn:hover { background: rgba(255,255,255,.14); color: var(--gold); }
.translate-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.translate-btn .lang-current {
  color: var(--gold);
  font-weight: 800;
}
.translate-btn .caret { transition: transform var(--dur-fast) var(--ease); }
.translate-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* Container Google Translate mounts into */
#google_translate_element { display: none; }
.translate-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-3);
  min-width: 210px;
  z-index: var(--z-dropdown);
}
.translate-panel[hidden] { display: none; }
.translate-panel #google_translate_element { display: none; }
.lang-menu {
  display: grid;
  gap: .2rem;
}
.lang-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.2rem;
  padding: .45rem .65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.lang-menu-item:hover,
.lang-menu-item:focus-visible {
  background: rgba(13,31,59,.08);
  outline: none;
}
.lang-menu-item.active {
  background: var(--gold);
  color: var(--navy);
}
.lang-menu-item.active::after {
  content: "Selected";
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.translate-note {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin: var(--sp-2) 0 0;
  line-height: 1.4;
}

.goog-te-banner-frame,
.skiptranslate {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   TIER 2 — MAIN BAR (tall, substantial, sticky)
   ═══════════════════════════════════════════════════════════════════════ */
/* NAVY HEADER. Every colour below is inverted to match; measured on
   #0D1F3B: name 16.45:1, nav links 14.05:1, gold slogan and hover 7.01:1.
   Dropdown panels stay WHITE on purpose — they overlay page content, not
   the bar, so they keep the light treatment the page already uses. */
#site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.10);
  /* Gold hairline under the header — brand signature */
  box-shadow: inset 0 -3px 0 var(--gold);
  transition: box-shadow var(--dur) var(--ease);
  overflow-x: clip;
}
#site-header.is-compact {
  box-shadow: inset 0 -3px 0 var(--gold), var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease);
  min-width: 0;
  overflow-x: clip;
}
/* The header is the widest element on the site — it needs more room than
   the standard --wrap so the primary nav, logo block, and APPLY NOW button
   all fit on one line at desktop widths. */
#site-header .header-inner { max-width: var(--wrap-wide); }
#site-header.is-compact .header-inner { min-height: var(--header-h-compact); }

/* ── LOGO BLOCK — the strongest element in the header ──────────────────*/
.hdr-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  /* May shrink slightly so the nav never gets clipped, but never below
     the width needed to keep the school name on two lines at most. */
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 22rem);
  overflow-x: clip;
}
.hdr-crest {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  transition: width var(--dur) var(--ease), height var(--dur) var(--ease);
}
/* Nav takes the remaining space and right-aligns; actions never shrink.
   margin-left guarantees clear space between the logo text and the first
   nav item — without it the two flex items visually collide near 1200px. */
#primary-nav {
  flex: 0 1 auto;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
  padding-left: var(--sp-4);
}
.hdr-actions { flex: 0 0 auto; }
/* Compact state: crest shrinks slightly but stays bold and legible */
#site-header.is-compact .hdr-crest { width: 50px; height: 50px; }

.hdr-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-x: clip;
}

.hdr-name {
  font-family: var(--font-display);
  font-weight: 700;
  /* Capped at 1.22rem: larger values push the primary nav off-screen at
     1440px. The logo still reads as the dominant header element thanks
     to the crest size, uppercase weight, and the slogan beneath it. */
  font-size: clamp(1rem, .8rem + .55vw, 1.22rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
  text-transform: uppercase;
  transition: font-size var(--dur) var(--ease);
  max-width: 100%;
  overflow-wrap: anywhere;
}
#site-header.is-compact .hdr-name {
  font-size: clamp(.95rem, .8rem + .5vw, 1.25rem);
}

/* Slogan sits beneath the name; hides when the header compacts */
.hdr-slogan {
  font-family: var(--font-body);
  font-size: clamp(.52rem, .48rem + .14vw, .64rem);
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--gold);   /* bright gold: 7.01:1 on the navy bar */
  white-space: nowrap;
  /* Clip vertically (for the compact-scroll animation) but never
     horizontally — a half-word slogan looks like a rendering bug. */
  overflow: clip;
  flex-shrink: 0;
  max-height: 1.6em;
  opacity: 1;
  transition: max-height var(--dur) var(--ease),
              opacity    var(--dur) var(--ease),
              margin     var(--dur) var(--ease);
}
#site-header.is-compact .hdr-slogan {
  max-height: 0;
  opacity: 0;
  margin-top: -2px;
}

/* ── PRIMARY NAV ───────────────────────────────────────────────────────*/
#primary-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { position: relative; margin: 0; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* Horizontal padding scales with viewport so all 7 items fit from
     1181px up without wrapping or clipping. */
  padding: var(--sp-3) clamp(6px, .45vw, 11px);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.nav-link:hover { background: rgba(255,255,255,.08); color: var(--gold); }

/* Underline on hover / open / current page.
   WCAG 1.4.11: this indicator carries meaning (which section you are in),
   so it uses --gold-dk (4.65:1 on white) rather than raw --gold (2.35:1).
   The current page ALSO gets bolder, darker text — state is never signalled
   by color alone (WCAG 1.4.1). */
/* Active/hover underline — bright gold reads on navy; --gold-dk did not. */
.nav-link::after {
  content: "";
  position: absolute;
  left: clamp(6px, .45vw, 11px);
  right: clamp(6px, .45vw, 11px);
  bottom: 4px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--dur-fast) var(--ease);
}
.nav-link:hover::after,
.nav-link[aria-expanded="true"]::after,
.nav-item.is-current > .nav-link::after { transform: scaleX(1); }

/* Current section: non-color cue in addition to the underline */
.nav-item.is-current > .nav-link { color: var(--gold); font-weight: 700; }

.nav-caret {
  width: 10px; height: 10px;
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.nav-link[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

/* ── DROPDOWNS — compact, single column ────────────────────────────────*/
.nav-drop {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 252px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  z-index: var(--z-dropdown);
  list-style: none;
  margin: 0;
}
.nav-drop[hidden] { display: none; }

/* Right-align dropdowns near the end of the bar so they stay on screen */
.nav-item:nth-last-child(-n+2) .nav-drop { left: auto; right: 0; }

.nav-drop li { margin: 0; }

.drop-link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.drop-link:hover,
.drop-link:focus-visible {
  background: var(--cream);
  border-left-color: var(--gold);
  color: var(--navy);
}

/* ── HEADER ACTIONS ────────────────────────────────────────────────────*/
.hdr-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.btn-apply-short { display: none; }

/* ── HAMBURGER (mobile only) ───────────────────────────────────────────*/
.hamburger {
  display: none;
  width: var(--tap);
  height: var(--tap);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  flex-shrink: 0;
}
.ham-line {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
}
.hamburger[aria-expanded="true"] .ham-line:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] .ham-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .ham-line:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE NAVIGATION PANEL
   ═══════════════════════════════════════════════════════════════════════ */
#mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  background: var(--navy);
  color: var(--white);
  z-index: var(--z-mobile-nav);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-8);
}
#mobile-nav[hidden] { display: none; }

.mnav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--gutter);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mnav-close {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.6rem; line-height: 1;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
}
.mnav-close:hover { background: rgba(255,255,255,.16); }

/* Large centered logo on mobile */
.mnav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--gutter) var(--sp-5);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mnav-brand img { width: 84px; height: 84px; }
.mnav-brand .hdr-name { color: var(--white); font-size: 1.25rem; }
.mnav-brand .hdr-slogan { color: var(--gold); max-height: none; opacity: 1; white-space: normal; }

.mnav-list { list-style: none; margin: 0; padding: var(--sp-3) var(--gutter); }
.mnav-list > li { margin: 0; border-bottom: 1px solid rgba(255,255,255,.10); }

.mnav-link, .mnav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  min-height: 52px;
  padding: var(--sp-3) 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  text-align: left;
}
.mnav-toggle .caret { transition: transform var(--dur) var(--ease); flex-shrink: 0; }
.mnav-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.mnav-toggle[aria-expanded="true"] { color: var(--gold); }

.mnav-sub { list-style: none; margin: 0; padding: 0 0 var(--sp-4) var(--sp-4); }
.mnav-sub[hidden] { display: none; }
.mnav-sub li { margin: 0; }
.mnav-sub a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  font-size: var(--fs-base);
  color: rgba(255,255,255,.85);
  text-decoration: none;
  border-left: 2px solid rgba(255,255,255,.18);
}
.mnav-sub a:hover, .mnav-sub a:focus-visible {
  color: var(--gold);
  border-left-color: var(--gold);
}

.mnav-actions {
  padding: var(--sp-5) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.mnav-utility {
  padding: 0 var(--gutter) var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.mnav-utility a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-pill);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}
.mnav-utility a:hover { border-color: var(--gold); color: var(--gold); }

/* Lock body scroll while the mobile panel is open */
body.nav-open { overflow: hidden; }
