/* =====================================================================
   Chinmaya Vidyalaya, Rajapalayam — shared design system
   Palette drawn from the school emblem: royal blue rings, lamp green,
   saffron flame and vermilion lettering.
   ===================================================================== */

:root {
  /* Brand */
  --primary: #1a4f96;
  --primary-700: #123a72;
  --primary-900: #0b2546;
  --primary-50: #edf3fb;
  --primary-100: #d9e6f7;
  --secondary: #17804d;
  --secondary-50: #e8f5ee;
  --accent: #e8a019;
  --accent-600: #c9830a;
  --accent-ink: #8a5600;
  --accent-50: #fdf4e3;
  --vermilion: #c62a35;

  /* Neutrals — warm ivory "heritage" paper */
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f4efe4;
  --text: #1c2230;
  --text-2: #2f3747;
  --text-muted: #5b6272;
  --text-soft: #858b97;
  --border: #e9e2d3;
  --border-strong: #d6ccb8;

  /* Text roles (separate from brand fills so dark mode can lighten them) */
  --heading: #0b2546;
  --link: #1a4f96;
  --link-hover: #123a72;
  --green-text: #17804d;
  --brand-red: #b3202c;
  --brand-brown: #7a3b14;
  --header-bg: rgba(255, 255, 255, .96);
  --plate: #ffffff;
  --brand-green-top: #23a463;
  --brand-green-bottom: #0c5a34;

  /* Status */
  --success: #17804d;
  --warning: #b86e00;
  --danger: #c62a35;
  --info: #1a4f96;

  /* Type */
  --font-head: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-brand: Cambria, "Caladea", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h4: 1.125rem;
  --fs-h3: clamp(1.2rem, 1.1rem + .4vw, 1.375rem);
  --fs-h2: clamp(1.45rem, 1.25rem + .8vw, 1.875rem);
  --fs-h1: clamp(1.9rem, 1.4rem + 2vw, 3rem);

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 64, .06), 0 1px 3px rgba(16, 32, 64, .08);
  --shadow: 0 4px 10px rgba(16, 32, 64, .06), 0 10px 28px rgba(16, 32, 64, .08);
  --shadow-lg: 0 18px 50px rgba(11, 37, 70, .18);
  --ring: 0 0 0 3px rgba(232, 160, 25, .55);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* clip (not hidden) so body never becomes its own scroll container on mobile */
html { overflow-x: clip; }
html.scroll-lock { overflow: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; border: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--heading); line-height: 1.22; letter-spacing: 0; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 1000; background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 var(--fs-sm)/1 var(--font-body);
  padding: .8rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: #2a1a00; box-shadow: 0 6px 16px rgba(232, 160, 25, .35); }
