/* =========================================================
   R.S. PUBLIC SCHOOL — Design System
   ========================================================= */

:root {
  /* Brand colors — drawn from the school logo */
  --gold: #FDC107;
  --gold-dark: #D99E00;
  --gold-light: #FFE080;
  --gold-deep: #9C7A00;
  --crimson: #D62839;
  --crimson-dark: #A81E2C;
  --green: #1F9D55;
  --green-dark: #14753E;

  --cream: #FFF9F0;
  --gray-warm: #F6F1E7;
  --charcoal: #1D2023;
  --charcoal-soft: #2B2F33;
  --white: #FFFFFF;

  --text-main: #2A2723;
  --text-muted: #6B6660;

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;

  --shadow-sm: 0 4px 14px rgba(30, 20, 10, 0.08);
  --shadow-md: 0 10px 30px rgba(30, 20, 10, 0.12);
  --shadow-lg: 0 20px 50px rgba(30, 20, 10, 0.16);

  --container-w: 1240px;
  --header-h: 92px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); overflow-x: clip; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--charcoal); line-height: 1.2; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold-deep); color: #fff;
  padding: 12px 20px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep);
  margin-bottom: 14px;
}
.eyebrow.center { display: flex; justify-content: center; width: 100%; }
.eyebrow.on-dark { color: var(--gold-light); }

.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 18px; }
.section-title.center { text-align: center; }
.section-title.on-dark { color: #fff; }

.section-text { color: var(--text-muted); font-size: 17px; max-width: 620px; }
.section-text.center { margin: 0 auto 8px; text-align: center; }
.section-text.on-dark { color: rgba(255,255,255,0.85); }

.section-head { margin-bottom: 52px; }
.section-head .section-text { max-width: 560px; }

.text-gradient {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dark) 45%, var(--crimson) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.center-btn { display: flex; justify-content: center; margin-top: 40px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--gold-deep); position: relative;
}
.link-arrow span { transition: transform 0.3s var(--ease); }
.link-arrow:hover span { transform: translateX(5px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 100px; font-family: var(--font-heading);
  font-weight: 600; font-size: 15px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--charcoal); box-shadow: 0 10px 24px rgba(253, 193, 7, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(253, 193, 7, 0.48); }
.btn-outline {
  background: transparent; border: 2px solid var(--gold); color: var(--gold-deep);
}
.btn-outline:hover { background: var(--gold); color: var(--charcoal); transform: translateY(-3px); }
.btn-outline-light {
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.7); color: #fff;
  backdrop-filter: blur(6px);
}
.btn-outline-light:hover { background: #fff; color: var(--gold-deep); transform: translateY(-3px); }
.btn-sm { padding: 11px 22px; font-size: 14px; }
.btn-block { width: 100%; }

/* =========================================================
   TOP BAR
   ========================================================= */
.top-bar { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); color: var(--charcoal); }
.top-bar-inner {
  max-width: 1600px; margin: 0 auto; padding: 9px 24px;
  display: flex; align-items: center; gap: 24px;
}

.marquee-title {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  background: var(--charcoal); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 100px;
}
.marquee-title svg { width: 13px; height: 13px; color: var(--gold); }

