/* ===========================================================
   Velammal Vidyalaya -- Design System
   Blue palette (Velammal Nexus brand blue) + gold accent.
   No CSS framework / CDN dependency.
   =========================================================== */

:root {
  --font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --primary: #1b5faa;
  --primary-dark: #0f3a68;
  --primary-light: #4b85c9;
  --accent: #f2a900;
  --accent-light: #ffcb47;
  --ink: #1a1f24;
  --muted: #626b74;
  --surface: #ffffff;
  --bg: #f7f9fc;
  --bg-alt: #eef2f8;
  --border: #dde6f0;
  --success: #2f8f4e;
  --shadow-sm: 0 2px 8px rgba(15, 58, 104, 0.08);
  --shadow-md: 0 8px 28px rgba(15, 58, 104, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* NOTE: deliberately NOT overflow-x:hidden here -- that forces overflow-y to
     compute as `auto` (per spec, when only one axis is non-visible), which
     breaks position:sticky on .site-header. Fix actual overflow sources
     instead (see .topbar .topbar-items span) rather than masking with this. */
  max-width: 100%;
  font-family: var(--font-family);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4, h5 { font-family: var(--font-family); line-height: 1.25; margin: 0 0 .5em; color: var(--primary-dark); }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-compact { padding: 40px 0; }
.section-alt { background: var(--bg-alt); }
.section-relative { position: relative; overflow: hidden; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title .eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 8px;
}
.section-title h2 { font-size: 2.1rem; }
.section-title p { color: var(--muted); max-width: 640px; margin: 12px auto 0; }

.btn {
  position: relative;
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .5s ease;
}
.btn:hover::before { transform: translateX(120%); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(242,169,0,.35); }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: .9rem; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--primary-dark);
  color: #e6eef7;
  font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #e6eef7; }
.topbar .topbar-items { display: flex; gap: 20px; flex-wrap: wrap; min-width: 0; }
.topbar .topbar-items span { white-space: normal; min-width: 0; }
.topbar .social { display: flex; gap: 12px; }
@media (max-width: 700px) {
  .topbar .topbar-items span:first-child { display: none; } /* full address -- keep phone/email, address is on Contact page + footer */
}

/* ---------- Header / Nav ---------- */
.site-header {
  /* Solid background, not rgba/backdrop-filter -- a filter/backdrop-filter here would
     create a new containing block, breaking position:fixed on the .nav-overlay/.menu-trigger
     descendants nested inside (they'd anchor to this header instead of the viewport). */
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(15,58,104,.06);
  transition: box-shadow .3s ease, transform .35s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.site-header.scrolled .brand img { height: 44px; }
.site-header.hide-on-scroll { transform: translateY(-100%); }
body.nav-open .site-header { transform: none; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: auto; transition: height .3s ease; }
.brand-text { font-family: var(--font-family); font-weight: 700; color: var(--primary); font-size: 1.15rem; line-height: 1.2; }
.brand-text small { display: block; color: var(--muted); font-weight: 400; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }

.brand .brand-nexus-logo { height: 34px; width: auto; padding-right: 12px; border-right: 1px solid var(--border); }
.site-header.scrolled .brand .brand-nexus-logo { height: 28px; }
@media (max-width: 700px) {
  .brand { gap: 8px; }
  .brand img { height: 40px; }
  .brand .brand-nexus-logo { height: 24px; padding-right: 8px; }
}
@media (max-width: 460px) {
  .brand { gap: 6px; }
  .brand img { height: 32px; }
  .brand .brand-nexus-logo { height: 20px; padding-right: 6px; }
}
.header-cta { margin-left: auto; }
@media (max-width: 900px) { .header-cta { display: none; } }

/* ---------- Menu trigger (replaces the traditional link-bar nav) ---------- */
.menu-trigger {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-weight: 700; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 4px;
}
.menu-trigger-lines { display: flex; flex-direction: column; gap: 5px; width: 26px; }
.menu-trigger-lines span { display: block; height: 2px; width: 100%; background: var(--primary); border-radius: 2px; transition: transform .3s ease, opacity .3s ease, width .3s ease; transform-origin: center; }
.menu-trigger-lines span:nth-child(2) { width: 70%; margin-left: auto; }
.menu-trigger:hover .menu-trigger-lines span { width: 100%; }
body.nav-open .menu-trigger-lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 100%; }
body.nav-open .menu-trigger-lines span:nth-child(2) { opacity: 0; }
body.nav-open .menu-trigger-lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 100%; }
body.nav-open .menu-trigger-label { opacity: 0; }
.menu-trigger-label { transition: opacity .2s ease; }

