/* ============================================================
   VBSSJ — Vidya Bharti Sr. Sec. School, Jalore
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Backgrounds — deep royal maroon */
  --bg:         #260B09;
  --bg-alt:     #2E0F0C;
  --bg-card:    #3D1411;
  --bg-raised:  #4A1916;
  --bg-input:   #2A0D0A;

  /* Premium gold gradient — 4 stops, bold metallic */
  --brick:      #C08020;   /* Deep Vivid Gold — icons, main accents */
  --brick-light:#F0C040;   /* Bright Highlight Gold — hover, glint */
  --brick-dim:  #8A6018;   /* Antique Dark Gold — secondary, borders */
  --gold-deep:  #4A3510;   /* Shadow Gold — depth, pressed states */

  /* Active state */
  --burgundy:   #1E0807;   /* Deeper maroon for active nav bg */

  /* Text */
  --text:       #CFC6B0;
  --text-muted: #9A927F;
  --text-head:  #F5E9D0;

  /* Borders */
  --border:     rgba(192,128,32,0.15);
  --border-mid: rgba(255,255,255,0.06);

  --white: #FFFFFF;
  --shadow: rgba(0,0,0,0.65);

  --font-serif:       'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:        'Lora', Georgia, 'Times New Roman', serif;
  --font-devanagari:  'Noto Serif Devanagari', serif;

  --max-width: 1100px;
  --radius:    4px;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Logo watermark — to revert, delete this rule */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 64px; /* clear the sidebar */
  right: 0;
  bottom: 0;
  background: url('../images/big%20bg.png') center / cover no-repeat;
  opacity: 0.08;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brick-light); text-decoration: none; }
a:hover { color: var(--brick); text-decoration: underline; }

ul, ol { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-head);
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.4rem); }
h4 { font-size: 1rem; }

