/* =========================================================
   Mount Carmel English School – site styles
   Palette: logo navy + logo red on white
   Type: Young Serif (display) + Mukta (text, Devanagari-ready)
   ========================================================= */
:root {
  /* Logo colours: navy #323188 + red #de1e23 (editable in Admin → Settings → Colours) */
  --navy-900: #1f1e54;
  --navy-950: #181841;
  --navy-800: #323188;
  --navy-600: #53529b;
  --tint: #ebeaf3;
  --mist: #f7f7fa;
  --line: #dedeec;
  --navy-rgb: 31, 30, 84;
  --red: #de1e23;
  --red-700: #b6191d;
  --red-soft: #fceded;
  --red-ink: #901417;
  --red-light: #f09a9c;
  --red-rgb: 222, 30, 35;
  --on-red: #ffffff;
  --ink: #0b0b1e;
  --muted: #605f81;
  --white: #ffffff;

  --f-display: "Young Serif", Georgia, "Times New Roman", serif;
  --f-text: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gap: clamp(16px, 3vw, 28px);
  --block: clamp(56px, 8vw, 96px);
  --r-sm: 4px;
  --r-md: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--f-text); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--white); text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-600); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gap)); margin-inline: auto; }
.narrow { max-width: 780px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--red); color: var(--on-red); padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-sm); border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-900); color: var(--white); }
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red:hover { background: var(--red-700); color: var(--on-red); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--navy-900); color: var(--white); }
.btn-line { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-line:hover { background: var(--navy-800); color: var(--white); }
.btn-line-ink { border-color: var(--ink); color: var(--ink); }
.btn-line-ink:hover { background: var(--ink); color: var(--white); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 1.25em 0 0; }
.text-link { font-weight: 700; color: var(--navy-800); }

/* ---------- top bar & header ---------- */
.topbar { background: var(--navy-900); color: #d6d6ea; font-size: .9rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar-in { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 7px 0; }
.topbar p { margin: 0; display: flex; gap: 6px 20px; flex-wrap: wrap; align-items: center; }
.topbar svg { display: inline-block; vertical-align: -2px; margin-right: 6px; color: var(--red-light); }
.topbar-links a { color: #fff; font-weight: 700; background: var(--red); padding: 3px 10px; border-radius: var(--r-sm); }
.topbar-links a:hover { background: var(--red-700); text-decoration: none; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { flex-shrink: 0; }
.brand img { width: auto; height: 68px; max-width: 100%; }
.nav-cta { white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav li { position: relative; }
.site-nav > ul > li > a, .sub-toggle {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--ink); background: none; border: 0;
  font-weight: 500; font-size: 1rem; text-decoration: none; border-radius: var(--r-sm);
}
.site-nav > ul > li > a:hover, .sub-toggle:hover { color: var(--navy-600); }
.site-nav li.is-active > a, .site-nav li.is-active > .sub-toggle { color: var(--navy-800); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 28px rgba(var(--navy-rgb), .14); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.sub a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
.sub a:hover, .sub a[aria-current] { background: var(--tint); color: var(--navy-900); }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
.nav-toggle { display: none; }

/* ---------- inner page head ---------- */
.page-head { background: var(--navy-900); color: #dcdcef; padding: clamp(28px, 5vw, 56px) 0 clamp(30px, 5vw, 52px); position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--red-rgb), .30), rgba(var(--red-rgb), 0) 65%); pointer-events: none; }
.page-head h1 { font-family: var(--f-display); font-weight: 400; color: var(--white); font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 6px 0 10px; max-width: 22ch; }
.page-intro { max-width: 62ch; font-size: 1.12rem; margin: 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: .92rem; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--red-light); }
.crumbs a { color: #dcdcef; }
.crumbs a:hover { color: #fff; }

/* ---------- inner layout ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); padding: clamp(36px, 6vw, 64px) 0 var(--block); }
.tpl-disclosure main > .wrap, .tpl-gallery main > .wrap, .tpl-notices main > .wrap, .tpl-404 main > .wrap, .contact-grid { padding-top: clamp(32px, 5vw, 56px); padding-bottom: var(--block); }
.prose { max-width: 72ch; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.4em; }
.prose h2:first-child, .prose > :first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .55em; padding-left: .2em; }
.prose ul li::marker { color: var(--red); }
.prose blockquote, .callout { margin: 1.8em 0 0; padding: 18px 22px; background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 0 var(--r-md) var(--r-md) 0; }
.prose blockquote p:last-child, .callout p:last-child { margin: 0; }
.prose img { border-radius: var(--r-md); }
.lead-figure { margin: 0 0 28px; }
.lead-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); }
.h-display { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.005em; }
.h-section { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 1.4em; }

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 22px; align-self: start; position: sticky; top: 108px; }
.side-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; background: var(--white); }
.side-title { font-size: 1.05rem; font-family: var(--f-text); font-weight: 700; margin-bottom: 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 8px 10px; margin: 0 -10px; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
.side-nav a:hover { background: var(--mist); }
.side-nav a[aria-current] { background: var(--tint); color: var(--navy-900); font-weight: 700; box-shadow: inset 3px 0 0 var(--red); }
.side-contact { background: var(--mist); border-color: transparent; }
.side-phone { display: block; font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-bottom: 4px; color: var(--navy-900); }
.side-contact .btn { margin-top: 12px; }

/* ---------- notices ---------- */
.notice { padding: 14px 0; border-top: 1px solid var(--line); }
.notice:first-of-type { border-top: 0; padding-top: 0; }
.notice time { display: block; font-size: .85rem; color: var(--muted); }
.notice h3 { font-size: 1.08rem; margin: 2px 0 4px; }
.notice h3 a { text-decoration: none; }
.notice-body { font-size: .98rem; }
.notice-body p:last-child { margin: 0; }
.notice.is-highlight h3::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--red); border-radius: 50%; margin-right: 8px; vertical-align: 2px; box-shadow: 0 0 0 4px rgba(var(--red-rgb), .22); }
.notice-list .notice { padding: 24px 0; }
.notice-list .notice h2 { font-size: 1.4rem; margin: 4px 0 8px; }

/* ---------- HOME: hero slider ---------- */
.hero { position: relative; background: var(--navy-900); }
.slides { position: relative; aspect-ratio: 1920 / 720; overflow: hidden; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-on { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-cap { position: absolute; inset: auto 0 0; padding: 60px 0 56px; background: linear-gradient(to top, rgba(var(--navy-rgb), .82), rgba(var(--navy-rgb), 0)); color: #fff; }
.slide-title { font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 3rem); margin: 0 0 4px; line-height: 1.15; max-width: 20ch; }
.slide-text { font-size: clamp(1rem, 1.8vw, 1.25rem); margin: 0 0 16px; max-width: 50ch; }
.hero-ctrl { position: absolute; right: max(var(--gap), calc((100% - var(--wrap)) / 2)); bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 10px; background: rgba(var(--navy-rgb), .78); padding: 6px 8px; border-radius: 999px; }
.hero-ctrl > button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; }
.hero-ctrl > button:hover { background: rgba(255, 255, 255, .15); }
.hero-dots { display: flex; gap: 6px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; }
.hero-dots button[aria-selected="true"] { background: var(--red); border-color: var(--red); }

/* admissions strip */
.admit-bar { background: var(--red); color: var(--on-red); }
.admit-bar .btn-ink { background: #fff; color: var(--red-ink); }
.admit-bar .btn-ink:hover { background: var(--navy-900); color: #fff; }
.admit-bar .btn-line-ink { border-color: #fff; color: #fff; }
.admit-bar .btn-line-ink:hover { background: #fff; color: var(--red-ink); }
.admit-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding: 16px 0; }
.admit-in > p:first-child { margin: 0; font-size: 1.1rem; }
.admit-in .btn-row { margin: 0; }

/* sections */
.block { padding: var(--block) 0; }
.block-head { max-width: 720px; margin-bottom: 36px; }
.block-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.block-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.block-head.split > div { max-width: 640px; }

.intro-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.lede { font-size: 1.18rem; line-height: 1.7; max-width: 60ch; }
.facts { list-style: none; padding: 0; margin: 28px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts li { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .98rem; }
.facts b { display: block; color: var(--navy-800); font-size: 1.12rem; }
.home-notices { background: var(--mist); border-radius: var(--r-md); padding: 22px 24px; border-top: 5px solid var(--red); }
.nb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.nb-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin: 0; }
.nb-head a { font-weight: 700; font-size: .95rem; }

/* motto – the signature band */
.motto { position: relative; overflow: hidden; background: var(--navy-900); color: #dcdcef; padding: clamp(64px, 10vw, 120px) 0; text-align: center; }
.motto-rays { position: absolute; left: 50%; top: 58%; width: 1400px; height: 1400px; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(var(--red-rgb), .10) 0deg 4deg, transparent 4deg 15deg); -webkit-mask: radial-gradient(circle, #000 8%, transparent 55%); mask: radial-gradient(circle, #000 8%, transparent 55%); pointer-events: none; }
.motto-in { position: relative; }
.motto-label { color: var(--red-light); font-weight: 700; margin-bottom: 12px; }
.motto-hi { font-family: var(--f-text); font-weight: 700; color: var(--white); font-size: clamp(2rem, 6.2vw, 4.4rem); line-height: 1.35; margin: 0 auto 14px; max-width: 18ch; text-wrap: balance; }
.motto-en { font-family: var(--f-display); font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--red-light); margin: 0 auto 48px; max-width: 40ch; }
.aim-vision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 900px; margin: 0 auto; text-align: left; border-top: 1px solid rgba(255, 255, 255, .18); }
.aim-vision > div { padding: 28px 32px 0; }
.aim-vision > div + div { border-left: 1px solid rgba(255, 255, 255, .18); }
.aim-vision h3 { color: var(--white); font-size: 1.2rem; }
.aim-vision p { margin: 0; }

/* steps – real sequence, so numbering carries meaning */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 0; position: relative; }
.steps li { counter-increment: step; position: relative; padding: 0 20px 0 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 2px solid var(--navy-800); color: var(--navy-900); font-family: var(--f-display); font-size: 1.2rem; margin-bottom: 16px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li:first-child::before { background: var(--red); border-color: var(--red); color: var(--white); }
.steps h3 { font-size: 1.08rem; }
.steps p { font-size: .96rem; color: var(--muted); margin: 0; }
.steps-block { background: var(--mist); }
.steps-block .btn-row { margin-top: 40px; }
.steps.steps-vertical { grid-template-columns: 1fr; gap: 0; margin: 20px 0 36px; }
.steps-vertical li { padding: 0 0 26px 64px; }
.steps-vertical li::before { position: absolute; left: 0; top: 0; margin: 0; }
.steps-vertical li::after { top: 46px; bottom: 2px; left: 21px; right: auto; width: 2px; height: auto; }
.steps-vertical h3 { margin: 8px 0 4px; }

/* gallery mosaic */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(120px, 16vw, 200px); gap: 10px; }
.mosaic a, .photo-grid a { display: block; overflow: hidden; border-radius: var(--r-sm); background: var(--tint); }
.mosaic img, .photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mosaic a:hover img, .photo-grid a:hover img { transform: scale(1.04); }
.mosaic .m-1 { grid-column: span 2; grid-row: span 2; }
.mosaic .m-6, .mosaic .m-7 { grid-column: span 2; }

/* director quote */
.director-block { padding-top: 0; }
.director-in { border-top: 1px solid var(--line); padding-top: var(--block); }
.director-in .btn { margin-top: 24px; }
.director-in blockquote { margin: 0; }
.director-in blockquote p { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.35; color: var(--navy-800); max-width: 40ch; margin: 0 0 16px; }
.director-in blockquote p::before { content: "“"; color: var(--red); }
.director-in blockquote p::after { content: "”"; color: var(--red); }
.director-in footer { color: var(--muted); }

/* visit */
.visit { background: var(--tint); }
.visit-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: center; }
.phones { display: flex; flex-direction: column; gap: 2px; font-weight: 700; font-size: 1.15rem; }
.phones a { text-decoration: none; color: var(--navy-800); }
.visit-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.visit-links a { background: var(--white); padding: 20px 22px; text-decoration: none; color: var(--ink); }
.visit-links a:hover { background: var(--mist); }
.visit-links b { display: block; color: var(--navy-800); font-size: 1.1rem; }
.visit-links span { color: var(--muted); font-size: .95rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--r-md); }
.data th, .data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { background: var(--navy-800); color: #fff; font-weight: 700; white-space: nowrap; }
.data tbody tr:nth-child(even) { background: var(--mist); }
.data tbody tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { width: 64px; color: var(--muted); }
.doc-table td:last-child { width: 130px; }
.doc-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.ftype { font-size: .7rem; font-weight: 700; background: var(--red-soft); color: var(--red-ink); padding: 2px 6px; border-radius: 3px; }

/* ---------- teachers ---------- */
.teacher-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.teacher-tools p { margin: 0; }
.teacher-tools input { flex: 1 1 260px; max-width: 360px; }
.teacher-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.teacher-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.teacher-list li[hidden] { display: none; }
.teacher-list img, .avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--tint); color: var(--navy-800); font-weight: 700; }
.teacher-list h3 { font-size: 1.05rem; margin: 0; }
.teacher-list p { margin: 0; font-size: .94rem; }
.t-role { color: var(--red-700); font-weight: 500; }
.t-qual { color: var(--muted); }

/* ---------- timing ---------- */
.timing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 8px; }
.season { border-radius: var(--r-md); padding: 24px; border: 1px solid var(--line); }
.season-summer { background: var(--red-soft); border-color: rgba(var(--red-rgb), .25); }
.season-winter { background: var(--tint); border-color: var(--line); }
.season h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; margin: 0 0 14px; }
.season dl { margin: 0; }
.season dl > div { padding: 10px 0; border-top: 1px solid rgba(var(--navy-rgb), .15); }
.season dt { font-size: .9rem; color: var(--muted); }
.season dd { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--ink); }

/* ---------- admission ---------- */
.download-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--tint); border-radius: var(--r-md); padding: 24px 26px; margin: 8px 0 32px; }
.download-card h2 { margin: 0 0 6px !important; font-size: 1.4rem; }
.download-card p { margin: 0; max-width: 52ch; }