/* ---------- Full-screen overlay menu ---------- */
.nav-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(150deg, var(--primary-dark) 0%, #0a2440 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  visibility: hidden; pointer-events: none;
  clip-path: circle(3% at calc(100% - 48px) 44px);
  transition: clip-path .65s cubic-bezier(.65,0,.35,1), visibility .65s;
  overflow: hidden;
}
.nav-overlay.open {
  visibility: visible; pointer-events: auto;
  clip-path: circle(150% at calc(100% - 48px) 44px);
}
@media (max-width: 600px) {
  .nav-overlay { clip-path: circle(3% at calc(100% - 40px) 40px); }
  .nav-overlay.open { clip-path: circle(150% at calc(100% - 40px) 40px); }
}
.nav-overlay-close {
  position: absolute; top: 26px; right: 28px; z-index: 2;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); color: #fff;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.nav-overlay-close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }

.nav-overlay-links {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: stretch;
  width: 100%; max-width: 420px; padding: 0 40px; gap: 2px;
}
.nav-overlay-links a {
  display: grid; grid-template-columns: 40px 1fr; align-items: baseline; column-gap: 6px;
  color: #f5ebec; font-family: var(--font-family); font-size: 1.9rem; font-weight: 700;
  padding: 9px 4px; position: relative; text-align: left; line-height: 1.15;
  opacity: 0; transform: translateY(24px);
  transition: opacity .45s ease, transform .45s ease, color .2s ease;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-overlay-links a:last-child { border-bottom: none; }
.nav-overlay.open .nav-overlay-links a { opacity: 1; transform: none; }
.nav-overlay-links a .idx { font-size: .82rem; font-family: var(--font-family); color: var(--accent-light); font-weight: 700; }
.nav-overlay-links a:hover, .nav-overlay-links a.active { color: var(--accent-light); }
.nav-overlay-links a:hover .idx, .nav-overlay-links a.active .idx { color: #fff; }
@media (max-width: 700px) { .nav-overlay-links a { font-size: 1.3rem; } }
@media (max-height: 700px) { .nav-overlay-links a { padding: 5px 4px; font-size: 1.4rem; } }

.nav-overlay-links a:nth-child(1) { transition-delay: .06s; }
.nav-overlay-links a:nth-child(2) { transition-delay: .11s; }
.nav-overlay-links a:nth-child(3) { transition-delay: .16s; }
.nav-overlay-links a:nth-child(4) { transition-delay: .21s; }
.nav-overlay-links a:nth-child(5) { transition-delay: .26s; }
.nav-overlay-links a:nth-child(6) { transition-delay: .31s; }
.nav-overlay-links a:nth-child(7) { transition-delay: .36s; }
.nav-overlay-links a:nth-child(8) { transition-delay: .41s; }
.nav-overlay-links a:nth-child(9) { transition-delay: .46s; }
.nav-overlay-links a:nth-child(10) { transition-delay: .51s; }

.nav-overlay-footer {
  position: relative; z-index: 2; margin-top: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0; transition: opacity .6s ease .5s;
}
.nav-overlay.open .nav-overlay-footer { opacity: 1; }
.nav-overlay-footer > div:first-child { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.nav-overlay-footer a { color: #bcd4ea; font-size: .9rem; }
.nav-overlay-footer a:hover { color: var(--accent-light); }
.nav-overlay-footer .social-row a { color: #fff; }

body.nav-open { overflow: hidden; }

/* ---------- Playful kid illustrations flanking the menu list ---------- */
.nav-kid {
  display: none;
  position: absolute; top: 50%;
  width: 240px; z-index: 1;
}
.nav-kid img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.35));
  animation: player-bounce 2.6s ease-in-out infinite;
}
.nav-kid-football { left: 1%; transform: translateY(-50%); }
.nav-kid-cricket { right: 1%; transform: translateY(-50%) scaleX(-1); }
.nav-kid-cricket img { animation-delay: .5s; }
@media (min-width: 1300px) { .nav-kid { display: block; } }

@keyframes player-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-12px) rotate(-2deg) scale(1.02); }
}

