/* Shri M.S. Jain English School — public site styles, v2.
   Brand colours come from CSS variables printed by theme_css() (Admin → Theme colours). */

:root {
  --ff-head: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Mukta", "Segoe UI", system-ui, sans-serif;
  --ink: #1b1a17;
  --muted: #5a5446;
  --card: #ffffff;
  --wa: #1f8f4e;
  --wrap: 1220px;
  --sec: clamp(56px, 8vw, 100px);
  --r: 16px;
  --r-lg: 24px;
  --r-btn: 12px;
  --r-field: 10px;
  --shadow: 0 22px 40px -22px rgba(var(--c-primary-rgb), .45);
  --shadow-soft: 0 10px 30px -20px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
html { scroll-padding-top: 90px; }
body { font-family: var(--ff-body); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--c-cream); }
h1, h2, h3, h4, h5, .font-head { font-family: var(--ff-head); color: var(--c-head); line-height: 1.15; letter-spacing: -.01em; }
h1, h2 { font-weight: 800; }
h3, h4 { font-weight: 700; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-head); }
img { max-width: 100%; }
p { margin-bottom: 1rem; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.container { max-width: var(--wrap); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--c-dark); color: var(--c-on-dark); padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; font-size: 16px; border-radius: var(--r-btn); padding: .7rem 1.35rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: transform .25s var(--ease), background-color .2s, box-shadow .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .45rem .9rem; font-size: 14.5px; border-radius: 10px; }
.btn-lg { padding: .85rem 1.6rem; font-size: 17px; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); box-shadow: var(--shadow); }
.btn-primary:hover, .btn-primary:focus { background: var(--c-head); border-color: var(--c-head); color: var(--c-on-primary); }
.btn-accent { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.btn-accent:hover, .btn-accent:focus { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: var(--c-on-accent); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover, .btn-wa:focus { background: #177a41; border-color: #177a41; color: #fff; }
.btn-outline-primary { color: var(--c-primary); border: 2px solid var(--c-primary); background: transparent; }
.btn-outline-primary:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.btn-ghost-light { color: #fff; border: 2px solid rgba(255,255,255,.55); background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.link-more { font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 16px; }
.link-more::after { content: " \2192"; }
.link-more:hover { text-decoration: underline; }

/* ---------- Section scaffolding ---------- */
.section { padding: var(--sec) 0; }
.section-white { background: var(--card); }
.section-alt { background: var(--card); }
.eyebrow { display: inline-block; background: var(--c-accent); color: var(--c-on-accent); font: 700 13px/1 var(--ff-body); letter-spacing: .08em; text-transform: uppercase; padding: 8px 13px; border-radius: 999px; margin: 0 0 14px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(24px, 3vw, 40px); flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 0; }
.sec-head p { margin: .6rem 0 0; color: var(--muted); max-width: 62ch; }
.sec-head.center { flex-direction: column; align-items: center; text-align: center; }
.sec-head.center p { margin-left: auto; margin-right: auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 0; }
.section-head p { margin: .4rem 0 0; color: var(--muted); max-width: 60ch; }
.rule { display: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--c-accent); color: var(--c-on-accent); font-size: 14.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 6px 20px; min-height: 40px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.topbar p { margin: 0; }
.topbar a { color: var(--c-on-accent); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { text-decoration: underline; }
.topbar-contacts { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Brand row ---------- */
.brandrow { background: var(--card); }
.brandrow .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; }
.brand img { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.brand-trust { font-size: 14.5px; color: var(--muted); }
.brand-name { font-family: var(--ff-head); font-weight: 800; color: var(--c-head); font-size: clamp(21px, 2.6vw, 33px); line-height: 1.1; margin: 2px 0; }
.brand-tagline { font-size: 15.5px; color: var(--muted); }
.brand-affil { font-size: 15px; color: var(--c-primary); font-weight: 500; margin-top: 4px; }
.brand-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.menu-toggle { display: none; }

/* ---------- Main navigation ---------- */
.navbar-main { background: var(--card); border-top: 1px solid var(--c-line); box-shadow: 0 4px 0 var(--c-accent), 0 14px 24px -18px rgba(0,0,0,.35); position: sticky; top: 0; z-index: 1030; }
.navbar-main .container { display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: nowrap; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > button { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; color: var(--c-primary); padding: 15px 11px; background: none; border: 0; text-decoration: none; position: relative; white-space: nowrap; }
.nav-list > li > a::after, .nav-list > li > button::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 9px; height: 3px; border-radius: 3px; background: var(--c-accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav-list > li > a:hover::after, .nav-list > li > button:hover::after, .nav-list > li.active > a::after, .nav-list > li.active > button::after, .nav-list > li.open > button::after { transform: scaleX(1); }
.nav-list > li.active > a, .nav-list > li.active > button { color: var(--c-head); }
.nav-list .caret { font-size: 11px; transition: transform .2s; }
.nav-list li.open .caret { transform: rotate(180deg); }
.sub { position: absolute; left: 0; top: calc(100% - 4px); min-width: 240px; background: var(--card); border-radius: 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.35); border: 1px solid var(--c-line); list-style: none; margin: 0; padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; z-index: 20; }
.nav-list > li:hover > .sub, .nav-list > li:focus-within > .sub, .nav-list > li.open > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.sub a:hover, .sub a:focus { background: var(--c-cream); color: var(--c-head); }
.nav-cta { margin-left: auto; }
.nav-cta .btn { white-space: nowrap; }

@media (max-width: 1150px) {
  .menu-toggle { display: inline-flex; }
  .navbar-main { position: static; box-shadow: 0 4px 0 var(--c-accent); }
  .navbar-main .container { display: block; padding: 0; }
  .nav-panel { display: none; padding: 8px 12px 16px; }
  .nav-panel.show { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list > li > a, .nav-list > li > button { width: 100%; justify-content: space-between; padding: 12px 8px; border-bottom: 1px solid var(--c-line); font-size: 16px; }
  .nav-list > li > a::after, .nav-list > li > button::after { display: none; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; display: none; background: transparent; }
  .nav-list > li:hover > .sub, .nav-list > li:focus-within > .sub { display: none; }
  .nav-list > li.open > .sub { display: block; }
  .nav-cta { margin: 12px 0 0; }
  .nav-cta .btn { width: 100%; }
  .brand-actions .btn-wa span { display: none; }
}
@media (min-width: 1151px) { .nav-panel { display: flex !important; align-items: center; flex: 1; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(20px, 3vw, 32px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 20px; align-items: stretch; }
.hero-slider { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 520px; background: var(--c-dark); box-shadow: var(--shadow-soft); }
.hero-slider .carousel, .hero-slider .carousel-inner, .hero-slider .carousel-item { height: 100%; }
.hero-slider .carousel-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.slide-cap { position: absolute; left: 24px; bottom: 24px; right: 24px; max-width: 470px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 18px; padding: 22px 24px; z-index: 2; box-shadow: var(--shadow-soft); }
.slide-cap .eyebrow { margin-bottom: 10px; font-size: 12px; }
.slide-cap h2 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 8px; }
.slide-cap p { margin: 0 0 14px; color: #3f3a30; font-size: 16px; line-height: 1.55; }
.hero-slider .carousel-indicators { justify-content: flex-end; margin: 0 24px 24px 0; z-index: 3; }
.hero-slider .carousel-indicators [data-bs-target] { width: 26px; height: 6px; border-radius: 6px; border: 0; background-color: #fff; opacity: .6; margin: 0 3px; }
.hero-slider .carousel-indicators .active { background-color: var(--c-accent); opacity: 1; width: 38px; }
.admit-card { background: var(--card); border-radius: var(--r-lg); border-top: 6px solid var(--c-accent); padding: 26px 26px 24px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.admit-card h2 { font-size: clamp(28px, 2.6vw, 36px); margin: 0 0 8px; }
.admit-card > p { color: var(--muted); font-size: 16px; }
.admit-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 6px; }
.admit-card .actions .btn { padding-left: .6rem; padding-right: .6rem; }

/* ---------- Notice ticker ---------- */
.ticker-wrap { padding-top: 20px; }
.ticker { display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; }
.ticker-label { background: var(--c-dark); color: var(--c-on-dark); font: 700 14px/1 var(--ff-body); letter-spacing: .06em; text-transform: uppercase; padding: 14px 18px; white-space: nowrap; display: flex; align-items: center; gap: .5rem; }
.ticker-track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker-items { display: inline-flex; gap: 3rem; white-space: nowrap; animation: ticker 40s linear infinite; padding-left: 100%; }
.ticker:hover .ticker-items, .ticker:focus-within .ticker-items { animation-play-state: paused; }
.ticker-items a { color: var(--ink); text-decoration: none; font-weight: 500; }
.ticker-items a:hover { color: var(--c-primary); text-decoration: underline; }
.ticker-items .dot { color: var(--c-accent); margin-right: .5rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------- Leadership ---------- */
.leaders { background: var(--card); padding: var(--sec) 0; margin-top: clamp(28px, 4vw, 48px); }
.leader-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.leader-card { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; background: var(--c-cream); border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.leader-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: var(--c-accent); }
.leader-photo { margin: 0; background: var(--c-primary-tint); min-height: 300px; }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.leader-body { padding: 26px 26px 24px; display: flex; flex-direction: column; }
.leader-body h3 { font-size: 24px; margin: 0 0 12px; }
.leader-body blockquote { border-left: 4px solid var(--c-accent); padding: 2px 0 2px 14px; margin: 0 0 14px; font-style: italic; color: #3a352c; font-size: 16.5px; }
.leader-body .who { margin-top: auto; padding-top: 10px; }
.leader-body .who strong { display: block; font-family: var(--ff-head); color: var(--c-head); font-size: 18px; }
.leader-body .who span { color: var(--muted); font-size: 14.5px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-media { position: relative; padding-top: 48px; }
.about-media > img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.about-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 120px; background: #fff; border-radius: 22px; padding: 12px; box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; }
.about-badge img { max-width: 100%; max-height: 100%; object-fit: contain; }
.about-text h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 0 0 18px; }
.about-text p { color: #3a352c; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 22px 0 24px; }
.fact { background: var(--card); border: 1px solid var(--c-line); border-radius: 14px; padding: 12px 16px; }
.fact span { display: block; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact strong { font-family: var(--ff-head); font-size: 22px; color: var(--c-head); line-height: 1.3; }

/* ---------- Academics ---------- */
.acad-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; list-style: none; margin: 0; padding: 0; counter-reset: pt; }
.points li { counter-increment: pt; display: flex; gap: 14px; padding: 18px 8px 18px 8px; border-top: 1px solid var(--c-line); }
.points li::before { content: counter(pt, decimal-leading-zero); font: 800 20px/1.2 var(--ff-head); color: var(--c-accent-text); min-width: 28px; }
.cosch { background: var(--c-head); color: var(--c-on-dark-soft); border-radius: var(--r-lg); padding: 26px 26px 18px; }
.cosch h3 { color: #fff; font-size: 24px; margin: 0 0 14px; }
.cosch ul { list-style: none; margin: 0; padding: 0; }
.cosch li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.14); color: #fff; }
.cosch li:first-child { border-top: 0; }
.cosch li i { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.3); color: var(--c-accent); font-size: 17px; }

/* ---------- Counters ---------- */
.counter-panel { background: var(--c-dark); border-radius: var(--r-lg); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.counter-panel li { text-align: center; padding: 36px 16px; border-right: 1px solid rgba(255,255,255,.12); transition: background-color .5s; }
.counter-panel li:last-child { border-right: 0; }
.counter-panel li:hover { background: rgba(255,255,255,.05); }
.counter-panel i { display: inline-flex; width: 52px; height: 52px; border-radius: 12px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); color: var(--c-accent); font-size: 22px; margin-bottom: 12px; background: rgba(255,255,255,.06); }
.counter-panel b { display: block; font: 800 clamp(38px, 5vw, 56px)/1.05 var(--ff-head); color: var(--c-accent); }
.counter-panel span { display: block; color: var(--c-on-dark-soft); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; }

/* ---------- Cards (facilities, events, news, achievements) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.fac-card, .item-card, .news-card { background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; text-decoration: none; color: inherit; }
.fac-card:hover, .item-card:hover, .news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--c-accent); color: inherit; }
.fac-card .thumb, .item-card .thumb { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--c-cream); display: block; }
.fac-card .thumb-icon { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--c-primary-tint), var(--c-cream)); color: var(--c-primary); font-size: 54px; }
.fac-card .body, .item-card .body, .news-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.fac-card h3, .item-card h3, .news-card h3 { font-size: 21px; margin: 0 0 8px; }
.item-card h3 a, .news-card h3 a { color: inherit; text-decoration: none; }
.fac-card p, .item-card p, .news-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 12px; }
.fac-card .more, .news-card .more { margin-top: auto; font-weight: 700; color: var(--c-primary); font-size: 15px; }
.item-card .meta, .news-card .meta { font-size: 14px; color: var(--c-accent-text); font-weight: 600; margin-bottom: 6px; }
.news-card .thumb { aspect-ratio: 4/5; width: 100%; object-fit: cover; object-position: top; background: var(--c-cream); }
.news-card .doc-thumb { aspect-ratio: 4/5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(160deg, var(--c-cream), var(--c-primary-tint)); color: var(--c-primary); padding: 20px; text-align: center; }
.news-card .doc-thumb i { font-size: 58px; }
.card-grid.compact .news-card .doc-thumb, .card-grid.compact .news-card .thumb { aspect-ratio: 16/10; }
.news-card .doc-thumb span { font: 800 20px/1.2 var(--ff-head); color: var(--c-head); }
.chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--c-primary-tint); color: var(--c-head); letter-spacing: .02em; }
.chip-accent { background: var(--c-accent); color: var(--c-on-accent); }

/* ---------- Life at school (photo mosaic) ---------- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.filter-pills a, .filter-pills button { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--c-line); text-decoration: none; color: var(--c-head); font-weight: 700; font-size: 14.5px; background: var(--card); }
.filter-pills a.active, .filter-pills button.active, .filter-pills a:hover, .filter-pills button:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.sec-head .filter-pills { margin: 0; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.mosaic a { position: relative; border-radius: 18px; overflow: hidden; display: block; background: var(--c-cream); }
.mosaic.full a:nth-child(7n+1) { grid-row: span 2; }
.mosaic.full a:nth-child(7n+2) { grid-column: span 2; }
.mosaic.full a:nth-child(7n+5) { grid-row: span 2; }
.mosaic:not(.full) { grid-auto-rows: 240px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mosaic a:hover img { transform: scale(1.05); }
.mosaic .cap { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255,255,255,.9); border-radius: 10px; padding: 7px 10px; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mosaic a.is-hidden { display: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-grid a { display: block; position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 1; background: var(--c-cream); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.05); }

/* ---------- Call to action ---------- */
.cta-card { position: relative; overflow: hidden; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--c-dark) 0%, var(--c-dark-2) 100%); color: var(--c-on-dark-soft); padding: clamp(28px, 4vw, 48px); padding-left: clamp(34px, 4.5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; box-shadow: var(--shadow); }
.cta-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c-accent); }
.cta-card .watermark { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; opacity: .07; pointer-events: none; filter: grayscale(1) brightness(3); }
.cta-card h2 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 10px; max-width: 22ch; }
.cta-card p { margin: 0; max-width: 56ch; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; min-width: 240px; position: relative; z-index: 1; }

/* ---------- Contact band ---------- */
.contact-band { background: var(--card); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; }
.contact-grid > div { padding: clamp(28px, 4vw, 44px); }
.contact-grid .c-form { background: var(--c-primary-tint); }
.contact-grid .c-map { padding: 0; min-height: 420px; background: var(--c-cream); }
.contact-grid .c-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.contact-grid .c-map .no-map { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 24px; }
.contact-grid h2 { font-size: clamp(28px, 3vw, 36px); margin: 0 0 18px; }
.c-info .school { font-family: var(--ff-head); font-weight: 700; color: var(--c-primary); font-size: 19px; margin-bottom: 4px; }
.c-list { list-style: none; padding: 0; margin: 18px 0 0; }
.c-list li { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.c-list i { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--c-cream); color: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 17px; border: 1px solid var(--c-line); }
.c-list a { font-weight: 700; text-decoration: none; }
.c-list a:hover { text-decoration: underline; }

/* ---------- Photo strip ---------- */
.photo-strip { background: var(--c-cream-deep); padding: 22px 0; overflow: hidden; }
.strip-track { display: flex; gap: 16px; width: max-content; animation: strip 60s linear infinite; }
.photo-strip:hover .strip-track { animation-play-state: paused; }
.strip-track img { height: 160px; width: 230px; object-fit: cover; border-radius: 14px; border: 5px solid #fff; box-shadow: var(--shadow-soft); }
@keyframes strip { to { transform: translateX(-50%); } }

/* ---------- Inner page header ---------- */
.page-hero { padding: clamp(20px, 3vw, 32px) 0 0; }
.page-hero-card { position: relative; overflow: hidden; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--c-dark) 0%, var(--c-dark-2) 100%); padding: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 48px); padding-left: clamp(34px, 4.5vw, 56px); color: var(--c-on-dark-soft); }
.page-hero-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c-accent); }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); margin: 6px 0 0; }
.page-hero .breadcrumb { margin: 0; font-size: 15px; }
.page-hero .breadcrumb a { color: var(--c-accent); text-decoration: none; font-weight: 600; }
.page-hero .breadcrumb a:hover { text-decoration: underline; }
.page-hero .breadcrumb-item.active { color: var(--c-on-dark-soft); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: var(--c-on-dark-soft); }

/* ---------- Rich text content ---------- */
.prose { max-width: 75ch; font-size: 17.5px; }
.prose h2 { font-size: 30px; margin: 2rem 0 .8rem; }
.prose h3 { font-size: 23px; margin: 1.6rem 0 .6rem; }
.prose p, .prose li { color: #343026; }
.prose img { height: auto; border-radius: 14px; margin: 1rem 0; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.25rem 0; font-size: 16px; display: block; overflow-x: auto; border: 1px solid var(--c-line); border-radius: 14px; background: var(--card); }
.prose th, .prose td { border-bottom: 1px solid var(--c-line); padding: .7rem .9rem; text-align: left; }
.prose tr:last-child td, .prose tr:last-child th { border-bottom: 0; }
.prose th { background: var(--c-cream); color: var(--c-head); }
.prose blockquote { border-left: 4px solid var(--c-accent); padding: .25rem 0 .25rem 1rem; color: var(--muted); font-style: italic; }
.page-figure { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--r-lg); margin-bottom: 1.75rem; }
.side-box { background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1.4rem; }
.side-box h2 { font-size: 22px; margin-bottom: .8rem; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li a { display: block; padding: .55rem 0; border-bottom: 1px solid var(--c-line); text-decoration: none; color: var(--ink); font-weight: 500; }
.side-box li:last-child a { border-bottom: 0; }
.side-box li a:hover, .side-box li a.active { color: var(--c-primary); font-weight: 700; }
.side-box.navy { background: var(--c-head); border: 0; color: var(--c-on-dark-soft); }
.side-box.navy h2 { color: #fff; }

/* ---------- Notice board & lists ---------- */
.board { background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); height: 100%; display: flex; flex-direction: column; }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-line); }
.board-head h3 { font-size: 22px; margin: 0; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-line); }
.board-list li:last-child { border-bottom: 0; }
.board-list h4 { font-family: var(--ff-body); font-size: 17px; font-weight: 700; margin: 0 0 .15rem; color: var(--ink); }
.board-list h4 a { color: inherit; text-decoration: none; }
.board-list .meta { font-size: 14.5px; color: var(--muted); }
.date-tile { flex: 0 0 62px; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--c-line); align-self: flex-start; background: var(--card); }
.date-tile .m { display: block; background: var(--c-primary); color: var(--c-on-primary); font-size: 12px; font-weight: 700; padding: 3px 0; }
.date-tile .d { display: block; font-family: var(--ff-head); font-weight: 800; font-size: 24px; color: var(--c-head); line-height: 1.5; }
.date-tile.accent .m { background: var(--c-accent); color: var(--c-on-accent); }
.badge-new { background: var(--c-accent); color: var(--c-on-accent); font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; vertical-align: middle; margin-left: .4rem; letter-spacing: .04em; }
.empty-note { padding: 2.5rem 1.25rem; color: var(--muted); text-align: center; background: var(--card); border: 1px dashed var(--c-line); border-radius: var(--r); }
.doc-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.doc-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--c-line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list li:hover { background: var(--c-cream); }
.doc-list .doc-icon { font-size: 1.8rem; color: var(--c-primary); line-height: 1; }
.doc-list h3 { font-family: var(--ff-body); font-size: 17.5px; font-weight: 700; margin: 0 0 .2rem; color: var(--ink); }
.doc-list p { margin: .25rem 0 0; color: #444; font-size: 16px; }
.doc-list .grow { flex: 1; min-width: 0; }

/* ---------- People (teachers, committee) ---------- */
.teacher { text-align: center; background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1.6rem 1rem; height: 100%; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.teacher:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--c-accent); }
.teacher img { width: 124px; height: 124px; border-radius: 50%; object-fit: cover; border: 5px solid var(--c-cream); outline: 2px solid var(--c-accent); margin-bottom: 1rem; }
.teacher h3 { font-size: 20px; margin: 0 0 .15rem; }
.teacher .role { color: var(--c-primary); font-weight: 700; font-size: 15.5px; }
.teacher .qual { color: var(--muted); font-size: 14.5px; }
.committee-group + .committee-group { margin-top: 3rem; }
.committee-group { scroll-margin-top: 90px; }
.committee-title { font-size: 28px; padding-bottom: .6rem; margin-bottom: 1.4rem; border-bottom: 2px solid var(--c-line); position: relative; }
.committee-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; border-radius: 3px; background: var(--c-accent); }
.committee-title span { font-family: var(--ff-body); font-size: 15px; font-weight: 600; color: var(--muted); margin-left: .4rem; }