.devanagari { font-family: var(--font-devanagari); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section        { padding: var(--space-16) 0; }
.section--alt   { background-color: var(--bg-alt); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title  { margin-bottom: var(--space-6); }

.divider {
  border: none;
  border-top: 1px solid var(--border-mid);
  margin: var(--space-8) 0;
}

.brick-rule {
  border: none;
  border-top: 3px solid var(--brick);
  width: 2.5rem;
  margin-bottom: var(--space-6);
}

/* ── Focus ring ────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(192,128,32,0.25);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.65em 1.5em;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none !important;
}

/* Primary — solid metallic fill, dark text. The committing action. */
.btn--primary {
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  color: #260B09;
  border: 2px solid var(--brick);
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #F4CC5A 0%, #D08A28 55%, #9A6C1C 100%);
  border-color: var(--brick-light);
  color: #1E0807;
}

/* Outline — border + gradient text, transparent. The secondary action. */
.btn--outline {
  background: transparent;
  border: 2px solid var(--brick-dim);
  background-image: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn--outline:hover {
  border-color: var(--brick);
  text-decoration: none;
}

/* ── Sidebar navigation ─────────────────────────────────────── */
.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 64px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  background:
    linear-gradient(180deg, rgba(61,20,17,0.25) 0%, rgba(30,8,7,0.45) 100%),
    url('../images/bricks%20bg.png') center/cover no-repeat;
  border-right: 1px solid rgba(192,128,32,0.15);
}

/* Expand on hover OR keyboard focus, so tab users can read the labels */
.site-sidebar:hover,
.site-sidebar:focus-within { width: 256px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 70px;
  flex-shrink: 0;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}

.sidebar-brand-icon {
  width: 64px;
  min-width: 64px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: var(--brick-light);
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-brand-text {
  overflow: hidden;
  white-space: nowrap;
  padding-right: 12px;
}

.sidebar-brand-hindi {
  display: block;
  font-family: var(--font-devanagari);
  font-size: 0.8rem;
  color: var(--brick-light);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 3px;
}

.sidebar-brand-en {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.05em;
}

.sidebar-nav-list {
  list-style: none;
  padding: var(--space-2) 0;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: none;
}

.sidebar-nav-list::-webkit-scrollbar { display: none; }

.sidebar-footer {
  padding: 1rem 0;
  text-align: center;
  border-top: 1px solid rgba(192,128,32,0.15);
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.site-sidebar:hover .sidebar-footer { opacity: 1; }

.sidebar-motto-deva {
  font-family: var(--font-devanagari);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #F0C040 0%, #C08020 60%, #8A6018 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}
.sidebar-motto-en {
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none !important;
  color: rgba(255,255,255,0.52);
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover {
  color: var(--brick-light);
  background: rgba(192,128,32,0.08);
}

.sidebar-link.active {
  color: #FCE694;
  background: #1E0807;
  box-shadow: inset 3px 0 0 var(--brick);
}

.sidebar-icon {
  width: 64px;
  min-width: 64px;
  height: 46px;
  padding: 11px 20px;
  flex-shrink: 0;
}

.sidebar-label {
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-right: 12px;
  flex: 1;
  min-width: 0;
}

/* Mobile top bar */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 101;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: linear-gradient(180deg, #3D1411 0%, #1E0807 100%);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  width: 36px;
  height: 36px;
  flex-direction: column;
  gap: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.mobile-menu-btn:hover { border-color: rgba(240,192,64,0.35); }
.mobile-menu-btn:hover .burger-line { background: var(--brick-light); }
.mobile-menu-btn[aria-expanded="true"] { border-color: rgba(240,192,64,0.35); }

/* Burger lines */
.burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
  transform-origin: center center;
  transition:
    transform  0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.2s  ease,
    width      0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease;
}

/* Closing state — stagger lines back outward */
.burger-line:nth-child(1) { transition-delay: 0s, 0s, 0.1s, 0s; }
.burger-line:nth-child(2) { transition-delay: 0.08s, 0.08s, 0s, 0s; }
.burger-line:nth-child(3) { transition-delay: 0s, 0s, 0.1s, 0s; }

/* Middle line is slightly shorter — tapered look */
.burger-line:nth-child(2) { width: 14px; }

/* Open state — morph to X */
.mobile-menu-btn[aria-expanded="true"] .burger-line {
  background: var(--brick-light);
}
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 20px;
  transition-delay: 0.05s, 0s, 0s, 0s;
}
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
  transition-delay: 0s, 0s, 0s, 0s;
}
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 20px;
  transition-delay: 0.05s, 0s, 0s, 0s;
}

button.sidebar-link {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  padding: 0;
}

.sidebar-crest {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.mobile-topbar-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  text-decoration: none !important;
}

.mobile-topbar-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  max-width: calc(100vw - 120px);
}

.mobile-topbar-logo .devanagari {
  font-size: 0.88rem;
  color: var(--brick-light);
  font-weight: 600;
}

.mobile-topbar-logo span:not(.devanagari) {
  font-family: var(--font-body);
  font-size: 0.58rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Hero (home) ───────────────────────────────────────────── */
.hero--home {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: #260B09;
}

.hero--home .container {
  position: relative;
  z-index: 1;
  padding: var(--space-24) var(--space-6) var(--space-16);
}

.hero-established {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom: var(--space-6);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.hero-established::before,
.hero-established::after {
  content: '';
  width: 52px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

.hero-name-hindi {
  font-family: var(--font-devanagari);
  font-size: clamp(1.5rem, 5.5vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: var(--space-3);
  text-shadow: 0 2px 12px rgba(0,0,0,0.85), 0 0 40px rgba(0,0,0,0.5);
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-name-english {
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  margin-bottom: var(--space-8);
  overflow-wrap: break-word;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  margin-bottom: var(--space-8);
}

.btn--hero {
  display: inline-block;
  background: var(--brick);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.35);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.8em 2.4em;
  border-radius: 2px;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s;
}
.btn--hero:hover {
  background: var(--brick-light);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}

/* ── Results hero slideshow (home) ─────────────────────────── */
.results-hero {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  background-color: #3D1411;
}

.results-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.88) 0%,
    rgba(10,10,10,0.80) 35%,
    rgba(10,10,10,0.82) 65%,
    rgba(10,10,10,0.92) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.rslide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
  z-index: 1;
}

.rslide.active { opacity: 1; pointer-events: auto; }

.rslide-inner {
  padding: var(--space-8) var(--space-6);
  max-width: 740px;
  width: 100%;
}

.rslide-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

.rslide-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 12px rgba(0,0,0,0.85), 0 0 40px rgba(0,0,0,0.4);
}

.rslide-detail {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: rgba(255,255,255,0.68);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  margin-bottom: var(--space-8);
  line-height: 1.75;
}

.rslide-cta {
  display: inline-block;
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.32);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.72em 2.2em;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s;
}

.rslide:hover .rslide-cta {
  background: rgba(196,96,58,0.48);
  border-color: var(--brick-light);
  color: #fff;
}

.rslide-prev, .rslide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(10,6,4,0.35);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.6);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.rslide-prev { left: 1.25rem; }
.rslide-next { right: 1.25rem; }
@media (hover: hover) {
  .rslide-prev:hover, .rslide-next:hover {
    background: rgba(196,96,58,0.52);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
  }
}
.rslide-prev:focus, .rslide-next:focus { outline: none; }
.rslide-prev:active, .rslide-next:active {
  background: rgba(196,96,58,0.52);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.rslide-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.rslide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.38);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}