/* ---------- Hero slider: animated sky + sliding carousel ---------- */
.hero-slider { position: relative; overflow: hidden; height: 640px; margin-bottom: 76px; }

.hero-sky {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--primary) 45%, var(--primary-dark) 100%);
}
.cloud-layer { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.sky-cloud {
  position: absolute; background: rgba(255,255,255,.22); border-radius: 50%;
  animation: cloud-drift linear infinite;
}
.sky-cloud::before, .sky-cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.sky-cloud.c1 { width: 140px; height: 46px; top: 12%; left: -220px; animation-duration: 34s; }
.sky-cloud.c1::before { width: 74px; height: 74px; top: -36px; left: 14px; }
.sky-cloud.c1::after { width: 90px; height: 90px; top: -46px; left: 60px; }
.sky-cloud.c2 { width: 100px; height: 34px; top: 62%; left: -180px; opacity: .7; animation-duration: 26s; animation-delay: -8s; }
.sky-cloud.c2::before { width: 52px; height: 52px; top: -24px; left: 10px; }
.sky-cloud.c2::after { width: 64px; height: 64px; top: -30px; left: 42px; }
.sky-cloud.c3 { width: 80px; height: 28px; top: 28%; left: -140px; opacity: .5; animation-duration: 22s; animation-delay: -14s; }
.sky-cloud.c3::before { width: 42px; height: 42px; top: -20px; left: 8px; }
.sky-cloud.c3::after { width: 50px; height: 50px; top: -24px; left: 32px; }
.sky-cloud.c4 { width: 120px; height: 40px; top: 78%; left: -200px; opacity: .6; animation-duration: 30s; animation-delay: -4s; }
.sky-cloud.c4::before { width: 64px; height: 64px; top: -30px; left: 12px; }
.sky-cloud.c4::after { width: 78px; height: 78px; top: -40px; left: 50px; }
@keyframes cloud-drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 300px)); } }
.hero-sparkle { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-light); animation: twinkle 3s ease-in-out infinite; }

.hero-track { position: relative; height: 100%; z-index: 2; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  transition: transform .85s cubic-bezier(.65,0,.35,1);
  transform: translateX(100%);
}
.hero-slide.active { transform: translateX(0); z-index: 3; }
.hero-slide.slide-prev { transform: translateX(-100%); }
.hero-slide .container {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; width: 100%;
}

.hero-slide-media { position: relative; }
.hero-slide-media .media-ring {
  position: absolute; inset: -14px; border: 2px dashed var(--accent-light); border-radius: var(--radius);
  opacity: .6; animation: spin-slow 40s linear infinite;
}
.hero-slide-media img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  border-radius: var(--radius); box-shadow: 0 20px 45px rgba(0,0,0,.35); border: 4px solid rgba(255,255,255,.25);
}