/* ---------- Gallery albums & videos ---------- */
.album-card { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; height: 100%; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.album-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--c-accent); color: inherit; }
.album-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.album-card .body { padding: 1rem 1.2rem 1.2rem; }
.album-card h3 { font-size: 21px; margin: 0 0 .2rem; }
.album-card .meta { font-size: 14.5px; color: var(--muted); }
.video-card { background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; }
.video-card h3 { font-size: 19px; padding: .9rem 1.1rem; margin: 0; }

/* ---------- Alumni ---------- */
.alumni-points { list-style: none; padding: 0; margin: 1.5rem 0; }
.alumni-points li { display: flex; gap: .9rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--c-line); }
.alumni-points li:last-child { border-bottom: 0; }
.alumni-points i { font-size: 1.2rem; color: var(--c-primary); width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--card); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; }
.alumni-points span { font-weight: 600; }
.alum { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1rem; height: 100%; }
.alum img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--c-cream); outline: 2px solid var(--c-accent); }
.alum h3 { font-size: 19px; margin: 0 0 .3rem; }
.alum p { margin: .4rem 0 0; font-size: 15px; color: #444; line-height: 1.4; }
.alum .meta { color: var(--muted); font-size: 14px; margin-top: .25rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--card); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem); border-top: 6px solid var(--c-accent); }
.form-label { font-weight: 700; margin-bottom: .3rem; font-size: 15.5px; }
.form-label .opt, .form-label small { font-weight: 400; color: var(--muted); }
.form-control, .form-select { border-radius: var(--r-field); padding: .65rem .85rem; border: 1.5px solid var(--c-line); background-color: #fff; font-size: 16px; }
.form-control:focus, .form-select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 .2rem rgba(var(--c-primary-rgb), .15); }
.req { color: #b42318; }
.hp-field { position: absolute; left: -5000px; }
.contact-info { list-style: none; padding: 0; margin: 0; }
.contact-info li { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.contact-info li:last-child { border-bottom: 0; }
.contact-info i { font-size: 1.2rem; color: var(--c-primary); width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--card); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; }
.contact-info strong { display: block; font-family: var(--ff-head); color: var(--c-head); }
.map-wrap { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-line); }
.map-wrap iframe { width: 100%; height: 400px; border: 0; display: block; }
.alert { border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-dark); color: var(--c-on-dark-soft); padding: clamp(48px, 6vw, 72px) 0 0; font-size: 16px; }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--c-accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 32px; }
.footer-logo { width: 74px; height: 74px; background: #fff; border-radius: 14px; padding: 8px; object-fit: contain; margin-bottom: 14px; }
.footer-name { font-family: var(--ff-head); font-weight: 800; color: #fff; font-size: 22px; line-height: 1.2; margin-bottom: 8px; }
.footer-about { max-width: 40ch; }
.footer-title { color: var(--c-accent); font-size: 19px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 12px; }
.footer-contact i { color: var(--c-accent); margin-top: 2px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.socials a:hover { background: var(--c-accent); color: var(--c-on-accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 44px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 14.5px; }
.footer-bottom .heart { color: #ff5a5f; }

/* ---------- Mobile action bar ---------- */
.actionbar { display: none; }
.float-actions { display: none; }
.float-btn { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; background: var(--wa); box-shadow: 0 6px 18px rgba(0,0,0,.25); text-decoration: none; }
.float-btn:hover { color: #fff; transform: translateY(-2px); }

.pagination .page-link { color: var(--c-primary); border-color: var(--c-line); font-weight: 600; }
.pagination .active > .page-link { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }

/* ---------- Scroll reveal ---------- */
/* Content is always visible; the fade-in is only switched on by main.js when the browser supports it. */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid .c-map { grid-column: 1 / -1; order: 3; min-height: 340px; }
}
@media (max-width: 991.98px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 440px; }
  .leader-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .acad-grid { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .mosaic.full a:nth-child(7n+2) { grid-column: span 1; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
  body { font-size: 16.5px; padding-bottom: 64px; }
  .topbar .topbar-affil { display: none; }
  .topbar .container { justify-content: center; }
  .brand img { width: 58px; height: 58px; }
  .brand-trust, .brand-affil { display: none; }
  .brand-actions .btn-wa { display: none; }
  .hero-slider { min-height: 400px; }
  .slide-cap { left: 12px; right: 12px; bottom: 12px; padding: 16px 18px; }
  .slide-cap p { display: none; }
  .hero-slider .carousel-indicators { display: none; }
  .leader-card { grid-template-columns: 1fr; }
  .leader-photo { min-height: 0; height: 260px; }
  .points { grid-template-columns: 1fr; }
  .counter-panel { grid-template-columns: repeat(2, 1fr); }
  .counter-panel li:nth-child(2) { border-right: 0; }
  .counter-panel li:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-track img { height: 120px; width: 170px; }
  .actionbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: var(--card); border-top: 1px solid var(--c-line); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.35); padding-bottom: env(safe-area-inset-bottom, 0); }
  .actionbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 4px; font-size: 13px; font-weight: 700; color: var(--c-primary); text-decoration: none; }
  .actionbar a + a { border-left: 1px solid var(--c-line); }
  .actionbar i { font-size: 20px; }
  .actionbar .wa { color: var(--wa); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker-items { animation: none; padding-left: 1rem; }
  .strip-track { animation: none; }
}