.rslide-dot.active { background: var(--brick); border-color: var(--brick); }

/* ── Quick-nav bar (below hero) ─────────────────────────────── */
.quick-nav {
  background: var(--bg);
  border-bottom: 2px solid var(--border-mid);
  display: flex;
  align-items: stretch;
}

.quick-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.1rem 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-right: 1px solid var(--border-mid);
  transition: background 0.15s, color 0.15s;
}
.quick-nav-item:last-child { border-right: none; }
.quick-nav-item:hover {
  background: var(--bg-raised);
  color: var(--brick-light);
}

.quick-nav-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.65;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.quick-nav-item:hover .quick-nav-icon { opacity: 1; }

/* Sub-page hero */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-mid);
  padding: var(--space-12) 0 var(--space-8);
}

.page-hero h1 {
  border-left: 4px solid var(--brick);
  padding-left: var(--space-6);
}

/* Prevent grid children from overflowing their tracks */
.card-grid > *,
.anchor-cards > *,
.faculty-grid > *,
.alumni-grid > *,
.gallery-grid > * { min-width: 0; }

/* ── Anchor cards (home) ────────────────────────────────────── */
.anchor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
}

.anchor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-top: 3px solid var(--brick);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-decoration: none !important;
  display: block;
  transition: border-color 0.15s, background-color 0.15s;
}

.anchor-card:hover {
  background: var(--bg-raised);
  border-color: var(--brick);
  text-decoration: none;
}

.anchor-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-2);
  color: var(--text-head);
}

.anchor-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.55;
}

/* ── Generic card ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
}

.card-body { padding: var(--space-6); }

.card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
  color: var(--text-head);
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* ── Placeholder image blocks ──────────────────────────────── */
.img-placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
  padding: var(--space-4);
  min-height: 180px;
}

/* ── Faculty ────────────────────────────────────────────────── */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-6);
}

.faculty-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-4);
}

.faculty-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  background: var(--bg-raised);
  border: 2px solid var(--border-mid);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.faculty-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-head);
  margin-bottom: var(--space-1);
}

.faculty-designation { font-size: 0.78rem; color: var(--text-muted); }

/* ── Notices ───────────────────────────────────────────────── */
.notice-list { display: flex; flex-direction: column; gap: var(--space-3); }

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
}

.notice-date {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-top: 2px;
  min-width: 80px;
}

.notice-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-head);
  margin-bottom: var(--space-1);
}

.notice-link { font-size: 0.8rem; color: var(--brick-light); font-weight: 600; }

/* ── Study Material ────────────────────────────────────────── */
.class-section {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  cursor: pointer;
  user-select: none;
}

.class-header h3 { font-size: 0.95rem; color: var(--text); font-weight: 600; }

.class-header .toggle-icon {
  font-size: 1.1rem;
  color: var(--brick-light);
  font-style: normal;
  transition: transform 0.2s;
}

.class-header.open .toggle-icon { transform: rotate(45deg); }

.class-body {
  display: none;
  padding: var(--space-4) var(--space-6);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.class-body.open { display: block; }

.pdf-list { display: flex; flex-direction: column; gap: var(--space-2); }

.pdf-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.pdf-item:last-child { border-bottom: none; }

.pdf-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--brick-dim);
  color: var(--white);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Gallery ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  position: relative;
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.gallery-item:hover img { transform: scale(1.04); }

