/* ============================================================
   CIE British School - Website Mockup v11 smart-media repair
   Mobile-first. Base = 390px. Scales up.
   ============================================================ */

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

:root {
  --blue-900:  #083470;
  --blue-800:  #0B4E93;
  --blue-700:  #0E62B0;
  --blue-600:  #1A7ACB;
  --blue-100:  #E8F1FB;
  --blue-50:   #F0F6FF;
  --gold:      #F6D21B;
  --gold-dark: #C9A800;
  --gold-bg:   #FFFBEA;

  --white:     #FFFFFF;
  --off-white: #F7F5F0;
  --ink:       #1A2332;
  --ink-light: #2D3E54;
  --slate:     #5A6F87;
  --slate-lt:  #8FA3B8;
  --border:    #DDE4EE;
  --border-md: #C3D0DF;

  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans:  'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  /* Mobile-first spacing */
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --sh-sm: 0 2px 8px rgba(8,52,112,.08);
  --sh-md: 0 4px 20px rgba(8,52,112,.10);
  --sh-lg: 0 8px 40px rgba(8,52,112,.13);
}

/* ============================================================
   BASE - mobile (390px)
   ============================================================ */
html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-900); }
button { cursor: pointer; font-family: var(--font-sans); }

/* Type */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.875rem, 6vw, 3rem);    font-weight: 700; }
h2 { font-size: clamp(1.375rem, 4vw, 2.125rem); font-weight: 700; }
h3 { font-size: clamp(1.125rem, 3vw, 1.375rem); font-weight: 700; }
h4 { font-size: 1rem;    font-weight: 700; }
h5 { font-size: .9375rem; font-weight: 700; }
p  { line-height: 1.8; }

.eyebrow {
  display: block;
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-700); margin-bottom: .5rem;
}
.eyebrow--gold  { color: var(--gold-dark); }
.eyebrow--white { color: rgba(246,210,27,.9); }

/* Layout */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-5); }

/* Sections - mobile padding first */
.section     { padding: var(--sp-12) 0; }
.section--sm { padding: var(--sp-8) 0; }
.section--tint { background: var(--off-white); }
.section--pale { background: var(--blue-50); }
.section--blue { background: var(--blue-800); }

.sec-head { margin-bottom: var(--sp-8); }
.sec-head h2 { margin-bottom: .625rem; }
.sec-head p  { color: var(--slate); font-size: 1.0625rem; max-width: 60ch; line-height: 1.75; }
.sec-head--center { text-align: center; }
.sec-head--split { display:flex; justify-content:space-between; align-items:flex-end; gap:var(--sp-4); flex-wrap:wrap; }
.sec-head--center p { margin: 0 auto; }

/* Buttons - 48px min height everywhere */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  min-height: 48px; padding: .75rem 1.5rem;
  border-radius: var(--r-sm); border: none;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap; line-height: 1; cursor: pointer;
}
.btn--primary      { background: var(--blue-800); color: var(--white); }
.btn--primary:hover { background: var(--blue-900); color: var(--white); }
.btn--gold         { background: var(--gold); color: var(--ink); }
.btn--gold:hover   { background: #e4c000; }
.btn--outline      { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.45); }
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--ghost-blue   { background: transparent; color: var(--blue-800); border: 1.5px solid var(--blue-800); }
.btn--ghost-blue:hover { background: var(--blue-800); color: var(--white); }
.btn--sm { font-size: .875rem; min-height: 40px; padding: .5rem 1.125rem; }
.btn--full { width: 100%; }

/* ============================================================
   DASHBOARD ANNOTATION
   ============================================================ */
.editable-zone { position: relative; }

/* Badge sits top-left, inline with content flow */
.dash-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.97);
  border: 1.5px solid var(--blue-700);
  border-radius: 4px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: .6875rem; font-weight: 700; letter-spacing: .02em;
  color: var(--blue-800);
  box-shadow: 0 2px 8px rgba(8,52,112,.12);
  pointer-events: none;
  white-space: nowrap;
  margin-bottom: var(--sp-4);
}
.dash-badge svg { width: 12px; height: 12px; color: var(--blue-700); flex-shrink: 0; }
.dash-badge--gold {
  border-color: var(--gold-dark); color: #7B5800;
  background: rgba(255,251,234,.98);
}
.dash-badge--gold svg { color: var(--gold-dark); }

/* Fixed legend */
.dash-legend {
  position: fixed; bottom: 16px; right: 16px; z-index: 9999;
  background: var(--blue-900); color: rgba(255,255,255,.88);
  font-family: var(--font-sans); font-size: .75rem; line-height: 1.5;
  padding: 10px 14px; border-radius: var(--r-md);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  display: flex; align-items: flex-start; gap: 8px;
  max-width: 260px; pointer-events: none;
}
.dash-legend svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   UTILITY BAR - hidden on mobile, shown tablet+
   ============================================================ */
.util-bar { display: none; }

/* ============================================================
   ANNOUNCEMENTS BAR
   ============================================================ */
