/* =========================================================
   BMC Schools, Saki — Stylesheet
   Tokens: navy / green / gold on cream, Fraunces + Inter + IBM Plex Mono
   ========================================================= */

:root{
  --navy: #0A3D62;
  --navy-dark: #062A45;
  --navy-tint: #E7EEF3;
  --green: #1B8A6B;
  --green-dark: #136350;
  --gold: #E4A73B;
  --gold-dark: #C6871F;
  --cream: #FAFAF7;
  --white: #FFFFFF;
  --ink: #16241F;
  --ink-soft: #45564F;
  --line: #E1E6E2;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(10,61,98,0.08);
  --shadow-md: 0 12px 32px rgba(10,61,98,0.12);
  --container: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4{ font-family: var(--font-display); color: var(--navy-dark); margin: 0 0 0.5em; line-height: 1.15; }
p{ margin: 0 0 1em; color: var(--ink-soft); }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }

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

/* Skip link */
.skip-link{
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 12px 20px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn-sm{ padding: 10px 20px; font-size: 0.85rem; }
.btn-block{ width: 100%; }

.btn-gold{ background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-dark); box-shadow: var(--shadow-sm); }
.btn-gold:hover{ box-shadow: var(--shadow-md); }

.btn-navy{ background: var(--navy); color: #fff; }
.btn-navy:hover{ background: var(--navy-dark); }

.btn-outline-navy{ border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover{ background: var(--navy); color: #fff; }

.btn-outline-light{ border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline-light:hover{ background: rgba(255,255,255,0.12); }

/* ---------- Header ---------- */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,61,98,0.92);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, padding 0.3s ease;
}
.site-header.is-scrolled{ background: rgba(6,42,69,0.97); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

.nav-wrap{
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand{ display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand-mark{ color: var(--gold); display: flex; }
.brand-text{ display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-display); }
.brand-text strong{ font-size: 1.15rem; letter-spacing: 0.03em; }
.brand-text span{ font-size: 0.68rem; color: rgba(255,255,255,0.7); font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; }

.main-nav ul{ display: flex; align-items: center; gap: 28px; }
.main-nav a{ color: rgba(255,255,255,0.88); font-weight: 500; font-size: 0.94rem; padding: 6px 2px; position: relative; }
.main-nav a:not(.nav-cta)::after{
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.main-nav a:not(.nav-cta):hover::after{ transform: scaleX(1); }
.main-nav a.nav-cta{
  background: var(--green); padding: 8px 18px; border-radius: 999px; color: #fff;
}
.main-nav a.nav-cta:hover{ background: var(--green-dark); }

/* Portal quick-access dropdown */
.nav-dropdown{ position: relative; }
.nav-dropdown-toggle{
  background: var(--green); border: none; padding: 8px 16px; border-radius: 999px; color: #fff;
  font-family: inherit; font-size: 0.94rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.nav-dropdown-toggle:hover{ background: var(--green-dark); }
.nav-dropdown-toggle .caret{ font-size: 0.7rem; transition: transform 0.2s ease; }
.nav-dropdown-toggle[aria-expanded="true"] .caret{ transform: rotate(180deg); }

.nav-dropdown-menu{
  position: absolute; top: calc(100% + 12px); right: 0; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 10px 0; min-width: 230px; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.nav-dropdown-menu.is-open{ opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-dropdown-heading{
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); padding: 10px 18px 4px; margin: 0;
}
.nav-dropdown-menu a{ color: var(--navy-dark); font-size: 0.9rem; padding: 9px 18px; }
.nav-dropdown-menu a:hover{ background: var(--navy-tint); }
.nav-dropdown-all{ border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; color: var(--green-dark) !important; font-weight: 600; }

.nav-actions{ display: flex; align-items: center; gap: 14px; }

.hamburger{
  display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px;
}
.hamburger span{ width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero{
  position: relative; min-height: 92vh; display: flex; align-items: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 55%, var(--green-dark) 130%);
  color: #fff; overflow: hidden; padding: 140px 0 80px;
}
.hero-bg{ position: absolute; inset: 0; opacity: 0.5; }
.pulse-strip{ position: absolute; top: 38%; left: 0; width: 130%; height: 120px; }
#pulsePath{ stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw-pulse 3.6s ease-out forwards, drift 14s linear 3.6s infinite; }
@keyframes draw-pulse{ to{ stroke-dashoffset: 0; } }
@keyframes drift{ from{ transform: translateX(0); } to{ transform: translateX(-8%); } }

.hero-inner{ position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 0 24px; text-align: center; }
.eyebrow{
  font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); margin-bottom: 18px;
}
.hero h1{ color: #fff; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; margin-bottom: 22px; }
.hero-lede{ color: rgba(255,255,255,0.85); font-size: 1.08rem; max-width: 620px; margin: 0 auto 34px; }
.hero-actions{ display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-motto{ margin-top: 22px; font-family: var(--font-display); font-style: italic; font-size: 0.98rem; color: rgba(255,255,255,0.75); max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-motto span{ display: block; margin-top: 6px; font-family: var(--font-mono); font-style: normal; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }
.hero-vitals{ display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.vitals-dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(27,138,107,0.6); animation: pulse-dot 1.8s ease-out infinite; }
@keyframes pulse-dot{
  0%{ box-shadow: 0 0 0 0 rgba(27,138,107,0.55); }
  70%{ box-shadow: 0 0 0 10px rgba(27,138,107,0); }
  100%{ box-shadow: 0 0 0 0 rgba(27,138,107,0); }
}

/* ---------- Sections generic ---------- */
.section{ padding: 96px 0; }
.section-cream{ background: var(--cream); }
.section-white{ background: var(--white); }
.section-navy{ background: linear-gradient(160deg, var(--navy), var(--navy-dark)); color: #fff; }

.section-eyebrow{
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem;
  color: var(--green-dark); margin-bottom: 12px; font-weight: 500;
}
.section-eyebrow-light{ color: var(--gold); }
.section-title{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 500; max-width: 760px; }
.section-title-light{ color: #fff; }
.section-lede{ color: var(--ink-soft); max-width: 640px; margin-bottom: 40px; }
.section-lede-light{ color: rgba(255,255,255,0.8); }

/* scroll reveal */
.reveal{ opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* Image placeholder */
.img-placeholder{
  background: repeating-linear-gradient(135deg, var(--navy-tint), var(--navy-tint) 12px, #dfe9ee 12px, #dfe9ee 24px);
  border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
  color: var(--navy); font-weight: 600; font-size: 0.9rem; border: 1px solid var(--line); min-height: 220px; padding: 20px;
}
.placeholder-icon{ width: 44px; height: 44px; color: var(--navy); opacity: 0.55; flex-shrink: 0; }

/* ---------- About ---------- */
.about-grid{ display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; margin-top: 32px; }
.about-columns{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.about-block h3{ font-size: 1.05rem; margin-bottom: 8px; color: var(--green-dark); }
.about-block p{ font-size: 0.94rem; }
.about-figure{ position: relative; }
.about-photo{ aspect-ratio: 4/5; min-height: 360px; }
.about-badge{
  position: absolute; bottom: -24px; left: -24px; background: var(--gold); color: var(--navy-dark);
  border-radius: var(--radius-sm); padding: 16px 22px; box-shadow: var(--shadow-md); text-align: center;
}
.about-badge-num{ display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.about-badge-label{ display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

.motto-block{
  margin: 28px 0; padding: 22px 26px; border-left: 4px solid var(--gold); background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.motto-block p{ font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--navy-dark); margin: 0 0 8px; }
.motto-block footer{ font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-dark); }

/* History timeline */
.history-timeline{ margin-top: 72px; }
.history-title{ font-size: 1.3rem; margin-bottom: 32px; }
.timeline-list{ list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline-list li{ display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 0 0 32px 28px; position: relative; }
.timeline-list li::before{
  content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--cream);
}
.timeline-year{ font-family: var(--font-mono); font-weight: 500; color: var(--green-dark); font-size: 0.88rem; padding-top: 2px; }
.timeline-list h4{ font-size: 1rem; margin-bottom: 6px; }
.timeline-list p{ font-size: 0.9rem; margin: 0; }

/* ---------- Stats ---------- */
.stats-band{ background: var(--green-dark); padding: 56px 0; }
.stats-grid{ display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; text-align: center; }
.stat{ color: #fff; }
.stat-number{ display: block; font-family: var(--font-mono); font-size: 2.1rem; font-weight: 500; color: var(--gold); }
.stat-label{ display: block; font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-top: 4px; }

/* ---------- School cards ---------- */
.school-cards{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.school-card{
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.school-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-4px); }
.school-photo{ border-radius: 0; min-height: 190px; }
.school-card-body{ padding: 26px; }
.school-card-body h3{ font-size: 1.2rem; }
.school-levels{ margin: 14px 0 20px; }
.school-levels li{ font-size: 0.86rem; color: var(--ink-soft); padding: 5px 0 5px 20px; position: relative; }
.school-levels li::before{ content: '•'; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.school-card-actions{ display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Programmes ---------- */
.programme-group{ margin-bottom: 48px; }
.programme-group:last-child{ margin-bottom: 0; }
.programme-group-title{ font-size: 1.15rem; color: var(--navy); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.programme-cards{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.programme-card{
  background: var(--white); border-radius: var(--radius-sm); padding: 24px; border: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.programme-card:hover{ box-shadow: var(--shadow-sm); }
.programme-icon{ font-size: 1.6rem; display: block; margin-bottom: 10px; }
.programme-card h4{ font-size: 1rem; margin-bottom: 6px; }
.programme-card p{ font-size: 0.88rem; margin: 0; }

/* ---------- Admissions ---------- */
.admissions-grid{ display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; margin-top: 40px; }
.steps-list li{ display: flex; gap: 18px; margin-bottom: 28px; }
.step-num{
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700;
}
.steps-list h3{ color: #fff; font-size: 1.05rem; }
.steps-list p{ color: rgba(255,255,255,0.75); font-size: 0.92rem; margin: 0; }

.admissions-side{ display: flex; flex-direction: column; gap: 20px; }
.info-card{ background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); padding: 24px; }
.info-card h3{ color: #fff; font-size: 1.05rem; }
.info-card p{ color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }
.plain-list li{ display: flex; justify-content: space-between; font-size: 0.9rem; color: rgba(255,255,255,0.85); padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.15); }
.plain-list li:last-child{ border-bottom: none; }
.download-link{ display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 600; margin-top: 10px; font-size: 0.9rem; }
.download-link:hover{ text-decoration: underline; }

.faq{ margin-top: 64px; }
.faq h3{ color: #fff; margin-bottom: 20px; }
.accordion-item{ border-bottom: 1px solid rgba(255,255,255,0.18); }
.accordion-trigger{
  width: 100%; text-align: left; background: none; border: none; color: #fff; font-family: var(--font-body);
  font-size: 0.98rem; font-weight: 600; padding: 18px 0; display: flex; justify-content: space-between; align-items: center;
}
.accordion-trigger::after{ content: '+'; font-size: 1.3rem; color: var(--gold); transition: transform 0.25s ease; }
.accordion-trigger[aria-expanded="true"]::after{ transform: rotate(45deg); }
.accordion-panel{ max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.accordion-panel p{ color: rgba(255,255,255,0.75); font-size: 0.9rem; padding-bottom: 18px; margin: 0; }

/* ---------- News ---------- */
.news-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.news-card{ background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; border-left: 4px solid var(--green); }
.news-tag{ font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green-dark); background: #E4F2EC; padding: 3px 10px; border-radius: 999px; }
.news-card time{ display: block; font-size: 0.78rem; color: var(--ink-soft); margin: 10px 0 8px; }
.news-card h3{ font-size: 1.02rem; margin-bottom: 8px; }
.news-card p{ font-size: 0.88rem; margin: 0; }

/* ---------- Gallery ---------- */
.gallery-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.gallery-item{
  border: none; padding: 0; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; position: relative;
  background: repeating-linear-gradient(135deg, var(--navy-tint), var(--navy-tint) 12px, #dfe9ee 12px, #dfe9ee 24px);
  display: flex; align-items: center; justify-content: center; transition: transform 0.25s ease;
}
.gallery-item .placeholder-icon{ width: 40px; height: 40px; color: var(--navy); opacity: 0.5; transition: opacity 0.25s ease, transform 0.25s ease; }
.gallery-item span{
  position: absolute; inset: auto 0 0 0; background: rgba(10,61,98,0.85); color: #fff; font-size: 0.85rem;
  padding: 10px 14px; text-align: left; font-weight: 500;
}
.gallery-item:hover{ outline: 3px solid var(--gold); outline-offset: -3px; transform: translateY(-3px); }
.gallery-item:hover .placeholder-icon{ opacity: 0.8; transform: scale(1.08); }

.lightbox{
  position: fixed; inset: 0; background: rgba(6,20,20,0.9); z-index: 200; display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden]{ display: none; }
.lightbox-body{ width: min(720px, 90vw); }
.lightbox-photo{ min-height: 420px; }
.lightbox-close{ position: absolute; top: 24px; right: 32px; background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; }

/* ---------- Testimonials ---------- */
.testimonial-carousel{ max-width: 760px; margin: 40px auto 0; text-align: center; }
.testimonial-track{ position: relative; min-height: 160px; }
.testimonial-slide{
  margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--navy-dark);
  display: none;
}
.testimonial-slide.active{ display: block; }
.testimonial-slide footer{ margin-top: 18px; font-family: var(--font-body); font-style: normal; font-size: 0.85rem; color: var(--ink-soft); }
.testimonial-controls{ display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 24px; }
.testimonial-controls button{ background: var(--navy-tint); border: none; width: 38px; height: 38px; border-radius: 50%; color: var(--navy); font-size: 1.1rem; }
.testimonial-dots{ display: flex; gap: 8px; }
.testimonial-dots button{ width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--line); border: none; }
.testimonial-dots button.active{ background: var(--green); }

/* ---------- Downloads ---------- */
.downloads-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }
.download-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px 18px;
  text-align: center; transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.download-card:hover{ box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.download-icon{ font-size: 1.8rem; display: block; margin-bottom: 12px; }
.download-name{ display: block; font-weight: 600; font-size: 0.92rem; color: var(--navy-dark); margin-bottom: 4px; }
.download-meta{ display: block; font-size: 0.76rem; color: var(--ink-soft); }

/* ---------- Portal Gateway ---------- */
.portal-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.portal-card{
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; transition: border-color 0.25s ease, transform 0.25s ease;
}
.portal-card:hover{ border-color: var(--gold); transform: translateY(-4px); }
.portal-icon{ font-size: 2rem; margin-bottom: 14px; }
.portal-card h3{ color: #fff; font-size: 1.1rem; }
.portal-card p{ color: rgba(255,255,255,0.72); font-size: 0.88rem; flex-grow: 1; }
.portal-card-student{ border-color: var(--gold); background: rgba(228,167,59,0.08); }
.portal-sub-toggle{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.portal-sub-btn{
  background: none; border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); border-radius: 999px;
  padding: 8px 14px; font-size: 0.8rem; text-align: left; transition: background 0.2s ease, border-color 0.2s ease;
}
.portal-sub-btn.active{ background: var(--gold); color: var(--navy-dark); border-color: var(--gold); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-grid{ display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; margin-top: 40px; }
.form-row{ margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label{ font-size: 0.85rem; font-weight: 600; color: var(--navy-dark); }
.form-row input, .form-row select, .form-row textarea{
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-family: inherit; font-size: 0.95rem;
  background: var(--cream);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{ background: #fff; }
.form-status{ margin-top: 14px; font-size: 0.88rem; color: var(--green-dark); font-weight: 600; }

.map-embed{ margin-bottom: 22px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe{ width: 100%; height: 220px; border: 0; display: block; }
.map-embed-link{
  display: block; background: var(--navy-tint); color: var(--navy-dark); font-size: 0.82rem; font-weight: 600;
  padding: 10px 14px; text-align: right;
}
.map-embed-link:hover{ background: #dfe9ee; }
.contact-details{ margin-bottom: 22px; }
.contact-details li{ font-size: 0.92rem; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.contact-details li strong{ color: var(--navy-dark); }

.social-icons{ display: flex; gap: 12px; }
.social-icons a{
  width: 38px; height: 38px; border-radius: 50%; background: var(--navy-tint); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.social-icons a:hover{ background: var(--green); color: #fff; }

/* ---------- Footer ---------- */
.site-footer{ background: var(--navy-dark); color: rgba(255,255,255,0.8); padding-top: 72px; }
.footer-grid{ display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
.footer-brand{ color: #fff; margin-bottom: 14px; }
.footer-about p{ color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.footer-links h3{ color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-links ul li{ margin-bottom: 10px; font-size: 0.9rem; }
.footer-links ul li a:hover{ color: var(--gold); }
.footer-contact li{ color: rgba(255,255,255,0.65); }

.footer-bottom{ border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; }
.footer-bottom-inner{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; }
.footer-legal{ display: flex; gap: 20px; }
.footer-legal a:hover{ color: var(--gold); }

/* ---------- Portal restricted note ---------- */
.portal-restricted-note{
  margin: 14px 0 0; font-size: 0.76rem; color: rgba(255,255,255,0.6); display: flex; align-items: flex-start; gap: 6px;
}

/* ---------- Secure Login Modal ---------- */
.login-modal{ position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-modal[hidden]{ display: none; }
.login-overlay{ position: absolute; inset: 0; background: rgba(6,20,20,0.62); backdrop-filter: blur(3px); }

.login-dialog{
  position: relative; width: min(440px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 40px 32px 28px; text-align: center;
  animation: login-pop 0.25s ease;
}
@keyframes login-pop{ from{ opacity: 0; transform: translateY(10px) scale(0.98); } to{ opacity: 1; transform: translateY(0) scale(1); } }

.login-close{
  position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--ink-soft);
  font-size: 1.6rem; line-height: 1; padding: 4px 8px; border-radius: 50%;
}
.login-close:hover{ background: var(--navy-tint); color: var(--navy-dark); }

.login-badge{
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: var(--gold);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}

.login-eyebrow{
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--green-dark); margin-bottom: 6px; font-weight: 600;
}
.login-heading{ font-size: 1.3rem; margin-bottom: 10px; }
.login-desc{ font-size: 0.88rem; margin-bottom: 22px; }

.login-school-toggle{ display: flex; gap: 8px; margin-bottom: 22px; }
.login-school-btn{
  flex: 1; background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 6px; font-family: inherit; font-size: 0.74rem; font-weight: 600; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.login-school-icon{ font-size: 1.15rem; }
.login-school-btn:hover{ border-color: var(--green); }
.login-school-btn.active{ background: var(--navy); border-color: var(--navy); color: #fff; }

.login-dialog .form-row{ text-align: left; margin-bottom: 16px; }
.login-password-wrap{ position: relative; display: flex; align-items: center; }
.login-password-wrap input{ width: 100%; padding-right: 44px; }
.login-password-toggle{
  position: absolute; right: 6px; background: none; border: none; padding: 8px; border-radius: 8px;
  color: var(--ink-soft); font-size: 1rem;
}
.login-password-toggle:hover{ background: var(--navy-tint); }

.login-form-meta{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 0.8rem; }
.login-remember{ display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.login-forgot{ color: var(--green-dark); font-weight: 600; }
.login-forgot:hover{ text-decoration: underline; }

.login-status{ margin-top: 14px; font-size: 0.85rem; font-weight: 600; color: var(--green-dark); min-height: 1.2em; }
.login-status.is-error{ color: #B3261E; }

.login-restricted{
  margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 0.74rem; color: var(--ink-soft); display: flex; align-items: flex-start; gap: 6px; text-align: left;
}

@media (max-width: 480px){
  .login-dialog{ padding: 32px 22px 24px; }
  .login-school-toggle{ flex-direction: column; }
  .login-school-btn{ flex-direction: row; justify-content: center; padding: 10px; }
}

/* ---------- Standalone auth page (login.html) ---------- */
.auth-page{ background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 55%, var(--green-dark) 130%); min-height: 100vh; }
.auth-topbar{
  display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; max-width: var(--container); margin: 0 auto;
}
.auth-topbar .brand{ color: #fff; }
.auth-back{ color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.auth-back:hover{ color: var(--gold); }

.auth-shell{ display: flex; align-items: center; justify-content: center; padding: 20px 20px 60px; }
.auth-card{ margin: 0 auto; }

.auth-switch{ margin-top: 18px; font-size: 0.86rem; color: var(--ink-soft); }
.auth-switch a{ color: var(--green-dark); font-weight: 700; }
.auth-switch a:hover{ text-decoration: underline; }

@media (max-width: 640px){
  .auth-topbar{ flex-direction: column; gap: 10px; text-align: center; }
}

/* ---------- Back to top ---------- */
.back-to-top{
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--navy-dark); border: none; font-size: 1.2rem; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 90;
}
.back-to-top.is-visible{ opacity: 1; pointer-events: auto; }
.back-to-top:hover{ transform: translateY(-3px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px){
  .school-cards{ grid-template-columns: repeat(2, 1fr); }
  .programme-cards{ grid-template-columns: repeat(2, 1fr); }
  .news-grid{ grid-template-columns: repeat(2, 1fr); }
  .downloads-grid{ grid-template-columns: repeat(3, 1fr); }
  .portal-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid{ grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .about-grid, .admissions-grid, .contact-grid{ grid-template-columns: 1fr; }
  .about-figure{ order: -1; }
}

@media (max-width: 860px){
  .main-nav{
    position: fixed; top: 66px; left: 0; right: 0; background: var(--navy-dark);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
    max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .main-nav.is-open{ opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul{ flex-direction: column; align-items: stretch; padding: 12px 24px 24px; gap: 4px; }
  .main-nav a{ display: block; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-nav a.nav-cta{ margin-top: 10px; text-align: center; }
  .hamburger{ display: flex; }
  .nav-actions .btn-gold{ display: none; }
}

@media (max-width: 640px){
  .section{ padding: 64px 0; }
  .school-cards, .programme-cards, .news-grid, .downloads-grid, .portal-grid{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-columns{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: repeat(2, 1fr); }
  .hero{ min-height: unset; padding: 120px 0 64px; }
  .timeline-list li{ grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 860px){
  .nav-dropdown{ width: 100%; }
  .nav-dropdown-toggle{ width: 100%; justify-content: space-between; margin-top: 10px; }
  .nav-dropdown-menu{
    position: static; box-shadow: none; background: rgba(255,255,255,0.06); opacity: 1; transform: none;
    pointer-events: auto; display: none; margin-top: 6px; border-radius: var(--radius-sm);
  }
  .nav-dropdown-menu.is-open{ display: flex; }
  .nav-dropdown-menu a{ color: #fff; }
  .nav-dropdown-menu a:hover{ background: rgba(255,255,255,0.08); }
  .nav-dropdown-heading{ color: rgba(255,255,255,0.5); }
  .nav-dropdown-all{ border-top-color: rgba(255,255,255,0.15); }
}