.gallery-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(12,9,7,0.8);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: var(--space-2) var(--space-3);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-close:hover { color: var(--text-head); }

/* ── Alumni ────────────────────────────────────────────────── */
.alumni-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.alumni-filter label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

.alumni-filter select {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-6);
}

.alumni-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  cursor: pointer;
}

.alumni-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto var(--space-3);
  background: var(--bg-raised);
  border: 2px solid var(--border-mid);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.alumni-photo img { width: 100%; height: 100%; object-fit: cover; }

.alumni-name { font-family: var(--font-serif); font-size: 0.95rem; color: var(--text-head); margin-bottom: var(--space-1); }
.alumni-year { font-size: 0.75rem; color: var(--brick-light); font-weight: 600; margin-bottom: var(--space-2); }
.alumni-brief { font-size: 0.8rem; color: var(--text-muted); }

.alumni-popup {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 230px;
  background: var(--bg-raised);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 10;
  text-align: left;
  font-size: 0.85rem;
}

.alumni-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-mid);
}

.alumni-card:hover .alumni-popup,
.alumni-card.popup-open .alumni-popup { display: block; }

.alumni-popup-name { font-family: var(--font-serif); font-weight: 700; font-size: 0.95rem; margin-bottom: var(--space-2); color: var(--text-head); }
.alumni-popup-year { font-size: 0.72rem; color: var(--brick-light); font-weight: 600; margin-bottom: var(--space-3); }
.alumni-popup-achievement { color: var(--text-muted); line-height: 1.55; }

/* ── Contact ────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.contact-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  margin-bottom: var(--space-4);
  transition: border-color 0.15s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brick);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form textarea { min-height: 130px; resize: vertical; }

.form-success {
  display: none;
  padding: var(--space-4) var(--space-6);
  background: rgba(100,180,100,0.1);
  border: 1px solid rgba(100,180,100,0.3);
  border-radius: var(--radius);
  color: #8ecf8e;
  font-size: 0.9rem;
}

.contact-info p {
  display: flex;
  gap: var(--space-3);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
  align-items: flex-start;
  color: var(--text-muted);
}

.info-label {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brick-light);
  min-width: 72px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.map-placeholder {
  margin-top: var(--space-6);
  height: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-placeholder iframe { width: 100%; height: 100%; border: none; }

/* ── Results ───────────────────────────────────────────────── */
.result-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-left: 4px solid var(--brick);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-6);
}

.result-banner h3 { margin-bottom: var(--space-2); color: var(--text-head); }
.result-banner p  { margin-bottom: var(--space-4); color: var(--text-muted); }
.result-banner p:last-child { margin-bottom: 0; }

/* ── About ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.about-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-top: 3px solid var(--brick);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--brick-light);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.message-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: var(--space-8);
}

.message-card blockquote {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  border-left: 3px solid var(--brick);
  padding-left: var(--space-4);
  margin-bottom: var(--space-6);
}

.message-byline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.message-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.6rem;
  flex-shrink: 0;
}

.message-name  { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 700; color: var(--text-head); }
.message-role  { font-size: 0.78rem; color: var(--text-muted); }

/* ── Org Chart Tree ─────────────────────────────────────────── */
.oct {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0 1.5rem;
  overflow-x: auto;
}

.oct-connector {
  width: 1px;
  height: 2rem;
  background: var(--brick-dim);
}

.oct-connector--sm { height: 1.25rem; }

.oct-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.oct-tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brick-light);
  margin-bottom: 0.7rem;
}

.oct-nodes {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-top: 1.5rem;
}

/* Horizontal bar: spans center of first card → center of last card */
/* Cards are 130px wide; half = 65px offset from each edge */
.oct-nodes::before {
  content: '';
  position: absolute;
  top: 0;
  left: 65px;
  right: 65px;
  height: 1px;
  background: var(--brick-dim);
}

/* Sub-management row wraps freely — no horizontal bar needed */
.oct-nodes--sm {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 720px;
}
.oct-nodes--sm::before { display: none; }
.oct-nodes--sm .oct-node::before { display: none; }

/* Vertical stem from horizontal bar down to card */
.oct-node {
  display: flex;
  position: relative;
}

.oct-node::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1.5rem;
  background: var(--brick-dim);
}