.announce-bar { background: var(--gold); padding: .75rem 0; }
.announce-bar .wrap {
  display: flex; flex-direction: column;
  gap: .5rem; align-items: flex-start;
}
.announce-label {
  font-size: .675rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--blue-900); color: var(--white);
  padding: .2rem .625rem; border-radius: 2px; flex-shrink: 0;
}
.announce-content { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.announce-text { font-size: .9375rem; font-weight: 600; color: var(--blue-900); line-height: 1.5; }
.announce-text a { color: var(--blue-900); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   MAIN NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(8,52,112,.06);
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: var(--sp-4);
}
.nav-logo img { height: 36px; width: auto; }

/* Desktop nav links - hidden on mobile */
.nav-links { display: none; }

.nav-cta { display: flex; align-items: center; gap: var(--sp-3); }
/* Hide secondary CTA on mobile */
.nav-cta .btn--ghost-blue { display: none; }
.nav-cta .btn { font-size: .875rem; min-height: 40px; padding: .5rem 1.125rem; }

.nav-toggle {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: .5rem; color: var(--ink);
  min-width: 44px; min-height: 44px;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Mobile drawer */
.nav-drawer { display: none; position: fixed; inset: 0; z-index: 200; }
.nav-drawer-overlay { position: absolute; inset: 0; background: rgba(26,35,50,.6); }
.nav-drawer-panel {
  position: absolute; top: 0; right: 0;
  width: min(340px, 88vw); height: 100%;
  background: var(--white); display: flex; flex-direction: column; overflow-y: auto;
}
.nav-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.nav-drawer-header img { height: 32px; }
.nav-drawer-close {
  background: none; border: none; color: var(--slate);
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.nav-drawer-close svg { width: 22px; height: 22px; }
.nav-drawer-links { list-style: none; flex: 1; }
.nav-drawer-links li a {
  display: flex; align-items: center;
  padding: 0 var(--sp-6); min-height: 56px;
  font-size: 1.0625rem; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.nav-drawer-links li a:hover { color: var(--blue-800); background: var(--blue-50); }
.nav-drawer-footer { padding: var(--sp-6); border-top: 1px solid var(--border); }
.nav-drawer-footer .btn { width: 100%; justify-content: center; font-size: 1rem; min-height: 52px; }
.nav-drawer.open { display: block; }

/* ============================================================
   HERO - mobile: photo top, text below
   ============================================================ */
.hero { position: relative; }

/* Photo panel - top half on mobile */
.hero-photo {
  position: relative;
  height: 52vw; min-height: 200px; max-height: 320px;
  overflow: hidden;
}
.hero-photo-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
}
.hero-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,52,112,.35) 0%,
    rgba(8,52,112,.55) 100%
  );
}
.hero-photo-badge {
  position: absolute; bottom: var(--sp-4); left: var(--sp-5);
  display: inline-flex; align-items: center; gap: .375rem;
  background: rgba(8,52,112,.75);
  border: 1px solid rgba(246,210,27,.4);
  color: var(--gold);
  font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 2px;
  backdrop-filter: blur(4px);
}
.hero-photo-badge svg { width: 10px; height: 10px; }

/* Text panel - below photo on mobile */
.hero-text {
  background: var(--blue-900);
  padding: var(--sp-8) var(--sp-5) var(--sp-10);
}
.hero-text h1 { color: var(--white); margin-bottom: var(--sp-4); }
.hero-text h1 em { font-style: italic; color: var(--gold); display: block; }
.hero-lead {
  color: rgba(255,255,255,.78); font-size: 1.0625rem;
  line-height: 1.8; margin-bottom: var(--sp-6); max-width: 52ch;
}
.hero-actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.hero-actions .btn { width: 100%; font-size: 1rem; min-height: 52px; }

/* Stats - 2x2 grid on mobile */
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md); overflow: hidden;
}
.hero-stat {
  background: rgba(255,255,255,.05);
  padding: var(--sp-4) var(--sp-5);
}
.hero-stat-num {
  font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700;
  color: var(--gold); line-height: 1; margin-bottom: .25rem;
}
.hero-stat-label { font-size: .8125rem; color: rgba(255,255,255,.6); line-height: 1.4; }
.hero-gold-line { height: 3px; background: linear-gradient(90deg, var(--gold), rgba(246,210,27,.15)); }

/* ============================================================
   QUICK PATHWAYS
   ============================================================ */
.pathways { background: var(--white); border-bottom: 1px solid var(--border); }
.pathways-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pathway-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--sp-5) var(--sp-4);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--ink);
  transition: background .18s; gap: var(--sp-3);
  min-height: 88px;
}
.pathway-item:nth-child(2n) { border-right: none; }
.pathway-item:nth-last-child(-n+2) { border-bottom: none; }
.pathway-item:hover { background: var(--blue-50); color: var(--blue-800); }
.pathway-icon {
  width: 44px; height: 44px; background: var(--blue-50);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.pathway-icon svg { width: 22px; height: 22px; color: var(--blue-800); }
.pathway-label { font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.pathway-sub   { font-size: .8125rem; color: var(--slate); line-height: 1.3; }

/* ============================================================
   PROGRAMS
   ============================================================ */
.programs-grid { display: flex; flex-direction: column; gap: var(--sp-4); }

.program-card {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--white); overflow: hidden;
  transition: box-shadow .22s;
}
.program-card:hover { box-shadow: var(--sh-md); }
.program-card-accent { height: 4px; background: var(--blue-800); }
.program-card-body {
  padding: var(--sp-6) var(--sp-5);
  display: flex; flex-direction: column;
}
.program-stage {
  font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: var(--sp-2);
}
.program-card h3 { font-size: 1.1875rem; margin-bottom: .375rem; }
.program-card-age { font-size: .875rem; color: var(--slate); margin-bottom: var(--sp-4); }
.program-card p { font-size: .9375rem; color: var(--slate); line-height: 1.75; }
.program-card-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.program-tag {
  background: var(--blue-50); color: var(--blue-800);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: .3rem .75rem; border-radius: 3px;
}
.program-card-link {
  display: inline-flex; align-items: center; gap: .375rem;
  margin-top: var(--sp-4); font-size: .9375rem; font-weight: 700; color: var(--blue-800);
  min-height: 44px;
}
.program-card-link svg { width: 14px; height: 14px; }

/* Higher Ed card */
.program-card--he {
  border-color: var(--blue-700);
  background: var(--blue-50);
}
.program-card--he .program-card-accent {
  background: linear-gradient(90deg, var(--blue-700), var(--blue-900));
}
.he-features {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-3); margin-top: var(--sp-5);
}
.he-feature {
  background: var(--white); border: 1px solid var(--border-md);
  border-radius: var(--r-md); padding: var(--sp-4);
}
.he-feature h5 { font-family: var(--font-sans); font-size: .875rem; font-weight: 700; margin-bottom: .25rem; color: var(--blue-900); }
.he-feature p  { font-size: .8125rem; color: var(--slate); line-height: 1.55; }