/* ---------- gallery ---------- */
.album-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.album-tabs a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; }
.album-tabs a span { color: var(--muted); font-size: .9rem; margin-left: 4px; }
.album-tabs a[aria-current] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.album-tabs a[aria-current] span { color: var(--red-light); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 16px; }
.album { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: var(--navy-900); }
.album img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s, transform .4s; }
.album:hover img { opacity: 1; transform: scale(1.03); }
.album-meta { position: absolute; inset: auto 0 0; padding: 40px 20px 16px; background: linear-gradient(to top, rgba(var(--navy-rgb), .9), transparent); }
.album-meta b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; }
.album-meta small { color: var(--red-light); font-size: .95rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.photo-grid a { aspect-ratio: 1; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; justify-content: center; }
.pager a { min-width: 42px; padding: 8px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.pager a[aria-current] { background: var(--red); color: var(--on-red); border-color: var(--red); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(12, 12, 30, .95); display: none; align-items: center; justify-content: center; padding: 56px 12px; }
.lb.open { display: flex; }
.lb img { max-width: min(1400px, 100%); max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.lb button { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #d0d0e6; font-size: .95rem; }

/* ---------- director letter ---------- */
.letter { background: var(--mist); border-radius: var(--r-md); padding: clamp(24px, 4vw, 44px); border-top: 5px solid var(--red); }
.letter-photo { float: right; margin: 0 0 16px 24px; border-radius: var(--r-md); }
.letter-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); }
.letter .prose { font-size: 1.12rem; line-height: 1.8; }

/* ---------- forms & contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.contact-grid .h-section { margin-top: 0; }
.contact-list { margin: 0 0 24px; }
.contact-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; }
.map iframe { width: 100%; border: 0; border-radius: var(--r-md); background: var(--tint); aspect-ratio: 5 / 3; height: auto; }
.contact-form { background: var(--mist); border-radius: var(--r-md); padding: clamp(22px, 4vw, 36px); align-self: start; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
input[type=text], input[type=email], input[type=tel], input[type=search], input:not([type]), textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #c4c4dc; border-radius: var(--r-sm); padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--navy-600); outline: 3px solid rgba(var(--navy-rgb), .18); }
.hint { font-size: .9rem; color: var(--muted); margin: -6px 0 14px; }
.alert { padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 18px; }
.alert ul { margin: 0; padding-left: 1.1em; }
.alert-ok { background: #e3f3e8; color: #14532d; border-left: 4px solid #2e7d4f; }
.alert-err { background: #fdecea; color: #7d1c12; border-left: 4px solid #c0392b; }
.empty-state { font-size: 1.1rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: #c3c3de; border-top: 4px solid var(--red); font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; padding: 64px 0 48px; }
.f-about img { max-height: 64px; width: auto; margin-bottom: 16px; }
.f-about img.plate { background: #fff; padding: 8px 12px; border-radius: var(--r-md); }
.f-title { color: #fff; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; margin-bottom: 14px; }
.f-links { list-style: none; margin: 0; padding: 0; }
.f-links li { margin-bottom: 8px; }
.f-links small { display: block; color: #9a9ac0; font-size: .85rem; }
.site-footer a { color: #ececf7; text-decoration: none; }
.site-footer a:hover { color: var(--red-light); text-decoration: underline; }
.social { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 14px; flex-wrap: wrap; }
.social a { font-weight: 500; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; }
.footer-bar-in { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 16px 0; }
.footer-bar p { margin: 0; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 54px; height: 54px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.wa-float:hover { color: #fff; background: #178a45; }

/* =================== responsive =================== */
@media (max-width: 1080px) {
  .site-nav > ul > li > a, .sub-toggle { padding: 10px 8px; }
  .nav-cta { display: none; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .steps li:nth-child(3)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 46px; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 11px; }
  .nav-toggle span { height: 2px; background: var(--navy-800); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 0 0 0 auto; top: var(--hdr, 84px); width: min(360px, 100%); background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 24px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; box-shadow: -8px 0 24px rgba(0, 0, 0, .08); visibility: hidden; }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav > ul { flex-direction: column; }
  .site-nav > ul > li > a, .sub-toggle { width: 100%; justify-content: space-between; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav li.is-active > a, .site-nav li.is-active > .sub-toggle { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 8px 12px; display: none; min-width: 0; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; }
  .has-sub.open .sub { display: block; }
  .nav-cta { display: flex; margin-top: 18px; }
  .page-grid, .intro-grid, .visit-in, .contact-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topbar-contact a:last-child, .affil { display: none; }
  .header-in { min-height: 70px; }
  .brand img { height: 46px; }
  .hero-ctrl { bottom: 10px; right: 10px; }
  .admit-in .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr; }
  .aim-vision { grid-template-columns: 1fr; }
  .aim-vision > div { padding: 24px 4px 0; }
  .aim-vision > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 24px; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .steps li { padding: 0 0 24px 60px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after, .steps li:nth-child(3)::after { display: block; top: 46px; bottom: 2px; left: 21px; right: auto; width: 2px; height: auto; }
  .steps li:last-child::after { display: none; }
  .steps h3 { margin-top: 8px; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 38vw; }
  .mosaic .m-1 { grid-column: span 2; grid-row: span 1; }
  .mosaic .m-6, .mosaic .m-7 { grid-column: span 1; }
  .visit-links, .teacher-list, .timing, .field-row { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; padding-top: 48px; gap: 28px; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .letter-photo { float: none; margin: 0 0 16px; }
  .data th, .data td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-header, .site-footer, .sidebar, .wa-float, .hero-ctrl { display: none !important; }
  .page-head { background: none; color: #000; }
  .page-head h1 { color: #000; }
}