/* Cards */
.oct-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.oct-card--lead {
  border-color: var(--brick-dim);
  background: var(--bg-raised);
}

.oct-card--sm {
  padding: 0.6rem 0.85rem;
  min-width: 110px;
}

.oct-avt {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.oct-avt--sm {
  width: 34px;
  height: 34px;
  font-size: 0.45rem;
}

.oct-name {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-head);
  line-height: 1.2;
}

.oct-name--sm { font-size: 0.78rem; }

.oct-role {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.oct-role--accent {
  color: var(--brick-light);
  font-weight: 600;
}

/* Mobile: hide connecting lines, grid layout — 3 per row minimum */
@media (max-width: 768px) {
  .oct-nodes::before,
  .oct-node::before { display: none; }
  .oct-connector { display: none; }
  .oct-nodes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 0;
    width: 100%;
  }
  /* Leadership row has 2 cards — use 2-column grid */
  .oct-nodes--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .oct-card, .oct-card--lead {
    min-width: 0;
    padding: 0.75rem 0.5rem;
  }
  .oct-name { font-size: 0.8rem; }
  .oct-name--sm { font-size: 0.72rem; }
  .oct-avt { width: 36px; height: 36px; }
  .oct-avt--sm { width: 28px; height: 28px; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: #080604;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: auto;
  border-top: 2px solid var(--brick-dim);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-8);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
}

.footer-school-name    { font-family: var(--font-devanagari); font-size: 1.05rem; color: var(--text-head); font-weight: 600; margin-bottom: var(--space-2); }
.footer-school-name-en { font-family: var(--font-serif); font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--space-6); }
.footer-address        { line-height: 1.9; color: var(--text-muted); }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.2);
  margin-bottom: var(--space-4);
}

.footer-col ul li { margin-bottom: var(--space-2); }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--brick-light); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: var(--space-4) var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
}

/* ── Admissions steps ───────────────────────────────────────── */
.steps { counter-reset: step; }