.hero-content { color: #fff; }
.hero-slide .hero-content > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.hero-slide.active .hero-content > * { opacity: 1; transform: none; }
.hero-slide.active .hero-content > *:nth-child(1) { transition-delay: .15s; }
.hero-slide.active .hero-content > *:nth-child(2) { transition-delay: .27s; }
.hero-slide.active .hero-content > *:nth-child(3) { transition-delay: .39s; }
.hero-slide.active .hero-content > *:nth-child(4) { transition-delay: .51s; }
.hero-content .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-light); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem;
}
.hero-content .eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--accent-light); display: inline-block; }
.hero-content h1 { color: #fff; font-size: 2.7rem; margin: 14px 0 16px; line-height: 1.14; }
.hero-content p { color: #dce9f5; font-size: 1.05rem; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-controls {
  position: absolute; right: 28px; bottom: 24px; z-index: 5;
  display: flex; align-items: center; gap: 16px;
}
.hero-dots { display: flex; gap: 9px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; transition: background .2s ease, transform .2s ease; }
.hero-dots button.active { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.hero-arrows { display: flex; gap: 10px; }
.hero-arrow {
  position: static; transform: none; z-index: auto;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); color: #fff;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.hero-arrow:hover { background: rgba(255,255,255,.3); transform: scale(1.08); }

@media (max-width: 860px) {
  .hero-slide .container { grid-template-columns: 1fr; text-align: center; }
  .hero-slide-media { max-width: 320px; margin: 0 auto; }
  .hero-content .eyebrow { justify-content: center; }
  .hero-actions { justify-content: center; }
}
@media (max-width: 700px) {
  .hero-slider { height: 680px; margin-bottom: 100px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-controls { right: 50%; transform: translateX(50%); bottom: 16px; }
}

/* ---------- Floating stats card (overlaps hero bottom edge) ---------- */
.stats-float-wrap { position: relative; z-index: 5; margin-top: -96px; margin-bottom: 20px; }
.stats-float {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  box-shadow: 0 20px 46px rgba(15,58,104,.35);
  padding: 32px 20px;
  color: #fff;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-grid > div { border-right: 1px solid rgba(255,255,255,.14); }
.stats-grid > div:last-child { border-right: none; }
.stat-icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--accent-light); }
.stat-icon svg { width: 100%; height: 100%; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: #fff; font-family: var(--font-family); }
.stat-label { text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: #dce9f5; margin-top: 2px; }
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .stats-grid > div:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.14); }
  .stats-grid > div:nth-child(even) { border-right: none; }
  .stats-float-wrap { margin-top: -70px; }
}

/* ---------- About snippet ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center; }
.about-grid img { width: 100%; max-width: 340px; aspect-ratio: 4 / 3.3; object-fit: cover; object-position: top center; border-radius: var(--radius); box-shadow: var(--shadow-md); margin-left: auto; }
.about-grid .prose { font-size: .95rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid img { max-width: 280px; margin: 0 auto; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
  z-index: 2;
}
.card:hover::before { transform: scaleX(1); }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.card .card-body { padding: 20px; }
.card img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; transition: transform .5s ease; }
.card:hover img { transform: scale(1.07); }

.facility-card { text-align: center; padding: 34px 20px; }
.facility-icon {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  transition: background .3s ease, color .3s ease, transform .4s ease;
}
.facility-card:hover .facility-icon { background: var(--primary); color: #fff; transform: rotate(-8deg) scale(1.08); }
.facility-icon svg { width: 30px; height: 30px; }
.facility-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.facility-card p { color: var(--muted); font-size: .92rem; margin: 0; }

.event-card { display: block; }
.event-card .card-body .date { color: var(--accent); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.event-card h3 { font-size: 1.05rem; margin: 6px 0 0; transition: color .2s ease; }
.event-card:hover h3 { color: var(--primary); }

.person-card { text-align: center; padding-bottom: 22px; }
.person-card img { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; object-position: top center; }
.person-card h3 { font-size: 1rem; margin: 14px 0 2px; }
.person-card .role { color: var(--accent); font-size: .85rem; font-weight: 600; }

/* ---------- Notices marquee ---------- */
.notice-strip { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; overflow: hidden; }
.notice-strip .container { display: flex; align-items: center; gap: 16px; }
.notice-strip .tag { background: var(--primary); color: #fff; padding: 4px 14px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.notice-track-wrap { overflow: hidden; flex: 1; }
.notice-track { display: flex; gap: 60px; white-space: nowrap; animation: scroll-left 30s linear infinite; }
.notice-track a { font-weight: 600; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-grid a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; transition: transform .3s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; text-align: center; padding: 56px 0; position: relative; overflow: hidden; }
.cta .container { position: relative; z-index: 2; }
.cta h2 { color: #fff; }
.cta p { color: #dce9f5; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1f33; color: #c3d6e8; padding: 56px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #c3d6e8; }
.site-footer a:hover { color: var(--accent-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo img { height: 44px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: #8fa8c0;
}
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; transition: background .2s ease, transform .2s ease, color .2s ease; }
.social-row a:hover { background: var(--primary); transform: translateY(-2px); }
.social-row-flat { margin-top: 0; gap: 16px; }
.social-row-flat a { width: auto; height: auto; border-radius: 0; background: none; color: #c3d6e8; }
.social-row-flat a:hover { background: none; color: var(--accent-light); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .footer-bottom { justify-content: center; text-align: center; } }

/* ---------- Inner page header ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 54px 0 84px; text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  position: relative; overflow: hidden;
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; margin-bottom: 6px; }
.page-banner .crumbs { color: #bcd4ea; font-size: .9rem; }
.page-banner .crumbs a { color: #fff; }

/* ---------- Generic content / forms ---------- */
.prose :is(h2, h3) { color: var(--primary-dark); }
.prose ul { margin-bottom: 1em; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,95,170,.12); }
textarea.form-control { resize: vertical; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: #e6f4ea; color: #1e5e34; border: 1px solid #b9dfc4; }
.alert-error { background: #fdecec; color: #8a1f1f; border: 1px solid #f3bcbc; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 30px; }
.contact-info-card iframe { width: 100%; height: 220px; border: 0; border-radius: var(--radius-sm); margin-top: 18px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Leader spotlight (bio text + centered photo) ---------- */
.leader-split { display: flex; align-items: stretch; min-height: 480px; }
.leader-split .leader-text {
  flex: 1 1 50%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 48px 56px max(20px, calc((100vw - var(--container)) / 2 + 20px));
}
.leader-split .leader-photo { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; padding: 40px; }
.leader-split .leader-photo img { width: 100%; max-width: 300px; height: auto; aspect-ratio: 3 / 3.5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.leader-split .leader-quote { color: var(--accent); font-weight: 700; font-style: italic; font-size: 1.05rem; line-height: 1.5; margin: 14px 0 18px; }
.leader-signature { margin-top: 26px; font-weight: 700; letter-spacing: .04em; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.leader-signature .arrow { color: var(--accent); font-size: 1.1rem; line-height: 1; }
@media (max-width: 860px) {
  .leader-split { flex-direction: column; min-height: 0; }
  .leader-split .leader-text { padding: 40px 20px; }
  .leader-split .leader-photo { padding: 0 20px 40px; }
  .leader-split .leader-photo img { max-width: 240px; }
}

/* ---------- Vision & Mission split (education-themed floating icons) ---------- */
.vision-mission-section .floating {
  position: absolute;
  font-size: 2.6rem;
  line-height: 1;
  opacity: .35;
  filter: drop-shadow(0 6px 10px rgba(15,58,104,.15));
  animation: vmFloat 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.vision-mission-section .book1 { top: 8%; left: 6%; }
.vision-mission-section .book2 { top: 68%; left: 4%; animation-delay: 1.2s; }
.vision-mission-section .book3 { top: 12%; right: 6%; animation-delay: .6s; }
.vision-mission-section .book4 { top: 66%; right: 5%; animation-delay: 1.8s; }
@keyframes vmFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-22px) rotate(8deg) scale(1.08); }
}
.vision-mission-section .container { position: relative; z-index: 1; }
.vision-mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.vm {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 38px;
  box-shadow: var(--shadow-md);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}
.vm:hover { transform: translateY(-8px) scale(1.015); box-shadow: 0 24px 55px rgba(15,58,104,.2); }
.vm-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 16px;
}
.vm h2 { color: var(--primary-dark); font-size: 1.6rem; margin-bottom: 14px; }
.vm p { color: var(--muted); font-size: .98rem; line-height: 1.75; margin: 0; }
@media (max-width: 860px) {
  .vision-mission-grid { grid-template-columns: 1fr; }
  .vision-mission-section .floating { font-size: 1.8rem; opacity: .3; }
  .vm { padding: 34px 26px; }
}

/* ===========================================================
   Scroll-reveal animation system
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-left { opacity: 0; transform: translateX(-50px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(50px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal-right.in { opacity: 1; transform: none; }

.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0; transform: translateY(28px) scale(.94);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .55s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .65s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .75s; }

/* ===========================================================
   Decorative animated shapes (globe / orbit / particles)
   Nexus-inspired ambient motion -- pure CSS, no images/CDN.
   =========================================================== */
.deco-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }

.deco-globe {
  position: absolute;
  width: 320px; height: 320px;
  right: -60px; top: 50%; transform: translateY(-50%);
  opacity: .5;
  animation: spin-slow 60s linear infinite;
}
.deco-globe circle, .deco-globe ellipse { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1; }
.deco-globe .accent-dot { fill: var(--accent-light); stroke: none; }

.deco-orbit-dot {
  position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 10px 2px rgba(242,169,0,.6);
  animation: float-y 6s ease-in-out infinite;
}
.deco-star {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: twinkle 3.5s ease-in-out infinite;
}
.deco-arrow {
  position: absolute; width: 34px; height: 34px; opacity: .22; z-index: 0;
  animation: arrow-drift 2.4s ease-in-out infinite;
}
.deco-arrow svg { width: 100%; height: 100%; }
@keyframes arrow-drift {
  0%, 100% { transform: translateX(0); opacity: .12; }
  50% { transform: translateX(22px); opacity: .3; }
}
@media (max-width: 700px) { .deco-arrow { display: none; } }

/* ---------- Bouncing school-themed icons (ball, music, book, pencil, cap, palette, flask) ---------- */
.bounce-icon {
  position: absolute; width: 88px; height: 88px; z-index: 0; opacity: .85;
  animation: icon-bounce 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
.bounce-icon svg { width: 100%; height: 100%; }
@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-26px) rotate(8deg); }
}
@media (max-width: 900px) { .bounce-icon { width: 60px; height: 60px; } }
@media (max-width: 700px) { .bounce-icon { display: none; } }

@keyframes spin-slow { from { transform: translateY(-50%) rotate(0deg); } to { transform: translateY(-50%) rotate(360deg); } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

@media (max-width: 900px) { .deco-globe { display: none; } }

/* ---------- Whimsical cloud shapes (hero) ---------- */
.cloud { position: absolute; background: rgba(255,255,255,.16); border-radius: 50%; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud-1 { width: 90px; height: 34px; top: 14%; left: 10%; animation: float-y 8s ease-in-out infinite; }
.cloud-1::before { width: 50px; height: 50px; top: -24px; left: 8px; }
.cloud-1::after { width: 62px; height: 62px; top: -32px; left: 42px; }
.cloud-2 { width: 70px; height: 26px; top: 68%; right: 14%; animation: float-y 7s ease-in-out infinite 1.2s; }
.cloud-2::before { width: 34px; height: 34px; top: -15px; left: 6px; }
.cloud-2::after { width: 42px; height: 42px; top: -19px; left: 32px; }
.cloud-3 { width: 56px; height: 20px; top: 30%; right: 26%; opacity: .7; animation: float-y 6.5s ease-in-out infinite .6s; }
.cloud-3::before { width: 26px; height: 26px; top: -11px; left: 4px; }
.cloud-3::after { width: 32px; height: 32px; top: -14px; left: 24px; }
@media (max-width: 700px) { .cloud-3 { display: none; } }

/* ---------- Circular photo showcase (Nexus-style campus bubbles) ---------- */
.circle-showcase { padding: 34px 0 54px; overflow: hidden; background: var(--bg); }
.circle-track-wrap { overflow: hidden; }
.circle-track { display: flex; gap: 40px; width: max-content; animation: circle-scroll 30s linear infinite; }
.circle-showcase:hover .circle-track { animation-play-state: paused; }
.circle-item { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; width: 130px; }
.circle-photo-ring {
  width: 122px; height: 122px; border-radius: 50%;
  border: 2px dashed var(--accent); padding: 7px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s ease, transform .3s ease;
}
.circle-item:hover .circle-photo-ring { transform: scale(1.06); border-color: var(--primary); }
.circle-photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.circle-item .label { font-weight: 700; font-size: .82rem; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .03em; text-align: center; }
@keyframes circle-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Highlights strip ---------- */
.highlights {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 54px 0;
}
.highlights .container { position: relative; z-index: 2; }
.highlights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.highlight-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(2px);
  transition: transform .25s ease, background .25s ease;
}
.highlight-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.12); }
.highlight-card .hi-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.highlight-card .hi-icon svg { width: 24px; height: 24px; }
.highlight-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.highlight-card p { color: #d6e6f5; font-size: .9rem; margin: 0; }
@media (max-width: 860px) { .highlights-grid { grid-template-columns: 1fr; } }

/* ---------- Wave section dividers ---------- */
.wave-divider { position: absolute; left: 0; right: 0; width: 100%; line-height: 0; z-index: 1; pointer-events: none; }
.wave-divider.top { top: -1px; transform: rotate(180deg); }
.wave-divider.bottom { bottom: -1px; }
.wave-divider svg { display: block; width: 100%; height: 60px; }

/* ---------- Ambient blob backgrounds ---------- */
.blob-bg { position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; animation: float-y 9s ease-in-out infinite; }
.blob-primary { background: rgba(27,95,170,.14); }
.blob-accent { background: rgba(242,169,0,.18); }
.about-grid, .highlights .container, .facilities-wrap { position: relative; z-index: 1; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease, visibility .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Modern ambient background (dot-grid + slow-drifting blobs) ---------- */
.dot-grid-bg {
  position: absolute;
  inset: -10%;
  z-index: 0;
  background-image: radial-gradient(rgba(27,95,170,.16) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  animation: dotDrift 40s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
}
@keyframes dotDrift {
  from { background-position: 0 0; }
  to { background-position: 280px 140px; }
}
.orbit-ring {
  position: absolute;
  border: 1px solid rgba(27,95,170,.14);
  border-radius: 50%;
  z-index: 0;
  animation: spin-slow 70s linear infinite;
}

/* ---------- Facility stat bar (compact floating stats for facility sub-pages) ---------- */
.facility-stats-wrap { position: relative; z-index: 5; margin: -54px auto 0; max-width: 900px; }
.facility-stats {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  box-shadow: 0 20px 46px rgba(15,58,104,.3);
  padding: 28px 20px;
  display: flex;
}
.facility-stats > div { flex: 1; text-align: center; border-right: 1px solid rgba(255,255,255,.14); }
.facility-stats > div:last-child { border-right: none; }
.facility-stats .stat-icon { width: 34px; height: 34px; margin: 0 auto 8px; color: var(--accent-light); }
.facility-stats .stat-num { font-size: 2.1rem; }
@media (max-width: 700px) {
  .facility-stats { flex-direction: column; gap: 20px; }
  .facility-stats > div { border-right: none; }
}
.facility-icon-medallion {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--bg-alt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.facility-icon-medallion svg { width: 32px; height: 32px; }