.btn-primary:hover { background: var(--accent-600); color: #1c1100; }
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-700); color: #fff; }
.btn-outline { border-color: var(--border-strong); color: var(--heading); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); color: var(--link); }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-sm { padding: .55rem .95rem; font-size: var(--fs-xs); }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; }
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Utility bar ---------- */
.topbar { background: var(--primary-900); color: #c9d6ea; font-size: var(--fs-xs); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar a { color: #e3ebf7; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-contact, .topbar-links { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.topbar-contact a, .topbar-links a { display: inline-flex; align-items: center; gap: .4rem; }
.topbar-links .switch { color: var(--accent); font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-main .container { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { height: 56px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-name { font: 800 1.25rem/1.15 var(--font-head); color: var(--green-text); letter-spacing: .02em; text-transform: uppercase; }
.brand-school { font-size: var(--fs-xs); font-weight: 600; color: var(--brand-red); margin-top: 2px; }
.brand-trust { font-size: .75rem; color: var(--text-soft); font-style: italic; }
.header-badges { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.header-badges img { height: 52px; width: auto; border-radius: 6px; }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--heading); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Landing header (Index.html) ---------- */
.landing-header { position: relative; z-index: 5; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.landing-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: linear-gradient(90deg, var(--secondary) 0 33.3%, var(--accent) 33.3% 66.6%, var(--vermilion) 66.6% 100%); }
.landing-head { max-width: 1400px; display: flex; align-items: center; justify-content: space-between; gap: clamp(1rem, 3vw, 2.5rem); padding-block: .7rem .85rem; }
.landing-brand { display: flex; align-items: center; gap: clamp(.75rem, 1.5vw, 1.15rem); text-decoration: none; color: inherit; min-width: 0; }
/* Fallback sizes; site.js matches the emblem to the exact height of the name block */
.landing-brand { align-items: flex-start; }
.landing-emblem { height: clamp(114px, 9vw, 131px); width: auto; flex: none; mix-blend-mode: multiply; }
/* name and place share one row; school lines and trust wrap below */
.landing-titles { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .9rem; min-width: 0; }
.landing-name { font: 800 clamp(1.4rem, 1rem + 1.5vw, 2.1rem)/1.1 var(--font-head); color: var(--green-text); letter-spacing: .04em; text-transform: uppercase; }
.landing-place { font: 700 .72rem/1 var(--font-body); color: var(--link); letter-spacing: .28em; text-transform: uppercase; display: flex; align-items: center; gap: .6rem; }
.landing-place::before { content: ""; height: 2px; width: 28px; border-radius: 2px; background: var(--accent); }
.landing-schools, .landing-trust { flex-basis: 100%; }
.landing-schools { display: grid; gap: .1rem; margin-top: .4rem; }
.school-line { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); align-items: center; gap: .6rem; }
.school-tag { justify-self: start; width: 100%; text-align: center; font: 700 .62rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; padding: .3rem 0; border-radius: 999px; color: #fff; }
.school-tag.is-senior { background: var(--primary); }
.school-tag.is-junior { background: var(--secondary); }
.school-name { font: 700 clamp(.9rem, .8rem + .35vw, 1.08rem)/1.3 var(--font-head); color: var(--brand-red); }
.school-amp { padding-left: 4.8rem; font: 700 .8rem/.9 var(--font-head); color: var(--accent-600); }
.landing-trust { margin-top: .3rem; font-size: clamp(.76rem, .72rem + .15vw, .85rem); font-style: italic; font-weight: 500; color: var(--brand-brown); }
.landing-logos { display: flex; align-items: flex-start; gap: clamp(.6rem, 1.2vw, 1.1rem); list-style: none; margin: 0; padding: 0; flex: none; }
.landing-logos li { display: grid; grid-template-rows: auto auto; justify-items: center; align-content: start; row-gap: .45rem; width: clamp(80px, 6.8vw, 96px); text-align: center; }
/* Round frame the image fills completely; the gold ring sits right on its edge */
.logo-ring { display: block; width: clamp(60px, 5vw, 72px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; line-height: 0; box-shadow: 0 0 0 2px var(--accent), 0 4px 10px rgba(16, 32, 64, .14); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.logo-ring img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.logo-ring:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.logo-caption { display: block; min-height: 2.4em; font-size: .68rem; font-weight: 600; line-height: 1.2; color: var(--text-muted); text-wrap: balance; }

@media (min-width: 1280px) {
  .school-name { white-space: nowrap; }
}
@media (max-width: 1100px) {
  .landing-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .landing-brand { justify-content: center; }
  .landing-logos { justify-content: center; border-top: 1px dashed var(--border-strong); padding-top: .6rem; }
}
@media (max-width: 640px) {
  .landing-head { padding-block: .6rem .75rem; }
  .landing-brand { align-items: flex-start; }
  .landing-emblem { height: 120px; }
  .landing-titles { row-gap: .25rem; }
  .landing-name { font-size: 1.3rem; }
  .landing-place { flex-basis: 100%; font-size: .64rem; }
  .landing-place::before { width: 18px; }
  .school-line { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .45rem; align-items: start; }
  .school-tag { font-size: .56rem; padding: .28rem 0; margin-top: .12rem; }
  .school-name { font-size: .84rem; line-height: 1.3; }
  .school-amp { padding-left: 3.95rem; font-size: .72rem; }
  .landing-trust { font-size: .72rem; }
  .landing-logos { gap: .5rem; }
  .landing-logos li { width: 84px; }
  .logo-ring { width: 54px; }
  .logo-caption { font-size: .62rem; }
}

/* ---------- Primary navigation ---------- */
.primary-nav { border-top: 1px solid var(--border); background: var(--surface); }
.nav-list { display: flex; flex-wrap: wrap; align-items: stretch; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: .3rem; height: 50px; padding: 0 .8rem;
  font: 600 .9rem/1 var(--font-body); color: var(--text); text-decoration: none;
  background: none; border: 0; cursor: pointer; border-bottom: 2.5px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav-link .icon { width: 14px; height: 14px; color: var(--text-soft); transition: transform .2s var(--ease); }
.nav-item:hover > .nav-link, .nav-link:focus-visible, .nav-item.is-open > .nav-link { color: var(--link); }
.nav-item.is-current > .nav-link { color: var(--link); border-bottom-color: var(--accent); }
.dropdown {
  position: absolute; top: 100%; left: 0; z-index: 60; min-width: 250px;
  list-style: none; margin: 0; padding: .5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.dropdown.two-col { columns: 2; column-gap: .25rem; min-width: 480px; }
.dropdown li { break-inside: avoid; }
.dropdown a {
  display: block; padding: .55rem .8rem; border-radius: 9px; font-size: .9rem; line-height: 1.35;
  color: var(--text); text-decoration: none;
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--primary-50); color: var(--link); }
.dropdown a[aria-current="page"] { background: var(--accent-50); color: var(--accent-ink); font-weight: 600; }
@media (hover: hover) and (min-width: 1101px) {
  .nav-item:hover > .dropdown { opacity: 1; visibility: visible; transform: none; }
  .nav-item:hover > .nav-link .icon { transform: rotate(180deg); }
}
@media (min-width: 1101px) {
  .nav-item:focus-within > .dropdown, .nav-item.is-open > .dropdown { opacity: 1; visibility: visible; transform: none; }
  .nav-item:nth-last-child(-n+3) > .dropdown { left: auto; right: 0; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; background: var(--primary-900); }
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(11,37,70,.94) 0%, rgba(18,58,114,.86) 45%, rgba(18,58,114,.55) 100%); }
.page-hero .container { padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.page-hero h1 { color: #fff; font-size: var(--fs-h1); font-weight: 800; margin: .35rem 0 0; max-width: 22ch; }
.page-hero .subtitle { margin: .6rem 0 0; color: #d6e2f3; font-size: var(--fs-lg); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); color: #b9cae3; }
.breadcrumb a { color: #e3ebf7; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; opacity: .6; }
.eyebrow { display: inline-block; font: 700 .75rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- Inner page layout ---------- */
.page-body { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.page-grid.no-aside { grid-template-columns: minmax(0, 1fr); }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(1.25rem, 4vw, 2.75rem); min-width: 0; }
.aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 70px); }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.side-card h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .75rem; }
.side-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .925rem; line-height: 1.35; }
.side-nav a .icon { width: 14px; height: 14px; color: var(--text-soft); opacity: 0; transition: opacity .2s, transform .2s; }
.side-nav a:hover { background: var(--primary-50); color: var(--link); }
.side-nav a:hover .icon { opacity: 1; transform: translateX(2px); }
.side-nav a[aria-current="page"] { background: var(--primary); color: #fff; font-weight: 600; }
.side-nav a[aria-current="page"] .icon { opacity: 1; color: #fff; }
.contact-card { background: linear-gradient(150deg, var(--primary-700), var(--primary-900)); color: #d6e2f3; border: 0; }
.contact-card h2 { color: var(--accent); }
.contact-card p { margin: 0 0 .9rem; font-size: var(--fs-sm); }
.contact-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .65rem; font-size: var(--fs-sm); }
.contact-list li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.5; }
.contact-list .icon { margin-top: .2rem; color: var(--accent); }
.contact-list a { color: #fff; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Prose: page content ---------- */
.prose { font-size: 1.0125rem; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose::after { content: ""; display: table; clear: both; }
.prose p { text-align: left; }
.prose h2 { font-size: var(--fs-h2); font-weight: 800; margin: 2.2rem 0 .9rem; display: flex; align-items: center; gap: .65rem; }
.prose h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--accent), var(--vermilion)); flex: none; }
.prose h3 { font-size: var(--fs-h3); font-weight: 700; color: var(--link); margin: 1.8rem 0 .7rem; }
.prose h4, .prose h5, .prose h6 { font-size: var(--fs-h4); font-weight: 700; margin: 1.4rem 0 .5rem; color: var(--heading); }
.prose h2.text-center, .prose h3.text-center { justify-content: center; }
.prose b, .prose strong { color: var(--text); font-weight: 650; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.25rem 0; clear: both; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--accent); background: var(--accent-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose a:not(.btn):not(.lightbox):not(.tile-link) { font-weight: 500; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Legacy inline emphasis classes, mapped to the new palette */
.prose .h2style, .prose .texth2, .prose .h4style { font-family: var(--font-head); font-weight: 800; color: var(--heading); }
.prose .h3style, .prose .h3styleschool, .prose .h3styleseniorschool, .prose .h3stylejuniorschool { font-family: var(--font-head); font-weight: 700; color: var(--link); }
.prose .h5style { font-weight: 700; color: var(--heading); }
.prose .h5styleorange, .prose .h5styleorangestaff { font-weight: 700; color: var(--accent-ink); }
.prose .h5stylegreen { font-weight: 600; color: var(--green-text); }
.prose .gray, .prose .caption, .prose .description { color: var(--text-muted); font-size: var(--fs-sm); }
.prose .more, .prose p.more { margin-top: -.25rem; }

/* Lists */
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: .45rem; padding-left: .2rem; }
.prose li::marker { color: var(--accent-600); }
.prose ol.romanlist { list-style: lower-roman; }
.prose ul[class*="check-list"] { list-style: none; padding-left: 0; display: grid; gap: .55rem; }
.prose ul[class*="check-list"] > li { position: relative; padding: .1rem 0 .1rem 2rem; margin: 0; }
.prose ul[class*="check-list"] > li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--secondary-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317804d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.prose ul.check-list-orange > li::before, .prose ul.check-list-orange-milestone > li::before {
  background-color: var(--accent-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9830a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.prose ul.check-list-greencircle > li::before { background-image: none; width: .6rem; height: .6rem; left: .35rem; top: .62em; background-color: var(--secondary); }

/* Images inside content */
.prose img { border-radius: var(--radius-sm); }
.prose .imgborder, .prose .imgborder2, .prose .imgborder4 { border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface-2); }
.prose .img-left, .prose .img-right { width: min(42%, 320px); object-fit: cover; }
.prose .img-left { float: left; margin: .35rem 1.75rem 1rem 0; }
.prose .img-right { float: right; margin: .35rem 0 1rem 1.75rem; }
.prose p.figure-center, .prose div.figure-center { text-align: center; margin: 1.5rem 0; }
.prose p.figure-center img { display: inline-block; }
.prose video, .prose .responsive-video { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); margin: 1rem auto; }
.prose iframe { width: 100%; border: 0; border-radius: var(--radius); }
a.lightbox { position: relative; display: inline-block; cursor: zoom-in; border-radius: var(--radius); max-width: 100%; }
a.lightbox img { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
a.lightbox:hover img { box-shadow: var(--shadow-lg); }
.prose a.img-left, .prose a.img-right { display: block; }
.prose a.img-left img, .prose a.img-right img { display: block; width: 100%; }

/* Bootstrap-2 grid used by legacy content */
.prose .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem 1.75rem; margin: 0 0 1.5rem; }
.prose .row > * { grid-column: 1 / -1; min-width: 0; }
.prose .row > .col-1 { grid-column: span 1; } .prose .row > .col-2 { grid-column: span 2; }
.prose .row > .col-3 { grid-column: span 3; } .prose .row > .col-4 { grid-column: span 4; }
.prose .row > .col-5 { grid-column: span 5; } .prose .row > .col-6 { grid-column: span 6; }
.prose .row > .col-7 { grid-column: span 7; } .prose .row > .col-8 { grid-column: span 8; }
.prose .row > .col-9 { grid-column: span 9; } .prose .row > .col-10 { grid-column: span 10; }
.prose .row > .col-11 { grid-column: span 11; } .prose .row > .col-12 { grid-column: span 12; }
.prose .content_sec4, .prose .content_sec2 { height: 100%; }

/* Layout tables converted to flexible rows */
.layout-stack { display: grid; gap: 1.25rem; margin: 0 0 1.5rem; }
.layout-row { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; align-items: flex-start; }
.layout-cell { flex: 1 1 260px; min-width: 0; }
.layout-cell > :last-child { margin-bottom: 0; }

/* Photo grids */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1.25rem; margin: 1rem 0 2rem; clear: both; }
.photo-grid.is-docs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tile { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile > a, .tile-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; flex: 1; }
.tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0 !important; box-shadow: none !important; background: var(--surface-2); }
.photo-grid.is-docs .tile img { aspect-ratio: auto; max-height: 340px; object-fit: contain; padding: .75rem; background: var(--surface-2); }
.tile a.lightbox { display: block; border-radius: 0; }
.tile-label, .tile figcaption, .tile .caption { display: block; padding: .75rem 1rem; font-weight: 600; font-size: var(--fs-sm); color: var(--heading); text-align: center; line-height: 1.4; }
.tile:hover .tile-label { color: var(--link); }
.tile > :not(a):not(img) { padding-inline: 1rem; }

/* Data tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0 2rem; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
.data-table.is-compact { min-width: 0; }
.data-table th, .data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table thead th { background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 700; letter-spacing: .01em; border-bottom: 0; white-space: nowrap; }
.data-table thead tr + tr th { background: var(--primary-700); font-size: var(--fs-xs); }
.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.data-table tbody tr:hover { background: var(--primary-50); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .tdrowcentre, .data-table .tdrowcenter, .data-table .tdrowimg { text-align: center; }
.data-table img { border-radius: var(--radius-sm); max-width: 92px; box-shadow: var(--shadow-sm); }
.table-hint { display: none; font-size: var(--fs-xs); color: var(--text-soft); margin: -1.4rem 0 1.5rem; }

/* Tabs */
.tabbable { margin: 0 0 2rem; }
.nav-tabs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1.25rem !important; padding: .35rem !important; background: var(--surface-2); border-radius: 999px; width: fit-content; max-width: 100%; }
.nav-tabs li { margin: 0 !important; padding: 0 !important; }
.nav-tabs li::marker { content: none; }
.nav-tabs a { display: block; padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm); color: var(--text-muted); text-decoration: none; transition: background-color .2s, color .2s; }
.nav-tabs a:hover { color: var(--link); background: rgba(255,255,255,.7); }
.nav-tabs li.active a { background: var(--surface); color: var(--link); box-shadow: var(--shadow-sm); }
.tab-pane { display: none; animation: fade-in .3s var(--ease); }
.tab-pane.active { display: block; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Accordions (staff directories) */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 .75rem; background: var(--surface); overflow: hidden; }
.accordion > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; font: 700 var(--fs-base)/1.3 var(--font-head); color: var(--heading); }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--accent-600); transition: transform .2s var(--ease); }
.accordion[open] > summary { background: var(--primary-50); }
.accordion[open] > summary::after { transform: rotate(45deg); }
.accordion > summary:hover { color: var(--link); }
.accordion-body { padding: 1rem 1.25rem 1.25rem; }
.accordion-body .table-wrap { margin: 0; }

/* ---------- Home: hero carousel ---------- */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--primary-900); overflow: hidden; }
/* Height follows the photos' 960x350 (2.74:1) shape, so slides show whole and are not over-enlarged */
.hero-slides { position: relative; height: clamp(352px, 32.1vw, 528px); }
.hero-slide { position: absolute; inset: 0; overflow: hidden; visibility: hidden; z-index: 0; display: flex; align-items: center; justify-content: center; }
.hero-slide.is-active { visibility: visible; z-index: 2; }
.hero-slide.is-leaving { visibility: visible; z-index: 1; }
/* The whole photo is shown (contain); a blurred copy of it fills any spare space */
.hero-slide-fill { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) saturate(1.15) brightness(.7); }
/* Every slide photo is 2.74:1, so each shows as the same-size frame, whole and uncropped */
.hero-slide img { position: relative; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: 0 14px 44px rgba(0, 0, 0, .45); }