.step-item {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.step-number {
  flex-shrink: 0;
  counter-increment: step;
  width: 38px;
  height: 38px;
  background: var(--brick-dim);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.step-body h3 { margin-bottom: var(--space-2); color: var(--text-head); }
.step-body p  { margin-bottom: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ── Desktop: sidebar offset ─────────────────────────────────── */
@media (min-width: 769px) {
  body { padding-left: 64px; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  body::before { left: 0; background-size: auto 85%; }
  .container { padding: 0 var(--space-4); }

  /* Sidebar becomes a mobile overlay */
  .site-sidebar {
    width: 256px;
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .site-sidebar:hover { width: 256px; }
  .site-sidebar.open  { transform: translateX(0); }
  .mobile-topbar   { display: flex; }
  .sidebar-backdrop { display: block; }
  body { padding-top: 52px; }

  .results-hero { min-height: 80vh; background-size: 192px 78px; }
  .rslide-prev  { left: 0.5rem; }
  .rslide-next  { right: 0.5rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .about-grid   { grid-template-columns: 1fr; }
  .about-grid p { margin-bottom: var(--space-6); line-height: 1.9; }
  .about-grid .section-label { padding-top: var(--space-6); border-top: 1px solid rgba(192,128,32,0.18); margin-top: 0 !important; }

  .footer-inner  { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; }

  .section   { padding: var(--space-12) 0; }
  .page-hero { padding: var(--space-8) 0 var(--space-6); }
}

@media (max-width: 480px) {
  .gallery-grid  { grid-template-columns: repeat(2, 1fr); }
  .faculty-grid  { grid-template-columns: repeat(2, 1fr); }
  .alumni-grid   { grid-template-columns: repeat(2, 1fr); }
  .anchor-cards  { grid-template-columns: 1fr; gap: var(--space-3); }
  .quick-nav-item { padding: 0.85rem 0.3rem; font-size: 0.6rem; letter-spacing: 0.1em; gap: 0.35rem; }
  .quick-nav-icon { width: 20px; height: 20px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .anchor-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Touch devices ── */
@media (pointer: coarse) {
  /* Remove blue tap highlight and focus rings everywhere */
  * { -webkit-tap-highlight-color: transparent; }
  *:focus { outline: none; }

  /* Background watermark: hide on mobile — position:fixed causes scroll jitter on Android */
  body::before { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────── */
/* Honour visitors who ask the OS to minimise animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   FACILITIES — "A Day on Campus"
   An illuminated procession: four facilities threaded onto a single
   gold spine, each a moment in the school day. Alternating text/plate.
   ════════════════════════════════════════════════════════════════ */

/* Intro */
.fac-intro { max-width: 760px; }
.fac-intro-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  line-height: 1.5;
  color: var(--text-head);
  font-weight: 400;
}
.fac-intro-sub {
  margin-top: var(--space-4);
  color: var(--brick-light);
  font-style: italic;
  letter-spacing: 0.01em;
}

/* The spine + stations */
.facilities {
  position: relative;
  padding-left: 4rem;
  margin-top: var(--space-4);
}
/* The illuminated gold thread */
.facilities::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 0.4rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0,
    var(--brick) 5%,
    var(--brick-dim) 95%,
    transparent 100%);
  opacity: 0.55;
}

.facility { position: relative; margin-bottom: var(--space-24); }
.facility:last-child { margin-bottom: 0; }

/* Illuminated initial sitting on the spine */
.facility-node {
  position: absolute;
  left: -4rem;                 /* aligns node centre onto the thread at 1.25rem */
  top: -0.15rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #260B09;
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  border: 2px solid var(--brick-light);
  box-shadow: 0 0 0 6px var(--bg), 0 4px 14px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  z-index: 2;
}

/* Two-column station: text + image plate, alternating */
.facility-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.facility--flip .facility-text  { order: 2; }
.facility--flip .facility-plate { order: 1; }

/* Text side */
.facility-phase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.facility-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.facility-ico { width: 20px; height: 20px; color: var(--brick); flex-shrink: 0; }
.facility-title { margin-bottom: var(--space-4); }
.facility-desc { color: var(--text); margin-bottom: var(--space-6); }

.facility-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.facility-chips li {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-head);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

/* Image plate — illuminated frame with gold corner brackets */
.facility-plate {
  position: relative;
  margin: 0;
  padding: 0.55rem;
  background: linear-gradient(160deg, var(--bg-raised), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0,0,0,0.45);
}
.facility-plate img,
.facility-plate .plate-fill {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}
.plate-fill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(192,128,32,0.14), transparent 60%),
    var(--bg-input);
  border: 1px dashed var(--border);
}
.plate-ico { width: 46px; height: 46px; color: var(--brick-dim); opacity: 0.8; }
.plate-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-head);
  margin-top: 0.35rem;
}
.plate-note {
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.facility-plate figcaption {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  padding: 0.7rem 0.5rem 0.2rem;
}

/* Gold corner brackets */
.plate-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brick);
  opacity: 0.85;
  pointer-events: none;
}
.plate-corner.tl { top: 0.2rem; left: 0.2rem; border-right: none; border-bottom: none; }
.plate-corner.tr { top: 0.2rem; right: 0.2rem; border-left: none; border-bottom: none; }
.plate-corner.bl { bottom: 2.4rem; left: 0.2rem; border-right: none; border-top: none; }
.plate-corner.br { bottom: 2.4rem; right: 0.2rem; border-left: none; border-top: none; }

/* Closing invitation */
.fac-invite { max-width: 640px; margin: 0 auto; text-align: center; }
.fac-invite .section-label { display: block; }
.fac-invite p { color: var(--text-muted); }
.fac-invite-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* Reveal-on-scroll (only active when JS is present) */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Facilities — responsive */
@media (max-width: 768px) {
  .facilities { padding-left: 2.75rem; }
  .facilities::before { left: 0.85rem; }
  .facility { margin-bottom: var(--space-16); }
  .facility-node {
    left: -2.75rem;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.9rem;
    box-shadow: 0 0 0 5px var(--bg), 0 3px 10px rgba(0,0,0,0.5);
  }
  .facility-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  /* Image always sits above the text on narrow screens, regardless of flip */
  .facility-text  { order: 2 !important; }
  .facility-plate { order: 1 !important; }
  .plate-corner.bl { bottom: 2.4rem; }
  .plate-corner.br { bottom: 2.4rem; }
}

/* ════════════════════════════════════════════════════════════════
   ACADEMICS — tabbed Calendar / Time Table / Curriculum
   ════════════════════════════════════════════════════════════════ */

/* Tab bar (segmented) */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: var(--space-8);
}
.tab-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text-head); background: rgba(192,128,32,0.06); }
.tab-ico { width: 18px; height: 18px; flex-shrink: 0; }
.tab-btn.active {
  color: #260B09;
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  border-color: var(--brick-light);
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

/* Panels */
.tab-panel { animation: fadeInPanel 0.35s ease; }
.tab-panel[hidden] { display: none; }
@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── School-timings strip ────────────────────────────────── */
.timings-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.timing-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
}
.timing-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-head);
}
.timing-label { font-size: 0.85rem; font-weight: 600; color: var(--brick-light); }
.timing-sub   { font-size: 0.76rem; color: var(--text-muted); }