/* Assessment strip */
.assessment-strip {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-6) var(--sp-5);
  margin-top: var(--sp-6);
}
.assessment-strip-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate); margin-bottom: var(--sp-3); margin-top: var(--sp-4);
}
.assessment-strip-label:first-child { margin-top: 0; }
.assessment-strip h3 { font-size: 1.0625rem; margin-bottom: var(--sp-3); }
.assessment-strip > p { font-size: .9375rem; color: var(--slate); line-height: 1.7; margin-bottom: var(--sp-5); }
.assessment-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.assessment-badge {
  background: var(--blue-50); color: var(--blue-900); border: 1px solid var(--border-md);
  font-size: .8125rem; font-weight: 600; padding: .4rem .875rem; border-radius: 3px;
}
.assessment-badge--eng { background: var(--gold-bg); border-color: rgba(246,210,27,.4); color: #5A3D00; }

/* ============================================================
   ADMISSIONS
   ============================================================ */
/* Mobile: everything stacks */
.admissions-layout { display: flex; flex-direction: column; gap: var(--sp-8); }

.admissions-intro h2 { margin-bottom: var(--sp-4); }
.admissions-intro > p { color: var(--slate); margin-bottom: var(--sp-5); line-height: 1.8; }
.admissions-cta-row { display: flex; flex-direction: column; gap: var(--sp-3); }
.admissions-cta-row .btn { width: 100%; }

.admissions-requirements {
  margin-top: var(--sp-5); padding: var(--sp-5);
  background: var(--gold-bg); border: 1px solid rgba(246,210,27,.4); border-radius: var(--r-md);
}
.admissions-requirements h5 {
  font-size: .8125rem; font-family: var(--font-sans); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--sp-3);
}
.req-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.req-list li {
  font-size: .9375rem; color: var(--ink-light);
  display: flex; gap: var(--sp-3); align-items: flex-start; line-height: 1.6;
}
.req-list li::before {
  content: ''; display: block; width: 6px; height: 6px;
  background: var(--gold-dark); border-radius: 50%;
  margin-top: .55em; flex-shrink: 0;
}
.req-list-note { font-size: .875rem; color: var(--slate); margin-top: var(--sp-4); line-height: 1.65; }

/* Journey steps */
.journey-steps { display: flex; flex-direction: column; gap: var(--sp-3); }
.journey-step {
  display: grid; grid-template-columns: auto 1fr;
  gap: var(--sp-4); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-5);
}
.step-indicator { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.step-num {
  width: 40px; height: 40px; background: var(--blue-800); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0; font-family: var(--font-serif);
}
.step-line { width: 1px; flex: 1; min-height: 12px; background: var(--border); }
.journey-step:last-child .step-line { display: none; }
.step-content h4 { font-size: 1rem; margin-bottom: var(--sp-2); }
.step-content p  { font-size: .9375rem; color: var(--slate); line-height: 1.7; }

/* ============================================================
   NEWS / EVENTS - Option C: side-by-side featured
   ============================================================ */
/* Mobile: stacked */
.news-featured {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column;
}
.news-featured-img-wrap {
  width: 100%; overflow: hidden;
}
.news-featured-img {
  width: 100%; height: 240px;
  object-fit: cover; object-position: center top;
  display: block;
}
.news-featured-body { padding: var(--sp-6) var(--sp-5); }

.news-tag {
  display: inline-block;
  font-size: .675rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .625rem; border-radius: 3px; margin-bottom: var(--sp-3);
}
.news-tag--achievement { background: #E8F5E9; color: #1B5E20; }
.news-tag--news        { background: var(--blue-50); color: var(--blue-800); }
.news-tag--event       { background: var(--gold-bg); color: #7B5800; }
.news-tag--alumni      { background: #F3E5F5; color: #4A148C; }

.news-featured-body h3 { font-size: 1.25rem; margin-bottom: var(--sp-3); line-height: 1.3; }
.news-featured-body p  { font-size: 1rem; color: var(--slate); margin-bottom: var(--sp-5); line-height: 1.75; }
.news-read-more {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .9375rem; font-weight: 700; color: var(--blue-800); min-height: 44px;
}
.news-read-more svg { width: 14px; height: 14px; }

/* Sidebar items */
.news-sidebar { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-5); }
.news-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4); display: flex; gap: var(--sp-4); align-items: flex-start;
}
.news-item-img {
  width: 72px; height: 72px; border-radius: var(--r-md);
  object-fit: cover; object-position: center top; flex-shrink: 0;
}
.news-item-body .news-tag { margin-bottom: .375rem; }
.news-item-body h4 { font-size: .9375rem; margin-bottom: .25rem; line-height: 1.4; }
.news-item-body p  { font-size: .875rem; color: var(--slate); line-height: 1.55; }

.news-sidebar-cta { text-align: center; padding: var(--sp-4) 0 0; }
.news-sidebar-cta a {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .9375rem; font-weight: 700; color: var(--blue-800); min-height: 44px;
}

/* Event strip - 2 columns on mobile */
.event-strip { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-6); }
.event-card { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--white); }
.event-card-img { width: 100%; height: 100px; object-fit: cover; object-position: center top; }
.event-card-body { padding: var(--sp-3) var(--sp-4); }
.event-card-body h5 { font-family: var(--font-sans); font-size: .875rem; font-weight: 700; margin-bottom: 2px; }
.event-card-body p  { font-size: .8125rem; color: var(--slate); line-height: 1.5; }

/* ============================================================
   IDENTITY / PEARL PRINCIPLE
   ============================================================ */