.top-bar-marquee { flex: 1; min-width: 0; overflow: hidden; }
.marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 24s linear infinite; }
.marquee-track span { padding: 0 28px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; position: relative; color: var(--charcoal); }
.marquee-track span::after {
  content: "•"; position: absolute; right: -3px; color: rgba(29,32,35,0.4);
}
.marquee-track a { color: inherit; text-decoration: none; }
.marquee-track a:hover { text-decoration: underline; }
.top-bar-marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.top-bar-contact { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.top-bar-item {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--charcoal); white-space: nowrap; transition: color 0.3s var(--ease);
}
.top-bar-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.top-bar-item:hover { color: #fff; }

.top-bar-social { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid rgba(29,32,35,0.2); }
.top-bar-social a { display: flex; color: var(--charcoal); transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.top-bar-social svg { width: 15px; height: 15px; }
.top-bar-social a:hover { color: #fff; transform: translateY(-2px); }

@media (max-width: 768px) {
  .top-bar-label { display: none; }
  .top-bar-contact { gap: 12px; }
}
@media (max-width: 560px) {
  .top-bar { display: none; }
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 249, 240, 0.86);
  backdrop-filter: blur(10px);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid rgba(30, 20, 10, 0.06);
}
.site-header.scrolled {
  background: rgba(255, 249, 240, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  border-bottom-color: rgba(0,0,0,0.08);
}
.header-inner {
  width: 100%; max-width: 1600px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; transition: opacity 0.3s var(--ease); }
.brand:hover { opacity: 0.85; }
.header-logo-full { height: 74px; width: auto; max-width: 300px; object-fit: contain; border-radius: 10px; transition: transform 0.4s var(--ease); }
.brand:hover .header-logo-full { transform: scale(1.04); }

.nav-divider { width: 1px; height: 26px; background: rgba(30,20,10,0.1); flex-shrink: 0; }

.main-nav ul { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 15px; font-weight: 600; color: var(--text-main); position: relative;
  padding: 8px 10px; border-radius: 100px; white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark)); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { background: rgba(253,193,7,0.12); color: var(--charcoal); }
.nav-link:hover::after, .nav-link.active-link::after { transform: scaleX(1); }
.nav-link.active-link { color: var(--gold-deep); background: rgba(253,193,7,0.14); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-primary .btn-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px;
}
.hamburger span { width: 22px; height: 2px; background: var(--charcoal); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); margin: 0 auto; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  background: var(--cream);
  transform: translateX(100%); transition: transform 0.4s var(--ease);
  z-index: 99; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 24px 30px; display: flex; flex-direction: column; gap: 24px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav .nav-link { display: block; padding: 12px 4px; font-size: 17px; border-bottom: 1px solid rgba(0,0,0,0.06); }

/* =========================================================
   PAGE BANNER (subpages)
   ========================================================= */
.page-banner {
  position: relative; padding: 64px 0 56px; overflow: hidden; color: #fff; text-align: center;
}
.page-banner-bg { position: absolute; inset: 0; z-index: 0; }
.page-banner-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,0.72), rgba(20,15,10,0.86));
}
.page-banner-inner { position: relative; z-index: 1; }
.breadcrumb { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 14px; letter-spacing: 0.02em; }
.breadcrumb a { color: var(--gold-light); transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--gold); }
.page-banner-title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(30px, 4.6vw, 48px); color: #fff; }

.step-num {
  font-family: var(--font-heading); font-weight: 800; font-size: 21px; color: var(--gold-deep);
}