/* A different entrance for each slide (data-effect is set per slide) */
.hero-slide.is-entering { animation: .95s cubic-bezier(.22, .8, .25, 1) both; }
.hero-slide.is-entering[data-effect="fade"] { animation-name: hero-fade; }
.hero-slide.is-entering[data-effect="slide"] { animation-name: hero-slide; }
.hero-slide.is-entering[data-effect="zoom"] { animation-name: hero-zoom; }
.hero-slide.is-entering[data-effect="wipe"] { animation-name: hero-wipe; }
.hero-slide.is-entering[data-effect="rise"] { animation-name: hero-rise; }
.hero-slide.is-entering[data-effect="circle"] { animation-name: hero-circle; animation-duration: 1.1s; }
.hero-slide.is-entering[data-effect="focus"] { animation-name: hero-focus; }
@keyframes hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes hero-zoom { from { opacity: 0; transform: scale(1.18); } to { opacity: 1; transform: none; } }
@keyframes hero-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hero-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes hero-circle { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }
@keyframes hero-focus { from { opacity: 0; filter: blur(18px); } to { opacity: 1; filter: blur(0); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(11,37,70,.8) 0%, rgba(11,37,70,.45) 38%, rgba(11,37,70,0) 66%), linear-gradient(0deg, rgba(11,37,70,.5) 0%, transparent 30%); }
.hero-copy { text-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.hero-content { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; }
.hero-content .container { padding-block: 1.25rem; }
.hero-copy { max-width: 700px; }
.hero h1 { color: #fff; font-size: clamp(1.6rem, .8rem + 1.8vw, 2.5rem); font-weight: 800; line-height: 1.1; margin: .5rem 0 .6rem; letter-spacing: -.02em; }
.hero-lead { font-size: clamp(.95rem, .9rem + .2vw, 1.05rem); line-height: 1.6; color: #dbe5f3; max-width: 62ch; margin: 0 0 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-caption { position: absolute; z-index: 5; right: var(--gutter); bottom: 4.1rem; text-align: right; max-width: 60%; text-shadow: 0 1px 6px rgba(0, 0, 0, .65); }
.hero-caption strong { display: block; font: 700 1rem/1.3 var(--font-head); }
.hero-caption span { display: block; font-size: var(--fs-xs); color: #cbd8ec; }
.hero-controls { position: absolute; z-index: 5; right: var(--gutter); bottom: 1rem; display: flex; align-items: center; gap: .75rem; }
.hero-controls-inner { width: 100%; max-width: var(--container); margin-inline: auto; }
.hero-arrow { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background-color .2s; }
.hero-arrow:hover { background: rgba(255,255,255,.25); }
.hero-dots { display: flex; gap: .4rem; }
.hero-dot { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .3s var(--ease), background-color .3s; }
.hero-dot[aria-current="true"] { width: 26px; background: var(--accent); }

/* ---------- Home: sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
/* Tighter gap between the slider and the first section below it */
.hero + .section { padding-top: clamp(1.5rem, 2.6vw, 2.25rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { font-size: var(--fs-h2); font-weight: 800; margin: .5rem 0 .6rem; }
.section-head p { color: var(--text-muted); margin: 0; }
.section-head .school-pair span { display: block; }
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.card h3 { font-size: 1.2rem; font-weight: 700; margin: 1rem 0 .5rem; }
.card p { color: var(--text-muted); margin: 0; font-size: var(--fs-sm); }
.card-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--plate); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.card-icon img { width: 52px; height: 52px; object-fit: contain; mix-blend-mode: multiply; }
.card-icon .icon { width: 28px; height: 28px; color: var(--link); }
.card.is-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card.is-link .link-arrow { margin-top: auto; padding-top: 1rem; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: stretch; }
.message-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 150px 1fr; gap: 1.75rem; align-items: start; }
.message-card .portrait { width: 150px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.message-card h2 { font-size: var(--fs-h2); font-weight: 800; margin: .4rem 0 .9rem; }
.message-card blockquote { margin: 0 0 1.25rem; color: var(--text-2); font-size: 1.02rem; position: relative; }
.message-card blockquote::before { content: "\201C"; position: absolute; left: -.2rem; top: -1.6rem; font: 800 4rem/1 var(--font-head); color: var(--accent); opacity: .35; }
.promo-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.promo-card { align-self: start; }
.promo-card img { width: 100%; height: auto; object-fit: contain; display: block; background: #fff; }
.promo-card.is-panel { align-self: stretch; }
.promo-card.is-panel { background: linear-gradient(150deg, var(--primary), var(--primary-900)); color: #d6e2f3; padding: 2rem; justify-content: center; border: 0; }
.promo-card.is-panel h3 { color: #fff; font-size: 1.4rem; margin: .5rem 0 .75rem; }
.promo-card.is-panel p { margin: 0 0 1.5rem; }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.value { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.5rem; border-radius: var(--radius-lg); background: var(--bg); border: 1px solid var(--border); }
.value img { width: 60px; height: 60px; flex: none; object-fit: contain; background: var(--plate); border-radius: 16px; padding: 4px; }
.value h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: .2rem 0 .35rem; }
.value .motto { display: block; font: 700 1.05rem/1.35 var(--font-head); color: var(--heading); margin-bottom: .2rem; }
.value p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; list-style: none; margin: 0 0 2rem; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); box-shadow: var(--shadow-sm); }
.chips li .icon { color: var(--green-text); width: 16px; height: 16px; }
.center { text-align: center; }

/* ---------- Landing: schools ---------- */
.school-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.school-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.school-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.school-card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.school-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s var(--ease); }
.school-card:hover .school-card-media img { transform: scale(1.04); }
.school-card-tag { position: absolute; left: 1rem; top: 1rem; padding: .4rem .8rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: rgba(255,255,255,.95); color: #0b2546; box-shadow: var(--shadow-sm); }
.school-card-body { padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; flex: 1; }
.school-card-body h3 { font-size: 1.5rem; font-weight: 800; margin: 0 0 .35rem; }
.school-card-body .full-name { font-size: var(--fs-sm); color: var(--brand-red); font-weight: 600; margin: 0 0 1.25rem; line-height: 1.45; }
.school-card-body .contact-list { color: var(--text-muted); margin-bottom: 1.5rem; }
.school-card-body .contact-list .icon { color: var(--link); }
.school-card-body .contact-list a { color: var(--link); }
.school-card-body .btn { margin-top: auto; align-self: flex-start; }
.landing-badges { display: flex; justify-content: center; align-items: center; gap: 2rem; flex-wrap: wrap; margin-top: 3rem; }
.landing-badges img { height: 80px; width: auto; }
.landing-badges a img { border-radius: 8px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem; margin-bottom: 2rem; }
.info-tiles { display: grid; gap: 1rem; align-content: start; }
.info-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.15rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.info-tile .tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--link); flex: none; }
.info-tile h3 { margin: 0 0 .15rem; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.info-tile p { margin: 0; font-weight: 500; color: var(--text); line-height: 1.55; }
.info-tile a { word-break: break-word; }
.map-frame { min-height: 360px; height: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.map-frame iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Forms ---------- */
.form-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); background: var(--bg); }
.form-card h2 { margin-top: 0 !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field { display: grid; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--heading); }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; font: 400 var(--fs-base)/1.4 var(--font-body); color: var(--text);
  padding: .75rem .9rem; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.textarea { min-height: 130px; resize: vertical; }
.select { appearance: none; padding-right: 2.5rem; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566174' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .8rem center / 18px no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: #aab6c8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,79,150,.15); }
.input:user-invalid, .textarea:user-invalid { border-color: var(--danger); }
.form-note { font-size: var(--fs-xs); color: var(--text-soft); margin: .25rem 0 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.form-status { font-size: var(--fs-sm); color: var(--success); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-900); color: #b8c6dc; font-size: var(--fs-sm); margin-top: 0; }
.footer-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.site-footer h2 { font: 700 .8rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 1.1rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-brand img { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 4px; }
.footer-brand strong { font: 800 1.05rem/1.2 var(--font-head); color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.footer-about { margin: 0 0 1.25rem; line-height: 1.65; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: #dce6f5; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; }
.announce { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.announce li { display: flex; gap: .75rem; align-items: center; }
.announce .date { flex: none; width: 50px; text-align: center; border-radius: 10px; background: rgba(255,255,255,.08); padding: .35rem 0; line-height: 1.1; }
.announce .date b { display: block; font: 800 1.05rem/1 var(--font-head); color: var(--accent); }
.announce .date small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #cbd8ec; }
.announce .what { color: #e3ebf7; line-height: 1.4; }
.announce .what small { display: block; color: #8fa3c2; font-size: .75rem; }
.site-footer .contact-list .icon { color: var(--accent); }
.socials { display: flex; gap: .5rem; margin-top: 1.25rem; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: background-color .2s, transform .2s; }
.socials a:hover { background: var(--accent); color: #2a1a00; transform: translateY(-2px); }
.socials .icon { width: 17px; height: 17px; }
.footer-bottom .socials { margin: 0; gap: .4rem; }
.footer-bottom .socials a { width: 34px; height: 34px; }
/* keep the icons clear of the floating back-to-top button */
@media (max-width: 1360px) { .footer-bottom .container { padding-right: calc(var(--gutter) + 60px); } }
.footer-compact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.75rem; }
.footer-compact .footer-brand, .footer-compact .socials { margin: 0; }
.site-footer .footer-brand + .socials { margin-top: 1.25rem; }
.footer-compact .footer-brand + .socials { margin-top: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-block: 1.1rem; font-size: var(--fs-xs); color: #8fa3c2; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s, background-color .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: #2a1a00; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(6, 18, 36, .92); padding: 4rem 1rem 3.5rem; }
.lb.is-open { display: flex; animation: fade-in .2s var(--ease); }
.lb figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #111; }
.lb figcaption { color: #e3ebf7; text-align: center; margin-top: .9rem; font-size: var(--fs-sm); }
.lb figcaption .count { color: #8fa3c2; margin-left: .6rem; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .2s; }
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-badges > img { display: none; }
}
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .header-badges { display: none; }
  .header-actions { margin-left: auto; }
  /* No backdrop-filter here: it would become the containing block of the fixed menu */
  .site-header { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .primary-nav { display: none; position: fixed; top: var(--nav-top, 116px); left: 0; right: 0; bottom: 0; z-index: 70; border-top: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow-lg); }
  .nav-open .primary-nav { display: block; animation: nav-in .25s var(--ease); }
  .primary-nav .container { padding-block: .75rem 2rem; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-link { width: 100%; justify-content: space-between; height: 54px; padding: 0 .25rem; font-size: 1rem; border-bottom: 0; }
  .nav-item.is-current > .nav-link { border-bottom: 0; }
  .nav-item.is-open > .nav-link .icon { transform: rotate(180deg); }
  .dropdown, .dropdown.two-col { position: static; columns: 1; min-width: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 .75rem .5rem; display: none; transition: none; }
  .nav-item.is-open > .dropdown { display: block; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .hero-slides { height: auto; aspect-ratio: 200 / 99; }
  .hero::after { inset: 0 0 auto 0; height: calc(100vw * 99 / 200); background: linear-gradient(0deg, rgba(11,37,70,.55) 0%, transparent 35%); }
  .hero-content { position: relative; inset: auto; background: var(--primary-900); }
  .hero-content .container { padding-block: 1.5rem 4.75rem; }
  .hero-controls { right: auto; left: var(--gutter); bottom: 1.25rem; }
  .hero-caption { top: calc(100vw * 99 / 200 - 3.4rem); bottom: auto; right: var(--gutter); max-width: 75%; }
}
@media (max-width: 860px) {
  .values { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .school-grid { grid-template-columns: minmax(0, 1fr); }
  .prose .row > [class*="col-"] { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topbar-contact .hide-sm, .topbar-links .hide-sm { display: none; }
  .brand-trust { display: none; }
  .brand-mark { height: 46px; }
  .brand-name { font-size: 1.05rem; }
  .brand-school { font-size: .72rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .header-actions .btn { display: none; }
  .prose .img-left, .prose .img-right { float: none; display: block; width: 100%; max-width: 480px; margin: .5rem auto 1.25rem; }
  .message-card { grid-template-columns: minmax(0, 1fr); }
  .message-card .portrait { width: 120px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .table-hint { display: block; }
  .data-table td:first-child { white-space: nowrap; }
  .lb-prev, .lb-next { top: auto; bottom: .75rem; transform: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}
@media (max-width: 420px) {
  .topbar-contact { gap: .75rem; }
  .brand-mark { height: 40px; }
  .brand { gap: .6rem; }
  .nav-tabs { border-radius: var(--radius); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-header, .site-footer, .aside, .to-top, .page-hero-media { display: none !important; }
  .page-hero { background: none; color: #000; } .page-hero::before { display: none; } .page-hero h1 { color: #000; }
  .article-card { border: 0; box-shadow: none; padding: 0; }
}


/* =====================================================================
   Heritage theme details
   ===================================================================== */
html { color-scheme: light; }
body { transition: background-color .3s var(--ease), color .3s var(--ease); }
.section-head h2::after {
  content: ""; display: block; width: 132px; height: 12px; margin: .9rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 12'%3E%3Cpath d='M0 6h50M82 6h50' stroke='%23e8a019' stroke-width='1.5'/%3E%3Ccircle cx='56' cy='6' r='1.8' fill='%23e8a019'/%3E%3Ccircle cx='76' cy='6' r='1.8' fill='%23e8a019'/%3E%3Cpath d='M66 0l6 6-6 6-6-6z' fill='%23e8a019'/%3E%3C/svg%3E") center / contain no-repeat;
}
.page-hero h1::after { content: ""; display: block; width: 72px; height: 3px; margin-top: .9rem; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--vermilion)); }
.hero h1, .page-hero h1, .section-head h2, .message-card h2 { font-weight: 700; }
.footer-brand strong { font-family: var(--font-head); font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
/* Header school name: Cambria (Caladea where Cambria isn't installed) in the emblem's lamp green */
.brand-name, .landing-name {
  font-family: var(--font-brand); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-green-bottom);
  background: linear-gradient(180deg, var(--brand-green-top) 0%, var(--brand-green-bottom) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6));
}
.landing-name { font-size: clamp(1.5rem, 1rem + 1.7vw, 2.35rem); line-height: 1.1; }
.brand-name { font-size: 1.32rem; line-height: 1.12; }
.school-name { font-family: var(--font-body); font-weight: 700; }
.eyebrow { letter-spacing: .18em; }
.message-card blockquote { font-family: var(--font-head); font-style: italic; font-size: 1.08rem; line-height: 1.7; }
.value .motto { font-family: var(--font-head); font-style: italic; }

/* ---------- Theme switch ---------- */
.theme-toggle {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
  transition: background-color .2s var(--ease), transform .3s var(--ease);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .2); transform: rotate(15deg); }
.theme-toggle .icon { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }

/* =====================================================================
   Dark mode — the visitor's explicit choice, else the device setting
   ===================================================================== */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c121d;
    --surface: #131c2b;
    --surface-2: #19243a;
    --text: #e7ebf2;
    --text-2: #cfd6e2;
    --text-muted: #a3adbf;
    --text-soft: #7f8aa0;
    --border: #253149;
    --border-strong: #34425f;
    --heading: #f3efe6;
    --link: #8fb8f5;
    --link-hover: #b5d0fa;
    --green-text: #5fd39a;
    --brand-red: #ff8f96;
    --brand-brown: #e9b98f;
    --accent-ink: #f2bd55;
    --primary-50: rgba(143, 184, 245, .12);
    --primary-100: rgba(143, 184, 245, .28);
    --secondary-50: rgba(95, 211, 154, .14);
    --accent-50: rgba(232, 160, 25, .14);
    --header-bg: rgba(19, 28, 43, .96);
    --plate: #eef1f6;
    --brand-green-top: #8ef0bd;
    --brand-green-bottom: #3cc282;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .3);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
}
:root[data-theme="dark"] .landing-emblem, :root[data-theme="dark"] .brand-mark, :root[data-theme="dark"] .header-badges img { mix-blend-mode: normal; background: var(--plate); border-radius: 12px; padding: 4px; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .data-table thead th { background: #1d3b6b; }
:root[data-theme="dark"] .btn-blue, :root[data-theme="dark"] .side-nav a[aria-current="page"] { background: #2a62b3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c121d;
    --surface: #131c2b;
    --surface-2: #19243a;
    --text: #e7ebf2;
    --text-2: #cfd6e2;
    --text-muted: #a3adbf;
    --text-soft: #7f8aa0;
    --border: #253149;
    --border-strong: #34425f;
    --heading: #f3efe6;
    --link: #8fb8f5;
    --link-hover: #b5d0fa;
    --green-text: #5fd39a;
    --brand-red: #ff8f96;
    --brand-brown: #e9b98f;
    --accent-ink: #f2bd55;
    --primary-50: rgba(143, 184, 245, .12);
    --primary-100: rgba(143, 184, 245, .28);
    --secondary-50: rgba(95, 211, 154, .14);
    --accent-50: rgba(232, 160, 25, .14);
    --header-bg: rgba(19, 28, 43, .96);
    --plate: #eef1f6;
    --brand-green-top: #8ef0bd;
    --brand-green-bottom: #3cc282;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .3);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  }
  :root:not([data-theme="light"]) .landing-emblem, :root:not([data-theme="light"]) .brand-mark, :root:not([data-theme="light"]) .header-badges img { mix-blend-mode: normal; background: var(--plate); border-radius: 12px; padding: 4px; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .data-table thead th { background: #1d3b6b; }
  :root:not([data-theme="light"]) .btn-blue, :root:not([data-theme="light"]) .side-nav a[aria-current="page"] { background: #2a62b3; }
}

:root[data-theme="dark"] .brand-name, :root[data-theme="dark"] .landing-name { filter: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-name, :root:not([data-theme="light"]) .landing-name { filter: none; }
}