.identity-layout { display: flex; flex-direction: column; gap: var(--sp-8); }
.identity-text h2 { color: var(--white); margin-bottom: var(--sp-4); }
.identity-text > p { color: rgba(255,255,255,.72); line-height: 1.8; margin-bottom: var(--sp-4); }
.identity-quote { border-left: 3px solid var(--gold); padding-left: var(--sp-5); margin: var(--sp-6) 0; }
.identity-quote blockquote {
  font-family: var(--font-serif); font-size: 1.0625rem; font-style: italic;
  color: rgba(255,255,255,.88); line-height: 1.7;
}
.values-column { display: flex; flex-direction: column; gap: var(--sp-4); }
.value-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg); padding: var(--sp-5);
  display: flex; gap: var(--sp-4); align-items: flex-start;
}
.value-icon {
  width: 44px; height: 44px; background: rgba(246,210,27,.12);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.value-icon svg { width: 22px; height: 22px; color: var(--gold); }
.value-body h4 { color: var(--white); font-size: 1.0625rem; margin-bottom: var(--sp-2); }
.value-body p  { color: rgba(255,255,255,.62); font-size: .9375rem; line-height: 1.7; }

/* ============================================================
   GOVERNANCE
   ============================================================ */
.governance-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.governance-profile,
.governance-record {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.governance-profile { display: grid; grid-template-columns: 1fr; }
.governance-stack { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.governance-record { display: grid; grid-template-columns: 1fr; }
.governance-portrait,
.governance-document { background: var(--blue-50); }
.governance-portrait { aspect-ratio: 4 / 5; }
.governance-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.governance-document {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.governance-document img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: center center;
}
.governance-copy { padding: var(--sp-5); }
.governance-label {
  font-size: .675rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: var(--sp-2);
}
.governance-copy h3 { font-size: 1.125rem; margin-bottom: var(--sp-3); }
.governance-copy p { font-size: .9375rem; color: var(--slate); line-height: 1.7; }
.governance-link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--blue-800);
  margin-top: var(--sp-4);
  min-height: 44px;
}
.governance-link svg { width: 13px; height: 13px; }

/* ============================================================
   DOWNLOADS
   ============================================================ */
.downloads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.download-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3);
  transition: box-shadow .2s, border-color .2s; text-decoration: none; color: var(--ink);
}
.download-card:hover { box-shadow: var(--sh-md); border-color: var(--blue-600); color: var(--ink); }
.download-icon {
  width: 48px; height: 48px; background: var(--blue-50);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
}
.download-icon svg { width: 24px; height: 24px; color: var(--blue-800); }
.download-card h4 { font-size: .9375rem; }
.download-card p  { font-size: .875rem; color: var(--slate); line-height: 1.6; flex: 1; }
.download-card-action {
  font-size: .875rem; font-weight: 700; color: var(--blue-800);
  display: flex; align-items: center; gap: .375rem; min-height: 44px;
}
.download-card-action svg { width: 13px; height: 13px; }

/* ============================================================
   CAMPUS / CONTACT
   ============================================================ */
.campus-grid { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-8); }
.campus-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.campus-card--main { border-top: 3px solid var(--blue-800); }
.campus-card-top { padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.campus-city { font-size: .675rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-700); margin-bottom: var(--sp-2); }
.campus-card h4 { font-size: 1.0625rem; }
.campus-badge {
  display: inline-block; margin-top: var(--sp-2);
  font-size: .675rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--blue-800); color: var(--white); padding: .25rem .625rem; border-radius: 2px;
}
.campus-card-body { padding: var(--sp-5); }
.campus-detail {
  font-size: .9375rem; color: var(--slate); line-height: 1.65;
  display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-3);
}
.campus-detail:last-child { margin-bottom: 0; }
.campus-detail svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--blue-600); }
.campus-detail a { color: var(--blue-700); }

.contact-cta-bar {
  background: var(--white); border: 1px solid var(--border-md); border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-5); margin-top: var(--sp-6);
}
.contact-cta-bar h3 { margin-bottom: var(--sp-3); }
.contact-cta-bar > p { color: var(--slate); font-size: 1rem; margin-bottom: var(--sp-5); line-height: 1.7; }
.contact-actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.contact-actions .btn { width: 100%; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--blue-100); color: var(--blue-900); }
.footer-main { padding: var(--sp-10) 0 var(--sp-8); background: var(--blue-100); }
.footer-brand { margin-bottom: var(--sp-8); }
.footer-brand img {
  width: min(260px, 82vw);
  height: auto;
  margin-bottom: var(--sp-5);
  filter: none;
  opacity: 1;
}
.footer-brand p { font-size: .9375rem; color: var(--ink-light); line-height: 1.7; max-width: 44ch; }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.footer-social a {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,52,112,.08); color: var(--blue-900);
  transition: background .18s, color .18s;
}
.footer-social a:hover { background: var(--blue-800); color: var(--white); }
.footer-social a svg { width: 18px; height: 18px; }
.footer-cols { display: flex; flex-direction: column; gap: var(--sp-6); margin-bottom: 0; }
.footer-col h5 {
  font-family: var(--font-sans); font-size: .75rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-900); margin-bottom: var(--sp-3);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col ul a { font-size: .9375rem; color: var(--ink-light); min-height: 44px; display: flex; align-items: center; }