/* =========================================================
   LEGAL CONTENT (Privacy Policy, Terms & Conditions)
   ========================================================= */
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content .updated-date {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--gold-deep);
  background: rgba(253,193,7,0.12); padding: 6px 16px; border-radius: 100px; margin-bottom: 30px;
}
.legal-content h2 {
  font-family: var(--font-heading); font-weight: 700; font-size: 22px; color: var(--charcoal);
  margin: 40px 0 14px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { color: var(--text-muted); font-size: 15.5px; line-height: 1.75; margin-bottom: 14px; }
.legal-content ul { margin: 0 0 14px; padding-left: 0; }
.legal-content li {
  position: relative; padding-left: 22px; color: var(--text-muted); font-size: 15.5px;
  line-height: 1.75; margin-bottom: 8px;
}
.legal-content li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold);
}
.legal-content strong { color: var(--charcoal); }
.news-detail-image { margin: 6px 0 26px; }
.news-detail-image a { display: block; text-decoration: none; }
.news-detail-image img {
  display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain;
  background: var(--cream); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.legal-content a { color: var(--gold-deep); font-weight: 600; text-decoration: underline; }

/* =========================================================
   DOWNLOADS
   ========================================================= */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.download-card {
  display: flex; align-items: center; gap: 16px; background: #fff; border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.download-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.download-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(253,193,7,0.24), rgba(217,158,0,0.14)); color: var(--gold-deep);
}
.download-icon svg { width: 26px; height: 26px; }
.download-info { flex: 1; min-width: 0; }
.download-info h3 { font-size: 15.5px; margin-bottom: 4px; }
.download-info p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.download-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700;
  color: var(--gold-deep); transition: color 0.3s var(--ease);
}
.download-link:hover { color: var(--charcoal); }
.download-link svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  .download-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .download-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  overflow: hidden; color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.4s var(--ease);
  animation: heroKenBurns 12s ease-in-out infinite alternate;
}
.hero-img.active { opacity: 1; z-index: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(20,15,10,0.75) 0%, rgba(30,20,15,0.55) 45%, rgba(15,10,8,0.85) 100%);
}
@keyframes heroKenBurns { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero-dots {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.hero-dots button.active { background: #fff; transform: scale(1.3); }

.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.lotus-line { position: absolute; width: 340px; opacity: 0.18; }
.lotus-line--1 { right: -60px; bottom: -60px; }
.floating-dot {
  position: absolute; border-radius: 50%; background: var(--gold);
  filter: blur(1px); animation: floatY 7s ease-in-out infinite;
}
.dot-1 { width: 10px; height: 10px; top: 20%; left: 12%; animation-delay: 0s; }
.dot-2 { width: 14px; height: 14px; top: 60%; left: 88%; background: var(--crimson); animation-delay: 1.5s; }
.dot-3 { width: 8px; height: 8px; top: 75%; left: 20%; background: var(--green); animation-delay: 3s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }

.hero-inner {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + 20px); padding-bottom: 30px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px); padding: 8px 18px 8px 8px; border-radius: 100px;
  font-family: var(--font-heading); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  margin-bottom: 26px;
}
.eyebrow-logo { width: 28px; height: 28px; border-radius: 50%; }

.hero-title { font-size: clamp(38px, 6.4vw, 72px); color: #fff; margin-bottom: 22px; letter-spacing: -0.01em; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,0.86); max-width: 560px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }

.scroll-cue {
  position: relative; z-index: 2; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0 auto 30px; padding-top: 10px;
  color: rgba(255,255,255,0.75); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.scroll-cue-arrow { animation: bob 2.2s ease-in-out infinite; font-size: 16px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* =========================================================
   STATS
   ========================================================= */
.stats-section { position: relative; margin-top: -60px; z-index: 3; padding-bottom: 40px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg); padding: 34px 20px; box-shadow: var(--shadow-lg);
}
.stat-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.stat-num {
  font-family: var(--font-heading); font-weight: 800; font-size: clamp(28px, 3.4vw, 38px);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.collage { position: relative; height: 460px; }
.collage-img { position: absolute; border-radius: var(--radius-md); box-shadow: var(--shadow-md); object-fit: cover; }
.collage-1 { width: 66%; height: 78%; top: 0; left: 0; z-index: 1; }
.collage-2 { width: 46%; height: 52%; bottom: 0; right: 0; z-index: 2; border: 6px solid var(--cream); }
.collage-3 { width: 40%; height: 34%; top: 8%; right: 4%; z-index: 0; opacity: 0.9; border: 6px solid var(--cream); }
.collage-badge {
  position: absolute; left: 8%; bottom: 6%; z-index: 3;
  background: #fff; padding: 14px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  font-size: 13px; color: var(--text-muted); max-width: 170px;
}
.collage-badge strong { display: block; font-family: var(--font-heading); font-size: 20px; color: var(--gold-deep); }

.about-content .section-text { margin-bottom: 16px; max-width: 100%; }

/* =========================================================
   PRINCIPAL
   ========================================================= */
.principal-section { background: var(--gray-warm); }
.principal-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: center; }
.principal-photo img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; }
.principal-quote {
  font-family: var(--font-heading); font-size: clamp(20px, 2.4vw, 27px); font-weight: 600;
  color: var(--charcoal); line-height: 1.5; position: relative; padding-left: 6px;
}
.quote-mark { color: var(--gold); font-size: 56px; line-height: 1; display: block; margin: 4px 0 2px; font-family: Georgia, serif; }
.principal-meta { margin-top: 26px; display: flex; flex-direction: column; }
.principal-meta strong { font-family: var(--font-heading); font-size: 17px; }
.principal-meta span { color: var(--gold-deep); font-size: 14px; font-weight: 500; }

/* =========================================================
   WHY CHOOSE US
   ========================================================= */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
  background: #fff; border-radius: var(--radius-md); padding: 32px 26px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  border-top: 3px solid transparent;
}
.why-card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow-lg);
  border-top-color: var(--gold);
}
.why-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(253,193,7,0.24), rgba(217,158,0,0.14));
  color: var(--gold-deep); margin-bottom: 18px; transition: transform 0.35s var(--ease);
}
.why-icon svg { width: 26px; height: 26px; }
.why-card:hover .why-icon { transform: scale(1.1) rotate(-4deg); }
.why-card h3 { font-size: 17px; margin-bottom: 8px; }
.why-card p { font-size: 14px; color: var(--text-muted); }