/* ── Calendar ────────────────────────────────────────────── */
.cal-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-alt);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Filter pills (shared look) */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}
.filter-pill {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.filter-pill:hover { color: var(--text-head); border-color: var(--brick-dim); }
.filter-pill.active {
  color: #260B09;
  background: linear-gradient(180deg, #F0C040 0%, #C08020 55%, #8A6018 100%);
  border-color: var(--brick-light);
}

.cal-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}
.cal-month {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-top: 3px solid var(--brick-dim);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6) var(--space-6);
}
.cal-month-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-head);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-mid);
}
.cal-entries { display: flex; flex-direction: column; gap: var(--space-3); }
.cal-entry {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: var(--space-4);
  border-left: 3px solid var(--e, var(--brick));
}
.cal-entry-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--e, var(--brick));
}
.cal-entry-text { font-size: 0.9rem; color: var(--text); line-height: 1.5; }

/* ── Class picker ────────────────────────────────────────── */
.class-picker {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-mid);
}
.class-picker label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.class-picker select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-4);
  border: 1px solid var(--brick-dim);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-head);
  cursor: pointer;
  min-width: 200px;
}
.class-picker select:hover { border-color: var(--brick); }

/* ── Time table ──────────────────────────────────────────── */
.tt-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-mid); }
.tt-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.tt-table th,
.tt-table td {
  padding: 0.7rem 0.85rem;
  text-align: center;
  border-bottom: 1px solid var(--border-mid);
  border-right: 1px solid var(--border-mid);
  color: var(--text);
}
.tt-table th:last-child, .tt-table td:last-child { border-right: none; }
.tt-table thead th {
  background: var(--bg-raised);
  color: var(--text-head);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.tt-table .tt-time {
  background: var(--bg-alt);
  color: var(--brick-light);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.78rem;
}
.tt-table tbody tr:hover td { background: rgba(192,128,32,0.05); }
.tt-recess td {
  background: var(--burgundy);
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.panel-hint {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: var(--space-4);
}

/* ── Curriculum ──────────────────────────────────────────── */
.curri { display: flex; flex-direction: column; gap: var(--space-8); }
.curri-term {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
}
.curri-term-head {
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(90deg, var(--bg-raised), var(--bg-card));
  border-bottom: 1px solid var(--border);
}
.curri-term-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-head);
  letter-spacing: 0.02em;
}
.curri-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.curri-subject {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-mid);
  border-right: 1px solid var(--border-mid);
}
.curri-subject-name {
  font-weight: 700;
  color: var(--brick-light);
  font-size: 0.92rem;
  margin-bottom: var(--space-2);
}
.curri-topics { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Empty / pending panel ───────────────────────────────── */
.panel-empty {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--text-muted);
}
.panel-empty svg { width: 48px; height: 48px; color: var(--brick-dim); opacity: 0.6; margin: 0 auto var(--space-4); }
.panel-empty p { font-size: 0.95rem; max-width: 420px; margin: 0 auto; }
.panel-empty strong { color: var(--text-head); }

/* ── Academics responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .tab-btn span { font-size: 0.82rem; }
  .tab-btn { padding: 0.65rem 0.6rem; }
  .timings-strip { grid-template-columns: 1fr; gap: var(--space-2); }
  .cal-months { grid-template-columns: 1fr; }
  .class-picker { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .class-picker select { width: 100%; }
}
@media (max-width: 480px) {
  .tab-btn { flex-basis: 100%; }
  .tab-ico { width: 16px; height: 16px; }
}