.footer-col ul a:hover { color: var(--blue-800); }
.footer-bottom { background: var(--blue-900); color: rgba(255,255,255,.78); }
.footer-bottom-inner { padding-top: var(--sp-5); padding-bottom: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-bottom p { font-size: .875rem; color: rgba(255,255,255,.74); line-height: 1.5; }
.footer-bottom-links { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.footer-bottom-links a { font-size: .875rem; color: rgba(255,255,255,.72); min-height: 44px; display: inline-flex; align-items: center; }
.footer-bottom-links a:hover { color: var(--gold); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0; transform: translateY(12px);
    transition: opacity .42s ease-out, transform .42s ease-out;
  }
  .fade-up.visible { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TABLET - min-width: 640px
   ============================================================ */
@media (min-width: 640px) {
  .wrap { padding: 0 var(--sp-8); }
  .section     { padding: var(--sp-16) 0; }
  .section--sm { padding: var(--sp-10) 0; }

  .util-bar { display: block; background: var(--blue-900); color: rgba(255,255,255,.6); font-size: .8125rem; padding: .5rem 0; }
  .util-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
  .util-bar-left, .util-bar-right { display: flex; gap: 1.5rem; align-items: center; }
  .util-bar a { color: rgba(255,255,255,.6); font-size: .8rem; }
  .util-bar a:hover { color: var(--white); }
  .util-divider { width: 1px; height: 12px; background: rgba(255,255,255,.2); display: inline-block; }

  .announce-bar .wrap { flex-direction: row; }

  .site-nav .wrap { height: 72px; }
  .nav-logo img { height: 40px; }

  /* Hero - side by side on tablet */
  .hero { display: flex; flex-direction: column; }
  .hero-photo { height: 44vh; max-height: 420px; }
  .hero-text { padding: var(--sp-10) var(--sp-8) var(--sp-12); }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; min-width: 180px; }
  .hero-stats { grid-template-columns: repeat(4,1fr); }

  /* Pathways - 5 columns */
  .pathways-grid { grid-template-columns: repeat(5,1fr); }
  .pathway-item { border-bottom: none; }
  .pathway-item:nth-child(2n) { border-right: 1px solid var(--border); }
  .pathway-item:last-child { border-right: none; }

  /* Programs - 2 col */
  .programs-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .program-card--he { grid-column: span 2; }

  /* Admissions */
  .admissions-cta-row { flex-direction: row; }
  .admissions-cta-row .btn { width: auto; }

  /* News */
  .news-sidebar { margin-top: 0; }

  /* Downloads - 2 col stays */

  /* Governance stays photo-safe on tablet */
  .governance-layout { grid-template-columns: 1fr; }
  .governance-record { grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); }

  /* Campus - 2 col */
  .campus-grid { display: grid; grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-cols { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-bottom-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ============================================================
   DESKTOP - min-width: 960px
   ============================================================ */
@media (min-width: 1180px) {
  .section     { padding: var(--sp-20) 0; }
  .section--sm { padding: var(--sp-12) 0; }

  /* Show desktop nav */
  .nav-links { display: flex; list-style: none; height: 100%; align-items: stretch; gap: 0; }
  .nav-links li { display: flex; align-items: stretch; }
  .nav-links a {
    display: flex; align-items: center; padding: 0 var(--sp-4);
    font-size: .875rem; font-weight: 600; color: var(--ink-light);
    border-bottom: 2px solid transparent;
    transition: color .18s, border-color .18s; white-space: nowrap;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--blue-800); border-bottom-color: var(--blue-800); }
  .nav-cta .btn--ghost-blue { display: inline-flex; }
  .nav-toggle { display: none; }

  /* Hero - full bleed photo with overlay */
  .hero { display: block; min-height: clamp(580px, 78vh, 740px); position: relative; }
  .hero-photo {
    position: absolute; inset: 0;
    height: 100%; max-height: none;
  }
  .hero-photo-img { height: 100%; object-position: center 40%; }
  .hero-photo-overlay {
    background: linear-gradient(
      108deg,
      rgba(8,52,112,.92) 0%,
      rgba(8,52,112,.82) 40%,
      rgba(8,52,112,.50) 65%,
      rgba(8,52,112,.20) 100%
    );
  }
  .hero-photo-badge { bottom: var(--sp-6); left: var(--sp-8); }
  .hero-text {
    position: relative; z-index: 1; background: transparent;
    padding: var(--sp-20) 0;
    max-width: 640px;
  }
  .hero-text h1 { max-width: 16ch; }
  .hero-lead { max-width: 50ch; }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; min-width: 0; min-height: 52px; padding: .875rem 1.75rem; font-size: 1rem; }
  .hero-stats {
    display: flex; gap: var(--sp-8); background: transparent;
    border: none; border-radius: 0; overflow: visible;
  }
  .hero-stat { background: transparent; padding: 0; }
  .hero-stat-num { font-size: 1.75rem; }
  .hero-gold-line {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(246,210,27,.15));
  }

  /* Programs - 2 col stays, Higher Ed full width */
  .program-card--he .program-card-body { flex-direction: row; gap: var(--sp-10); align-items: flex-start; }
  .he-main { flex: 1; }
  .he-features { min-width: 300px; margin-top: 0; }

  /* Assessment strip - side by side */
  .assessment-strip {
    display: grid; grid-template-columns: auto 1fr; gap: var(--sp-10); align-items: start;
    padding: var(--sp-8) var(--sp-10);
  }
  .assessment-strip-label:first-child { margin-top: 0; }

  /* Admissions - side by side */
  .admissions-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
  .admissions-cta-row { flex-direction: row; }
  .admissions-cta-row .btn { width: auto; }

  /* News - featured Option C side by side */
  .news-main-col { display: flex; flex-direction: column; gap: var(--sp-5); }
  .news-featured { flex-direction: row; }
  .news-featured-img-wrap { width: 46%; flex-shrink: 0; }
  .news-featured-img { height: 100%; min-height: 280px; object-fit: cover; }
  .news-featured-body { padding: var(--sp-8) var(--sp-7); display: flex; flex-direction: column; justify-content: center; }
  .news-featured-body h3 { font-size: 1.375rem; }
  .news-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-8); align-items: start; }
  .news-sidebar { margin-top: 0; }

  /* Event strip - 4 col */
  .event-strip { grid-template-columns: repeat(4,1fr); }

  /* Governance - mixed photo-safe layout */
  .governance-layout--mixed { grid-template-columns: minmax(320px, .95fr) minmax(0, 1.55fr); align-items: stretch; }
  .governance-profile { height: 100%; }
  .governance-document { min-height: 260px; }

  /* Campus - 3 col */
  .campus-grid { grid-template-columns: repeat(3,1fr); }

  /* Contact CTA bar */
  .contact-cta-bar {
    display: grid; grid-template-columns: 1fr auto; gap: var(--sp-8); align-items: center;
    padding: var(--sp-8) var(--sp-10);
  }
  .contact-actions { flex-direction: column; align-items: flex-end; }
  .contact-actions .btn { width: auto; }

  /* Downloads - 4 col */
  .downloads-grid { grid-template-columns: repeat(4,1fr); }

  /* Footer */
  .footer-main { padding: var(--sp-12) 0 var(--sp-10); }
  .footer-grid { display: grid; grid-template-columns: minmax(280px, 1.4fr) minmax(0, 2fr); gap: var(--sp-12); align-items: start; }
  .footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-8); }
  .footer-brand img { width: 300px; }
}