/* =========================================================
   FACILITIES (carousel)
   ========================================================= */
.facilities-carousel { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.facilities-scroller {
  overflow-x: auto; padding: 10px 0 20px; flex: 1; min-width: 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.facilities-scroller::-webkit-scrollbar { display: none; }
.facilities-track {
  display: flex; gap: 20px; padding: 0 24px; width: max-content;
  scroll-snap-type: x proximity;
}
.facility-card {
  position: relative; width: 240px; height: 300px; border-radius: var(--radius-md);
  overflow: hidden; flex-shrink: 0; scroll-snap-align: start; box-shadow: var(--shadow-sm);
}
.facility-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.facility-card:hover img { transform: scale(1.1); }
.facility-card span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 14.5px;
}

.facility-nav {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--gold-deep); font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  z-index: 2;
}
.facility-nav:hover { background: var(--gold); color: var(--charcoal); transform: scale(1.08); }
.facility-nav:active { transform: scale(0.96); }
.facility-nav:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

@media (max-width: 640px) {
  .facilities-carousel { gap: 4px; }
  .facility-nav { width: 38px; height: 38px; font-size: 20px; }
}

.facility-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-top: 40px; }
.facility-grid .facility-card { width: 100%; }
.facility-grid .facility-card.page-hidden { display: none; }

/* =========================================================
   ADMISSIONS
   ========================================================= */
.admissions-section {
  position: relative; padding: 110px 0; overflow: hidden;
  background: linear-gradient(135deg, var(--charcoal), var(--gold-deep) 60%, var(--gold-dark));
  background-size: 200% 200%; animation: gradientShift 14s ease infinite;
}
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.admissions-decor {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.15), transparent 40%),
              radial-gradient(circle at 85% 80%, rgba(255,255,255,0.12), transparent 40%);
}
.admissions-inner { position: relative; max-width: 720px; text-align: center; margin: 0 auto; }
.admissions-text { margin: 0 auto 34px; max-width: 520px; }

/* =========================================================
   NEWS
   ========================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.news-img { position: relative; height: 200px; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.news-card:hover .news-img img { transform: scale(1.08); }
.badge {
  position: absolute; top: 14px; left: 14px; background: var(--gold); color: var(--charcoal);
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em;
}
.news-body { padding: 22px; }
.news-date { font-size: 12.5px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }
.news-body h3 { font-size: 18px; margin: 8px 0 10px; }
.news-body p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 14px; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 10px 20px; border-radius: 100px; font-size: 13.5px; font-weight: 600;
  border: 1.5px solid rgba(0,0,0,0.1); color: var(--text-muted); transition: all 0.3s var(--ease);
}
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item.hidden-item, .gallery-item.page-hidden { display: none; }
.news-card.page-hidden { display: none; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination button, .pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 6px; border-radius: 50%;
  font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  color: var(--text-muted); background: #fff; border: 1.5px solid rgba(0,0,0,0.08);
  transition: all 0.3s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.pagination a:hover { border-color: var(--gold); color: var(--charcoal); }
.pagination button:hover { border-color: var(--gold); color: var(--charcoal); }
.pagination button.active, .pagination span.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--charcoal);
  border-color: transparent; box-shadow: 0 6px 14px rgba(253,193,7,0.35);
}
.pagination button.pagination-arrow, .pagination a.pagination-arrow { background: transparent; border-color: transparent; font-size: 20px; color: var(--gold-deep); }
.pagination button.pagination-arrow:hover, .pagination a.pagination-arrow:hover { color: var(--charcoal); }
.pagination button:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

.lightbox {
  position: fixed; inset: 0; background: rgba(10,8,6,0.94); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 88vw; max-height: 82vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-close { position: absolute; top: 24px; right: 30px; font-size: 34px; color: #fff; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: #fff; padding: 10px 16px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* =========================================================
   VIDEO GALLERY
   ========================================================= */