/* ============================================================
   LARGE DESKTOP - min-width: 1200px
   ============================================================ */
@media (min-width: 1200px) {
  .wrap { padding: 0 var(--sp-6); }
  .sec-head { margin-bottom: var(--sp-10); }
}


/* ============================================================
   V9 CONTROLLED REPAIR OVERRIDES
   Strict v3 repair. No new visual direction.
   ============================================================ */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

html:not(.js) .fade-up,
.fade-up { opacity: 1; transform: none; }
.js .fade-up { opacity: 0; transform: translateY(12px); transition: opacity .42s var(--ease-out), transform .42s var(--ease-out); }
.js .fade-up.visible { opacity: 1; transform: translateY(0); }

/* Bigger but properly reserved official logo area */
.site-nav .wrap { min-height: 76px; height: auto; padding-block: .55rem; }
.nav-logo { display:flex; align-items:center; flex: 0 0 auto; }
.nav-logo img { height: 52px; width: auto; }
.nav-drawer-header img { height: 48px; width: auto; }
@media (min-width: 640px) {
  .site-nav .wrap { min-height: 88px; }
  .nav-logo img { height: 66px; }
}
@media (min-width: 1180px) {
  .nav-logo img { height: 74px; }
  .site-nav .wrap { gap: var(--sp-5); }
  .nav-links a { padding: 0 .78rem; }
}

/* Hero content must align to the site grid, not the browser wall */
@media (min-width: 1180px) {
  .hero-text { max-width: none; width: 100%; }
  .hero-text .wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--sp-6); }
  .hero-text h1,
  .hero-lead,
  .hero-actions,
  .hero-stats { max-width: 560px; }
  .hero-photo-badge { left: max(var(--sp-6), calc((100vw - 1200px) / 2 + var(--sp-6))); }
}
.hero-stat-num--word { font-size:1rem; font-family:var(--font-sans); padding-top:.25rem; }
.pathways-wrap { padding: 0; }
.pathways-grid .pathway-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .pathways-grid .pathway-item:last-child:nth-child(odd) { grid-column: auto; } }

/* Editable overlay: hidden by default, highlighted only when requested */
.dash-badge { display:none; margin:0; white-space: normal; }
.edit-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 9998;
  min-height: 44px; padding: .65rem 1rem;
  border: 1px solid var(--border-md); border-radius: var(--r-sm);
  background: var(--white); color: var(--blue-900);
  font-family: var(--font-sans); font-size: .875rem; font-weight: 700;
  box-shadow: var(--sh-lg);
}
.edit-toggle[aria-pressed="true"] { background: var(--blue-900); color: var(--white); border-color: var(--blue-900); }
body.edit-mode .editable-zone { outline: 2px solid rgba(246,210,27,.86); outline-offset: -6px; box-shadow: inset 0 0 0 9999px rgba(246,210,27,.035); }
body.edit-mode .editable-zone > .wrap { position: relative; }
body.edit-mode .editable-zone .dash-badge {
  display: inline-flex; position: absolute; top: 10px; left: 10px; z-index: 4;
  background: var(--gold-bg); border: 1px solid var(--gold-dark);
  color: var(--blue-900); border-radius: var(--r-sm); padding: 5px 9px;
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: var(--sh-sm); pointer-events:none;
}
body.edit-mode .announce-bar .dash-badge { position: static; margin-right: .75rem; }

/* Higher Education: stop the receipt-column bug */
.program-stage--he { color: var(--blue-900); }
.program-card-tags--he { margin-top: var(--sp-4); }
.program-card-link--he { margin-top: var(--sp-5); }
.program-card--he { grid-column: 1 / -1; }
.program-card--he .program-card-body { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.he-main { max-width: 68ch; }
@media (min-width: 640px) {
  .he-features { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .program-card--he .program-card-body { grid-template-columns: minmax(340px, .9fr) minmax(0, 1.6fr); gap: var(--sp-8); align-items: start; }
  .he-features { min-width: 0; width: 100%; margin-top: 0; }
}
@media (min-width: 1180px) {
  .program-card--he .program-card-body { grid-template-columns: minmax(390px, .88fr) minmax(0, 1.55fr); }
}

/* Assessment: grouped layout, no huge blank field, no ovals */
.assessment-strip { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); align-items: start; }
.assessment-copy { max-width: 64ch; }
.assessment-groups { display: grid; gap: var(--sp-5); }
.assessment-group { display: grid; gap: var(--sp-3); }
.assessment-strip-label { margin:0; color: var(--blue-800); }
.assessment-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.assessment-badge { border-radius: var(--r-sm); padding: .45rem .75rem; line-height: 1.25; }
@media (min-width: 960px) {
  .assessment-strip { grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr); gap: var(--sp-10); padding: var(--sp-8) var(--sp-10); }
}

/* Featured news: keep the image and article connected but give the text breathing room */
.news-featured { gap: 0; }
.news-featured-body { padding: var(--sp-6); }
.news-read-more { background: transparent; border: 0; cursor: pointer; font-family: var(--font-sans); }
.article-trigger-card { cursor: pointer; }
.article-trigger-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
@media (min-width: 960px) {
  .news-featured { display: grid; grid-template-columns: minmax(300px, 46%) minmax(0, 1fr); }
  .news-featured-img-wrap { width: auto; border-right: 1px solid var(--border); }
  .news-featured-body { padding: var(--sp-8) var(--sp-8); }
}