.video-section { background: var(--gray-warm); }

.video-carousel { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.video-scroller {
  overflow-x: auto; padding: 10px 0 20px; flex: 1; min-width: 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.video-scroller::-webkit-scrollbar { display: none; }
.video-track {
  display: flex; gap: 20px; padding: 0 24px; width: max-content;
  scroll-snap-type: x proximity;
}
.video-card {
  position: relative; display: block; width: 240px; aspect-ratio: 4/5; border-radius: var(--radius-md);
  overflow: hidden; flex-shrink: 0; scroll-snap-align: start; box-shadow: var(--shadow-sm); text-align: left;
}
.video-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.video-card:hover img { transform: scale(1.08); }
.video-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease);
}
.video-play svg { width: 56px; height: 56px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35)); }
.video-card:hover .video-play { transform: scale(1.1); }
.video-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78), transparent);
  color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 14px;
}

.video-nav {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--gold-deep); font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  z-index: 2;
}
.video-nav:hover { background: var(--gold); color: var(--charcoal); transform: scale(1.08); }
.video-nav:active { transform: scale(0.96); }
.video-nav:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

.video-modal {
  position: fixed; inset: 0; background: rgba(10,8,6,0.94); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.video-modal[hidden] { display: none; }
.video-modal-inner { width: 100%; max-width: 900px; }
.video-modal-inner video { width: 100%; max-height: 80vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #000; }
.video-modal-inner video[hidden] { display: none; }
.video-modal-inner iframe { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 80vh; border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #000; }

@media (max-width: 640px) {
  .video-carousel { gap: 4px; padding: 0 8px; }
  .video-nav { width: 38px; height: 38px; font-size: 20px; }
  .video-card { width: 190px; }
}

/* 5 per row on desktop to match the 5-per-page pagination in main.js */
.video-grid-view { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 1100px) { .video-grid-view { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .video-grid-view { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .video-grid-view { grid-template-columns: 1fr; } }
.video-grid-view .video-card { width: 100%; }
.video-grid-view .video-card.page-hidden { display: none; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonial-carousel { max-width: 720px; margin: 0 auto; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s var(--ease); }
.testimonial-card {
  flex: 0 0 100%; background: #fff; border-radius: var(--radius-lg); padding: 44px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.stars { color: var(--gold); font-size: 18px; letter-spacing: 3px; margin-bottom: 18px; }
.testimonial-card p { font-size: 17px; color: var(--text-main); font-style: italic; margin-bottom: 26px; line-height: 1.7; }
.testimonial-person { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testimonial-person img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial-person div { display: flex; flex-direction: column; text-align: left; }
.testimonial-person strong { font-size: 14.5px; }
.testimonial-person span { font-size: 12.5px; color: var(--text-muted); }
.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.testimonial-dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(0,0,0,0.15); transition: background 0.3s var(--ease), transform 0.3s var(--ease); }
.testimonial-dots button.active { background: var(--gold-deep); transform: scale(1.3); }

/* =========================================================
   FINAL CTA
   ========================================================= */
.final-cta {
  position: relative; padding: 110px 0; text-align: center; overflow: hidden;
  background: linear-gradient(135deg, var(--charcoal), var(--green-dark) 130%);
}
.final-cta-decor {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(253,193,7,0.22), transparent 35%),
              radial-gradient(circle at 80% 70%, rgba(217,158,0,0.2), transparent 35%);
}
.final-cta .container { position: relative; }
.final-cta .section-text { margin: 0 auto 34px; }

/* =========================================================
   CONTACT
   ========================================================= */
/* Anchor jumps (Enquire Now -> admissions.aspx#enquiry, homepage #contact) land below the sticky header */
#enquiry, #contact { scroll-margin-top: 100px; }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.info-item strong { display: block; font-family: var(--font-heading); font-size: 14px; color: var(--gold-deep); margin-bottom: 4px; }
.info-item p { color: var(--text-muted); font-size: 15px; }
.info-item a:hover { color: var(--gold-deep); }
.whatsapp-btn { align-self: flex-start; margin-top: 6px; }
.map-embed { margin-top: 10px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); height: 220px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

.contact-form { background: #fff; padding: 36px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--charcoal); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1.5px solid rgba(0,0,0,0.1);
  background: var(--cream); transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(253,193,7,0.18); outline: none;
}
.form-note { margin-top: 14px; font-size: 14px; color: var(--green-dark); font-weight: 600; text-align: center; min-height: 20px; }
.form-note ul { text-align: left; margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.field-error { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #c0392b; }
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-img { display: block; width: 170px; height: 56px; border-radius: 10px; flex-shrink: 0; }
.captcha-refresh {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; border: 1.5px solid rgba(0,0,0,0.1);
  background: var(--cream); font-size: 20px; line-height: 1; cursor: pointer; color: var(--charcoal);
}
.captcha-refresh:hover, .captcha-refresh:focus-visible { border-color: var(--gold); }
.form-group .captcha-input { flex: 1 1 140px; width: auto; min-width: 0; letter-spacing: 3px; text-transform: uppercase; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,0.75); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-link { display: flex; align-items: center; gap: 12px; }
.footer-logo-icon { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(253,193,7,0.2); }
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: #fff; letter-spacing: 0.01em; }
.footer-brand-tagline { font-family: var(--font-heading); font-weight: 600; font-size: 10.5px; letter-spacing: 0.14em; color: var(--gold); }
.footer-brand p { margin: 16px 0 20px; font-size: 14.5px; max-width: 320px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; transition: all 0.3s var(--ease); }
.footer-social svg { width: 18px; height: 18px; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--charcoal); transform: translateY(-3px); }
.footer-links h4, .footer-contact h4 { color: #fff; font-size: 15px; margin-bottom: 18px; }
.footer-links ul { display: flex; flex-direction: column; gap: 11px; }
.footer-links a, .footer-contact a { font-size: 14.5px; transition: color 0.3s var(--ease); }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-contact p { font-size: 14.5px; margin-bottom: 10px; }
.footer-bottom {
  text-align: center; padding: 20px 24px 26px; font-size: 13.5px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.powered-by { font-size: 12.5px; color: rgba(255,255,255,0.55); }
.powered-by a { color: var(--gold-light); font-weight: 600; transition: color 0.3s var(--ease); }
.powered-by a:hover { color: var(--gold); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--charcoal); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s, background 0.3s var(--ease);
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: linear-gradient(135deg, var(--gold-dark), var(--gold-deep)); color: #fff; transform: translateY(-3px); }

@media (max-width: 480px) {
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal { opacity: 0; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal[data-reveal="fade-up"] { transform: translateY(36px); }
.reveal[data-reveal="fade-right"] { transform: translateX(-40px); }
.reveal[data-reveal="fade-left"] { transform: translateX(40px); }
.reveal[data-reveal="scale-in"] { transform: scale(0.9); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1240px) {
  .main-nav { display: none; }
  .nav-divider { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .about-grid, .principal-grid { grid-template-columns: 1fr; gap: 40px; }
  .principal-photo img { max-width: 340px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 26px 16px; }
  .why-grid, .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .collage { height: 360px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .header-logo-full { height: 54px; max-width: 210px; }
  .header-actions .btn-primary.btn-sm { display: none; }
  .hero { min-height: 100vh; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .contact-form { padding: 26px; }
}