/* Article modal: controlled article view, not giant cropped billboard */
.article-modal { display:none; position:fixed; inset:0; z-index:10000; }
.article-modal.is-open { display:block; }
.article-modal__backdrop { position:absolute; inset:0; background: rgba(8, 25, 52, .68); }
.article-modal__panel {
  position:relative; z-index:1; width:min(920px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px));
  margin: 14px auto; background: var(--white); border:1px solid var(--border-md); border-radius: var(--r-lg);
  overflow:auto; box-shadow: 0 24px 80px rgba(0,0,0,.34);
}
.article-modal__close {
  position:absolute; top:12px; right:12px; z-index:2; width:44px; height:44px;
  border:1px solid var(--border-md); border-radius: var(--r-sm); background: var(--white); color: var(--blue-900);
  font-size: 1.8rem; line-height: 1; display:flex; align-items:center; justify-content:center;
}
.article-modal__media { border-bottom:1px solid var(--border); background: var(--blue-50); }
.article-modal__media img { width:100%; height: clamp(180px, 28vw, 260px); object-fit: cover; object-position: center top; }
.article-modal__content { padding: var(--sp-7) var(--sp-6); }
.article-modal__content h2 { font-size: clamp(1.55rem, 4vw, 2.4rem); margin: .5rem 0 var(--sp-4); }
.article-modal__body { display:grid; gap: var(--sp-4); color: var(--slate); font-size: 1.05rem; line-height: 1.75; max-width: 72ch; }
@media (min-width: 760px) {
  .article-modal__panel { margin: 6vh auto; display:grid; grid-template-columns: 330px minmax(0,1fr); max-height: 82vh; }
  .article-modal__media { border-bottom:0; border-right:1px solid var(--border); }
  .article-modal__media img { height:100%; min-height: 420px; }
  .article-modal__content { padding: var(--sp-8); }
}

/* Restrained crest accent, only in eyebrows */
.eyebrow { display:inline-flex; align-items:center; gap:.45rem; }
.eyebrow::before {
  content:''; width:20px; height:20px; flex:0 0 20px; display:inline-block;
  background: url('../assets/logos/cie-shield.png') center/contain no-repeat;
}
.eyebrow--white::before { filter: none; opacity: 1; }

/* No accidental giant decorative icons */
.campus-detail svg, .pathway-icon svg, .value-icon svg, .btn svg, .program-card-link svg, .news-read-more svg { max-width: 24px; max-height: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .fade-up { opacity: 1; transform: none; }
}

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

.admissions-requirements--spaced { margin-top: var(--sp-6); }


/* ============================================================
   V11 CONTROLLED REPAIR: photo-safe news cards, smart modal media,
   darker institutional footer, and equal stacked actions.
   ============================================================ */

/* Footer can be darker while still protecting the full-color logo. */
.site-footer,
.footer-main {
  background: #d7e5f2;
}
.footer-brand img {
  width: min(300px, 84vw);
}
@media (min-width: 960px) {
  .footer-brand img { width: 330px; }
}

/* Equal-width stacked CTA/button groups. */
.stacked-actions,
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
  width: 100%;
}
.stacked-actions .btn,
.contact-actions .btn {
  width: 100%;
  min-width: 0;
}
@media (min-width: 960px) {
  .stacked-actions,
  .contact-actions {
    width: 260px;
    align-items: stretch;
    justify-self: end;
  }
  .stacked-actions .btn,
  .contact-actions .btn {
    width: 100%;
  }
}

/* Photo-safe media containers: dashboard uploads may be portrait, landscape, or square. */
.smart-media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-50), #f9fbfe);
  display: grid;
  place-items: center;
}
.smart-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(8,52,112,.03)),
    radial-gradient(circle at 25% 15%, rgba(246,210,27,.12), transparent 34%);
  pointer-events: none;
}
.smart-media__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-position: center center;
}
.smart-media.is-landscape .smart-media__img { object-fit: cover; }
.smart-media.is-portrait .smart-media__img,
.smart-media.is-square .smart-media__img { object-fit: contain; padding: 6px; }

/* News section: cleaner media-safe composition. */
.news-featured {
  border-radius: var(--r-lg);
}
.news-featured-img-wrap {
  min-height: 240px;
  border-bottom: 1px solid var(--border);
}
.news-featured-img {
  height: 100%;
  min-height: 240px;
}
.news-featured-img-wrap.is-portrait .news-featured-img,
.news-featured-img-wrap.is-square .news-featured-img {
  object-fit: contain;
  padding: var(--sp-3);
}
.news-featured-body {
  padding: var(--sp-6);
}
.news-item {
  align-items: stretch;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .18s cubic-bezier(.16,1,.3,1), box-shadow .18s cubic-bezier(.16,1,.3,1);
}
.news-item:hover,
.event-card:hover,
.news-featured:hover {
  border-color: var(--blue-700);
  box-shadow: var(--sh-md);
}
.news-item-media {
  width: 82px;
  min-height: 82px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  flex: 0 0 82px;
}
.news-item-img {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.event-card {
  cursor: pointer;
  transition: border-color .18s cubic-bezier(.16,1,.3,1), box-shadow .18s cubic-bezier(.16,1,.3,1), transform .18s cubic-bezier(.16,1,.3,1);
}
.event-card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border);
}
.event-card-img {
  width: 100%;
  height: 100%;
}
.event-card-media.is-portrait .event-card-img,
.event-card-media.is-square .event-card-img { object-fit: contain; padding: 5px; }

@media (min-width: 960px) {
  .news-featured {
    display: grid;
    grid-template-columns: minmax(320px, 44%) minmax(0, 1fr);
  }
  .news-featured-img-wrap {
    width: auto;
    min-height: 300px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .news-featured-img { min-height: 300px; }
  .news-featured-body { padding: var(--sp-8); }
  .news-item-media {
    width: 96px;
    min-height: 96px;
    flex-basis: 96px;
  }
}

/* Smart article lightbox: no more giant accidental face crops. */
.article-modal__panel {
  overflow: auto;
}
.article-modal__media {
  background: linear-gradient(135deg, var(--blue-50), #f9fbfe);
  display: grid;
  place-items: center;
}
.article-modal__media img {
  width: 100%;
  height: clamp(200px, 34vh, 340px);
  object-fit: contain;
  object-position: center center;
  padding: var(--sp-3);
  background: transparent;
}
.article-modal.media-landscape .article-modal__panel,
.article-modal.media-square .article-modal__panel,
.article-modal.media-portrait .article-modal__panel {
  max-width: min(960px, calc(100vw - 28px));
}
.article-modal__content {
  padding: var(--sp-7) var(--sp-6);
}
@media (min-width: 760px) {
  .article-modal.media-landscape .article-modal__panel {
    display: block;
    margin: 5vh auto;
  }
  .article-modal.media-landscape .article-modal__media {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .article-modal.media-landscape .article-modal__media img {
    height: min(420px, 44vh);
    min-height: 0;
  }

  .article-modal.media-portrait .article-modal__panel,
  .article-modal.media-square .article-modal__panel {
    display: grid;
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
    max-height: 86vh;
  }
  .article-modal.media-portrait .article-modal__media,
  .article-modal.media-square .article-modal__media {
    border-bottom: 0;
    border-right: 1px solid var(--border);
    min-height: 460px;
  }
  .article-modal.media-portrait .article-modal__media img,
  .article-modal.media-square .article-modal__media img {
    height: 100%;
    min-height: 460px;
    max-height: 86vh;
  }
}

/* Modal content should feel like an article, not an image preview. */
.article-modal__content h2 {
  max-width: 12ch;
}
@media (max-width: 759px) {
  .article-modal__content h2 { max-width: 100%; }
}

/* Remove old direct image assumptions after smart wrappers. */
.news-item > .news-item-img,
.event-card > .event-card-img { display: none; }

/* ============================================================
   V12 CONTROLLED REPAIR: truly safe article/media layouts.
   No crops by default for newsroom/dashboard-uploaded media.
   ============================================================ */

/* News/event cards: protect mixed portrait, landscape, square, and poster graphics. */
.news-featured-img-wrap,
.news-item-media,
.event-card-media {
  background: linear-gradient(135deg, var(--blue-50), color-mix(in srgb, var(--blue-50), white 42%));
}

.news-featured-img,
.news-item-img,
.event-card-img,
.smart-media.is-landscape .smart-media__img,
.smart-media.is-portrait .smart-media__img,
.smart-media.is-square .smart-media__img {
  object-fit: contain;
  object-position: center center;
}

.news-featured-img,
.news-item-img,
.event-card-img {
  padding: 8px;
}

.news-featured-img-wrap {
  min-height: 220px;
}
.news-featured-img {
  min-height: 220px;
  height: 100%;
}

.news-featured-body {
  min-width: 0;
}
.news-featured-body h3 {
  max-width: 18ch;
}
.news-featured-body p {
  max-width: 48ch;
}

.news-item-media {
  min-height: 92px;
}
.event-card-media {
  aspect-ratio: 4 / 3;
  min-height: 112px;
}

@media (min-width: 960px) {
  .news-featured {
    grid-template-columns: minmax(320px, 48%) minmax(320px, 1fr);
  }
  .news-featured-img-wrap {
    min-height: 320px;
  }
  .news-featured-img {
    min-height: 320px;
    padding: 10px;
  }
  .news-featured-body h3 {
    max-width: 20ch;
  }
}

/* Article modal: consistent readable article view, not a zoomed photo preview. */
.article-modal__panel {
  width: min(920px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
  border-radius: 8px;
}
.article-modal__close {
  top: 14px;
  right: 14px;
  z-index: 3;
}
.article-modal__media {
  background: linear-gradient(135deg, var(--blue-50), color-mix(in srgb, var(--blue-50), white 45%));
  display: grid;
  place-items: center;
  min-height: 180px;
  border-bottom: 1px solid var(--border);
}
.article-modal__media img {
  width: 100%;
  height: min(36vh, 320px);
  min-height: 0;
  object-fit: contain;
  object-position: center center;
  padding: clamp(10px, 1.8vw, 18px);
}
.article-modal__content {
  padding: clamp(24px, 4vw, 44px);
  max-width: 760px;
}
.article-modal__content h2 {
  max-width: none;
  font-size: clamp(1.65rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  word-break: normal;
}
.article-modal__body {
  max-width: 62ch;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

@media (min-width: 760px) {
  .article-modal.media-landscape .article-modal__panel,
  .article-modal.media-square .article-modal__panel,
  .article-modal.media-portrait .article-modal__panel {
    width: min(920px, calc(100vw - 56px));
    max-width: min(920px, calc(100vw - 56px));
    display: block;
    margin: 5vh auto;
  }

  .article-modal.media-landscape .article-modal__media,
  .article-modal.media-square .article-modal__media,
  .article-modal.media-portrait .article-modal__media {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    min-height: 220px;
  }

  .article-modal.media-landscape .article-modal__media img,
  .article-modal.media-square .article-modal__media img,
  .article-modal.media-portrait .article-modal__media img {
    height: min(36vh, 330px);
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }
}

@media (min-width: 1040px) {
  /* Portrait modal can use a side article layout only when there is enough width. */
  .article-modal.media-portrait .article-modal__panel {
    display: grid;
    grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
    width: min(980px, calc(100vw - 72px));
    max-width: min(980px, calc(100vw - 72px));
    align-items: stretch;
  }
  .article-modal.media-portrait .article-modal__media {
    border-bottom: 0;
    border-right: 1px solid var(--border);
    min-height: 480px;
  }
  .article-modal.media-portrait .article-modal__media img {
    height: 100%;
    min-height: 480px;
    max-height: 86vh;
  }
  .article-modal.media-portrait .article-modal__content {
    max-width: none;
  }
  .article-modal.media-portrait .article-modal__content h2 {
    font-size: clamp(1.85rem, 3.1vw, 3rem);
  }
}

@media (max-width: 520px) {
  .article-modal__panel {
    width: calc(100vw - 20px);
    max-height: 88vh;
  }
  .article-modal__media img {
    height: min(32vh, 240px);
  }
  .article-modal__content {
    padding: 22px 20px 28px;
  }
  .article-modal__content h2 {
    font-size: clamp(1.55rem, 8.5vw, 2.25rem);
  }
}
