/* ============================================================
   DDSPS School Theme — Main Stylesheet
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:    #0d1b5e;
  --dark:       #080f35;
  --accent:     #ff6d00;
  --accent-light: rgba(255,109,0,.12);
  --white:      #ffffff;
  --off-white:  #f7f8fc;
  --card-bg:    #ffffff;
  --border:     #e8eaf0;
  --text:       #1a202c;
  --text-light: #64748b;
  --nav-height: 72px;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(13,27,94,.08);
  --shadow-lg:  0 12px 40px rgba(13,27,94,.14);
  --transition: all .28s cubic-bezier(.4,0,.2,1);
  --font-body:  'Poppins', sans-serif;
  --font-head:  'Playfair Display', serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Announcement Bar ──────────────────────────────────────── */
.announcement-bar {
  background: var(--primary);
  color: white;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .4px;
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  background: var(--accent);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrapper { flex: 1; overflow: hidden; }
.ticker-content {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-sep { color: rgba(255,255,255,.3); padding: 0 16px; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-circle span { color: white; font-weight: 800; font-size: .8rem; letter-spacing: .5px; }
.logo-circle.sm { width: 36px; height: 36px; border-radius: 10px; }
/* Uploaded logo image — navbar */
.logo-img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
/* Smaller variant for the footer */
.logo-img-sm {
  height: 36px;
  max-width: 120px;
  /* logos on dark backgrounds may need a white filter — remove if yours looks fine */
}
.logo-text { display: flex; flex-direction: column; }
.school-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  max-width: 200px;
}
.school-affil { font-size: .66rem; color: var(--text-light); line-height: 1.2; }

.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 9px;
  border-radius: 8px;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(13,27,94,.07);
}
/* Login button */
.nav-login-btn {
  background: var(--primary);
  color: white !important;
  padding: 7px 14px !important;
  margin-left: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-login-btn:hover { background: var(--accent) !important; color: white !important; }
/* Logged-in user widget */
.nav-user-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  background: rgba(13,27,94,.06);
  border-radius: 50px;
  padding: 4px 6px 4px 10px;
}
.nav-user-avatar { color: var(--primary); font-size: 1.1rem; line-height: 1; }
.nav-user-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-logout-btn {
  background: rgba(255,109,0,.12);
  color: var(--accent) !important;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  font-size: .85rem;
}
.nav-logout-btn:hover { background: var(--accent) !important; color: white !important; }

/* ── Auth Pages (Login / Register) ────────────────────────── */
.auth-section {
  min-height: calc(100vh - var(--nav-height) - 36px);
  background: linear-gradient(135deg, var(--off-white) 0%, #e8edf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
}
.auth-card-register { max-width: 460px; }
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}
.auth-emblem {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.auth-emblem span {
  color: white;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1px;
}
.auth-school-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 800;
}
.auth-tagline { font-size: .8rem; color: var(--text-light); }
/* Alert banners */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.5;
}
.auth-alert-error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.auth-alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-field label i { color: var(--accent); width: 14px; }
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.auth-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,27,94,.08); }
/* Password wrapper with eye toggle */
.auth-pw-wrap { position: relative; }
.auth-pw-wrap input { padding-right: 42px; }
.auth-pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  font-size: .85rem;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}
.auth-pw-toggle:hover { color: var(--primary); }
/* Password strength bar */
.auth-pw-strength {
  font-size: .72rem;
  font-weight: 700;
  margin-top: 4px;
  text-align: right;
}
.auth-pw-strength.pw-weak   { color: #e53e3e; }
.auth-pw-strength.pw-fair   { color: #dd6b20; }
.auth-pw-strength.pw-good   { color: #d69e2e; }
.auth-pw-strength.pw-strong { color: #38a169; }
/* Remember / forgot row */
.auth-row-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  color: var(--text-light);
  cursor: pointer;
}
.auth-check input[type="checkbox"] { accent-color: var(--primary); }
.auth-link-sm { font-size: .78rem; color: var(--accent); font-weight: 600; }
.auth-link-sm:hover { color: var(--primary); }
/* Submit button */
.auth-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: 4px;
}
.auth-submit:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,109,0,.3); }
/* Switch link */
.auth-switch {
  text-align: center;
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 22px;
}
.auth-switch a { color: var(--primary); font-weight: 700; }
.auth-switch a:hover { color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height) - 36px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, #0a1840 50%, #0d1b5e 100%);
}
/* Photo variant — keeps the gradient as a fallback */
.hero-has-photo {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
/* Dark overlay — color + opacity are written as inline style from PHP (Customizer values) */
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Fallback shown only if inline style is absent for some reason */
  background: linear-gradient(135deg, rgba(6,12,44,.65) 0%, rgba(13,27,94,.55) 50%, rgba(6,12,44,.65) 100%);
  pointer-events: none;
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;            /* sits above the dark overlay */
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;            /* accent glow on top of canvas */
  background: radial-gradient(ellipse at 30% 50%, rgba(255,109,0,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 4;            /* text always on top */
  padding: 80px 24px;
  max-width: 700px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: .5px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.hero-scroll-hint span {
  display: block; width: 30px; height: 2px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
}
.hero-scroll-hint span:nth-child(1) { width: 30px; }
.hero-scroll-hint span:nth-child(2) { width: 20px; }
.hero-scroll-hint span:nth-child(3) { width: 10px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .3px;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: #e05500; border-color: #e05500; color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,109,0,.35); }
.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: white; color: white; }

/* ── Stats Section ─────────────────────────────────────────── */
.stats-section { background: var(--primary); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 0; }
.stat-card {
  text-align: center;
  padding: 32px 20px;
  border-right: 1px solid rgba(255,255,255,.1);
  transition: var(--transition);
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: rgba(255,255,255,.05); }
.stat-icon { font-size: 2rem; margin-bottom: 10px; }
.stat-number { font-size: 2.4rem; font-weight: 800; color: white; line-height: 1.1; }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.65); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Section Shared ────────────────────────────────────────── */
.page-section { padding: 80px 0; }
.page-section.alt-bg { background: var(--off-white); }
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--primary);
  margin-bottom: 12px;
}
.section-desc { color: var(--text-light); max-width: 540px; margin: 0 auto; line-height: 1.8; }

/* ── About Grid ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.about-emblem-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.school-emblem {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emblem-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: spin 8s linear infinite;
}
.emblem-ring.r1 { width: 200px; height: 200px; opacity: .2; }
.emblem-ring.r2 { width: 160px; height: 160px; opacity: .35; animation-direction: reverse; animation-duration: 12s; }
.emblem-ring.r3 { width: 120px; height: 120px; opacity: .5; animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
.emblem-core {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 1;
}
.emblem-short { color: white; font-weight: 800; font-size: 1rem; letter-spacing: 1px; }
.emblem-est { color: rgba(255,255,255,.65); font-size: .6rem; letter-spacing: 1px; }
.about-motto-pill {
  background: var(--off-white);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--primary);
  display: flex; gap: 8px; align-items: center;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.about-tags span {
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 5px;
}
.about-tags span i { color: var(--accent); }
.about-lead { font-size: 1.05rem; color: var(--text-light); line-height: 1.9; margin-bottom: 14px; }

/* ── Programs Grid ─────────────────────────────────────────── */
.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.program-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.program-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.program-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.program-card h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 8px; }
.program-card p { color: var(--text-light); font-size: .88rem; line-height: 1.7; }
.program-highlights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.prog-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
}

/* ── Principal ─────────────────────────────────────────────── */
.principal-section { background: var(--off-white); }
.principal-grid { display: grid; grid-template-columns: 300px 1fr; gap: 60px; align-items: start; }
.principal-photo-wrap { display: flex; flex-direction: column; gap: 16px; }
.principal-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  object-fit: cover;
}
.principal-photo-placeholder {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: rgba(255,255,255,.4);
}
.principal-card-info {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 3px;
}
.principal-card-info strong { color: var(--primary); font-size: .92rem; }
.principal-card-info span { color: var(--text-light); font-size: .8rem; }
.principal-message blockquote {
  font-family: var(--font-head);
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.9;
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
}
.principal-sig { color: var(--text-light); font-size: .88rem; font-weight: 600; }

/* ── Events Grid ───────────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 24px; }
.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; gap: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.event-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.event-date-box {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 10px;
  flex-shrink: 0;
}
.edb-day { color: white; font-size: 1.3rem; font-weight: 800; line-height: 1; }
.edb-mon { color: rgba(255,255,255,.7); font-size: .62rem; text-transform: uppercase; letter-spacing: 1px; }
.event-info h3 { color: var(--primary); font-size: .95rem; margin-bottom: 4px; }
.event-time { color: var(--accent); font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.event-info p { color: var(--text-light); font-size: .82rem; margin-top: 6px; line-height: 1.6; }

/* ── Gallery Grid ──────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,94,.85) 0%, transparent 60%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0; transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { color: white; font-size: .85rem; margin-bottom: 2px; }
.gallery-overlay span { color: rgba(255,255,255,.7); font-size: .72rem; }
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--off-white);
  color: var(--text-light);
  gap: 8px;
  font-size: .8rem;
}
.gallery-placeholder i { font-size: 2rem; }

/* ── Testimonials ──────────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 24px; }
.testi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testi-stars { color: #f6ad55; font-size: .85rem; margin-bottom: 14px; display: flex; gap: 2px; }
.testi-quote { color: var(--text); font-size: .9rem; line-height: 1.75; margin-bottom: 20px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.testi-author strong { display: block; color: var(--primary); font-size: .9rem; }
.testi-author small { color: var(--text-light); font-size: .75rem; }

/* ── Admissions CTA ────────────────────────────────────────── */
.admissions-cta {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  padding: 80px 0;
  color: white;
}
.admissions-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: white;
  margin-bottom: 14px;
}
.admissions-cta p { color: rgba(255,255,255,.75); max-width: 500px; margin: 0 auto 32px; line-height: 1.8; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ────────────────────────────────────────────────── */
.footer { background: var(--dark); color: rgba(255,255,255,.8); }
.footer-top { padding: 60px 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; }
.footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.footer-brand .footer-logo strong { color: white; font-size: .92rem; display: block; }
.footer-brand .footer-logo small { color: rgba(255,255,255,.5); font-size: .72rem; display: block; }
.footer-brand p { font-size: .82rem; line-height: 1.7; max-width: 280px; color: rgba(255,255,255,.55); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social-a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: var(--transition);
}
.footer-social-a:hover { background: var(--accent); color: white; }
.footer-links h4, .footer-contact h4 { color: white; font-size: .85rem; font-weight: 700; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,.55); font-size: .82rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact p { font-size: .82rem; color: rgba(255,255,255,.55); margin-bottom: 10px; display: flex; align-items: flex-start; gap: 8px; }
.footer-contact p i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.35); }
.footer-bottom a { color: rgba(255,255,255,.35); font-size: .78rem; }
.footer-bottom a:hover { color: var(--accent); }

/* ── Back to Top ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: var(--transition);
  z-index: 500;
  box-shadow: var(--shadow);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a8a 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.page-hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.ph-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.ph-shape:nth-child(1) { width: 400px; height: 400px; top: -120px; right: -100px; }
.ph-shape:nth-child(2) { width: 200px; height: 200px; bottom: -60px; right: 20%; background: rgba(255,109,0,.06); }
.ph-shape:nth-child(3) { width: 140px; height: 140px; top: 20px; left: 10%; background: rgba(255,255,255,.03); }
.page-hero-content { position: relative; z-index: 1; }
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: .72rem; font-weight: 700; letter-spacing: 1px;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: white;
  margin-bottom: 10px;
}
.page-hero p { color: rgba(255,255,255,.75); font-size: .95rem; max-width: 500px; line-height: 1.7; margin-bottom: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .78rem; }
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { color: rgba(255,255,255,.4); }
.bc-current { color: var(--accent); font-weight: 600; }

/* ── Content Card ──────────────────────────────────────────── */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.content-card h2 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.content-card h2 i { color: var(--accent); }

/* ── Info Grid ─────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.info-item {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-width: 0;          /* allow grid cell to shrink below content size */
}
.info-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 4px; }
.info-value {
  font-size: .9rem; font-weight: 600; color: var(--primary);
  word-break: break-word;   /* long affiliation numbers / addresses wrap */
  overflow-wrap: anywhere;
}

/* ── Table Scroll Wrapper ───────────────────────────────────── */
/* Always present — only scrolls when table is wider than container */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

/* ── Data Table ────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table thead tr { background: linear-gradient(90deg, var(--primary), #1e3a8a); }
.data-table th {
  padding: 14px 16px;
  text-align: left;
  color: white;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tbody tr:nth-child(even) { background: var(--off-white); }
.data-table tbody tr:hover { background: rgba(13,27,94,.04); }
.data-table tfoot td { padding: 12px 16px; color: var(--text-light); font-size: .8rem; background: var(--off-white); border-top: 2px solid var(--border); }
.total-col { font-weight: 700; color: var(--primary); }

/* ── Staff / Values / Facility Cards ──────────────────────── */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; }
.staff-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  transition: var(--transition);
}
.staff-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.staff-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  color: rgba(255,255,255,.7);
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.staff-card h3 { color: var(--primary); font-size: .95rem; margin-bottom: 5px; }
.staff-role { color: var(--text-light); font-size: .78rem; font-weight: 600; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; }
.value-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
}
.value-card:hover { transform: translateY(-5px) rotateX(3deg); box-shadow: var(--shadow-lg); }
.value-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 14px;
}
.value-card h3 { color: var(--primary); font-size: .95rem; margin-bottom: 6px; }
.value-card p { color: var(--text-light); font-size: .82rem; line-height: 1.6; }

.facility-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 20px; }
.facility-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.facility-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.facility-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(13,27,94,.07);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 12px;
  transition: var(--transition);
}
.facility-card:hover .facility-icon { background: var(--accent); color: white; }
.facility-card h4 { color: var(--primary); font-size: .88rem; margin-bottom: 4px; }
.facility-card p { color: var(--text-light); font-size: .75rem; }

/* ── Rules List ────────────────────────────────────────────── */
.rules-list { display: flex; flex-direction: column; gap: 12px; }
.rule-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.rule-num {
  min-width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: .78rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rule-item p { color: var(--text); font-size: .88rem; line-height: 1.6; margin: 0; }

/* ── Class Grid ────────────────────────────────────────────── */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 16px; }
.class-tile {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 12px 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  transform-style: preserve-3d;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.class-tile:hover {
  transform: translateY(-6px) rotateX(5deg);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.class-tile.has-resources { border-color: rgba(13,27,94,.25); }
.class-tile.has-resources:hover { border-color: var(--accent); }
.ct-num { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.ct-label { font-size: .65rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.ct-badge {
  margin-top: 6px;
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; background: var(--accent); color: #fff; white-space: nowrap;
}
.ct-badge.empty { background: var(--border); color: var(--text-light); }

/* ── Class Detail Page ─────────────────────────────────────────── */
.class-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-weight: 600; font-size: .9rem;
  text-decoration: none; margin-bottom: 24px;
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--off-white);
  transition: var(--transition);
}
.class-back-link:hover { background: var(--primary); color: #fff; }

.class-quick-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.cqn-item {
  padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 700;
  text-decoration: none; border: 2px solid var(--border); color: var(--text-light);
  transition: var(--transition);
}
.cqn-item:hover { border-color: var(--primary); color: var(--primary); }
.cqn-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.class-resource-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 28px;
  overflow: hidden; box-shadow: var(--shadow);
}
.crc-header {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 28px; border-bottom: 1px solid var(--border);
  background: var(--off-white);
}
.crc-header h2 { font-size: 1.15rem; color: var(--primary); margin: 0 0 4px; }
.crc-header p  { font-size: .85rem; color: var(--text-light); margin: 0; }
.crc-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.crc-icon.hw    { background: rgba(255,109,0,.1);   color: var(--accent); }
.crc-icon.docs  { background: rgba(13,27,94,.08);  color: var(--primary); }
.crc-icon.books { background: rgba(49,130,206,.1); color: #3182ce; }
.crc-body { padding: 22px 28px; }

.crc-file-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--off-white);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.crc-file-icon { font-size: 2rem; color: #e53e3e; flex-shrink: 0; }
.crc-file-info { flex: 1; }
.crc-file-name { display: block; font-weight: 700; color: var(--text); font-size: .95rem; }
.crc-file-meta { display: block; font-size: .75rem; color: var(--text-light); margin-top: 2px; }
.crc-view-btn  { flex-shrink: 0; font-size: .85rem; padding: 10px 20px; }
.crc-hw-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

/* Homework lock badge */
.hw-lock-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; padding: 3px 10px; border-radius: 20px;
  background: rgba(229,62,62,.1); color: #e53e3e;
  border: 1px solid rgba(229,62,62,.25); vertical-align: middle;
  margin-left: 10px;
}

/* ── Homework Password Modal ─────────────────────────────────── */
.hw-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 99998; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.hw-modal-box {
  background: #fff; border-radius: 16px; padding: 40px 36px;
  width: 100%; max-width: 420px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: hwModalIn .25s ease;
}
@keyframes hwModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.hw-modal-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(229,62,62,.1); color: #e53e3e;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 18px;
}
.hw-modal-box h3 {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  color: var(--primary); margin: 0 0 8px;
}
.hw-modal-box p {
  font-size: .88rem; color: var(--text-light); line-height: 1.7;
  margin: 0 0 22px;
}
.hw-modal-field {
  position: relative; margin-bottom: 12px;
}
.hw-pw-input {
  width: 100%; padding: 12px 44px 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: .95rem; outline: none;
  transition: border .2s;
  box-sizing: border-box;
}
.hw-pw-input:focus { border-color: var(--primary); }
.hw-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-light);
  font-size: .9rem; padding: 4px;
}
.hw-modal-error {
  font-size: .82rem; color: #e53e3e; background: rgba(229,62,62,.08);
  border: 1px solid rgba(229,62,62,.2); border-radius: 6px;
  padding: 8px 12px; margin-bottom: 16px; text-align: left;
}
.hw-modal-btns {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 8px;
}
@media (max-width: 480px) {
  .hw-modal-box { padding: 28px 20px; margin: 16px; }
  .crc-hw-actions { justify-content: flex-end; }
}

.crc-doc-list  { display: flex; flex-direction: column; gap: 10px; }
.crc-doc-item  {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--off-white);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.crc-doc-icon  { font-size: 1.2rem; color: var(--text-light); flex-shrink: 0; }
.crc-doc-name  { flex: 1; font-size: .88rem; font-weight: 600; color: var(--text); }
.crc-doc-soon  {
  font-size: .7rem; font-weight: 700; padding: 3px 9px;
  background: var(--border); color: var(--text-light);
  border-radius: 4px; text-transform: uppercase; letter-spacing: .5px;
}

.crc-empty {
  padding: 40px 28px; text-align: center; color: var(--text-light);
}
.crc-empty i   { font-size: 2.5rem; opacity: .25; display: block; margin-bottom: 12px; }
.crc-empty p   { font-size: .9rem; line-height: 1.7; margin: 0; }

/* ── Books & Syllabus table ─────────────────────────────────── */
.crc-books-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.crc-books-table thead tr {
  background: rgba(49,130,206,.08);
}
.crc-books-table thead th {
  padding: 11px 16px; text-align: left; font-size: .75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: #3182ce; border-bottom: 2px solid rgba(49,130,206,.2);
}
.crc-books-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.crc-books-table tbody tr:last-child { border-bottom: none; }
.crc-books-table tbody tr:hover { background: var(--off-white); }
.crc-books-table tbody td { padding: 12px 16px; vertical-align: middle; }
.crc-book-subject {
  font-weight: 700; color: var(--primary); white-space: nowrap;
}
.crc-book-title { color: var(--text); }
.crc-book-publisher {
  color: var(--text-light); font-size: .82rem;
}
@media (max-width: 600px) {
  .crc-books-table thead { display: none; }
  .crc-books-table tbody tr {
    display: block; padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .crc-books-table tbody td {
    display: block; padding: 2px 0;
  }
  .crc-book-subject { font-size: .9rem; }
  .crc-book-title   { font-size: .85rem; }
  .crc-book-publisher::before { content: '— '; }
}

/* ── 3D Events Carousel ─────────────────────────────────────── */
.ev-carousel-section {
  position: relative;
  padding: 90px 0 70px;
  background: linear-gradient(135deg, #06102e 0%, #0d1b5e 45%, #180a38 100%);
  overflow: hidden;
}

/* Ambient glow orbs */
.ev-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: .18;
}
.ev-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -200px; right: -150px;
  animation: evGlowPulse 8s ease-in-out infinite alternate;
}
.ev-glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #5b21b6 0%, transparent 70%);
  bottom: -180px; left: -120px;
  animation: evGlowPulse 11s ease-in-out infinite alternate-reverse;
}
@keyframes evGlowPulse {
  0%   { transform: scale(1) translate(0,0); opacity: .15; }
  100% { transform: scale(1.25) translate(30px,-20px); opacity: .25; }
}

/* Section header overrides for dark bg */
.ev-header { margin-bottom: 10px; }
.ev-tag { background: rgba(255,255,255,.1) !important; color: rgba(255,255,255,.9) !important; border: 1px solid rgba(255,255,255,.15); }

/* ── 3D Scene ── */
.ev-scene {
  position: relative;
  width: 100%;
  height: 380px;
  perspective: 1100px;
  perspective-origin: 50% 50%;
  margin: 36px 0 16px;
}
.ev-track {
  position: absolute;
  left: 50%; top: 50%;
  transform-style: preserve-3d;
  width: 0; height: 0;
}

/* ── Individual Slide ── */
.ev-slide {
  position: absolute;
  width: 340px;
  height: 260px;
  margin-left: -170px;
  margin-top: -130px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 24px 64px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .75s cubic-bezier(.4,0,.2,1),
              opacity   .75s cubic-bezier(.4,0,.2,1),
              box-shadow .4s ease;
  transform-origin: center center;
  will-change: transform, opacity;
}
.ev-slide img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s ease;
}
.ev-slide.active { box-shadow: 0 32px 80px rgba(0,0,0,.8), 0 0 40px rgba(255,109,0,.2), 0 0 0 2px rgba(255,109,0,.3); }
.ev-slide.active img { transform: scale(1.04); }
.ev-slide:not(.active):hover { cursor: pointer; }

/* Slide gradient label */
.ev-slide-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  display: flex; flex-direction: column; gap: 2px;
}
.ev-slide-cat {
  font-size: .62rem; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); display: block;
}
.ev-slide-title {
  font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.92); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Placeholder slide (no image) */
.ev-slide-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--grad-a, #0d1b5e), var(--grad-b, #1a3a8c));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: rgba(255,255,255,.3);
  font-size: .85rem; text-align: center; padding: 16px;
}
.ev-slide-placeholder i { font-size: 2.5rem; }

/* ── Arrows ── */
.ev-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 30;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.ev-arrow:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-50%) scale(1.1); }
.ev-prev { left: 0; }
.ev-next { right: 0; }

/* ── Controls bar ── */
.ev-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ev-counter {
  font-size: .75rem; font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: 1px;
  min-width: 40px;
}
.ev-dots { display: flex; gap: 7px; align-items: center; }
.ev-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: none; cursor: pointer; padding: 0;
  transition: all .35s ease;
}
.ev-dot.active { background: var(--accent); transform: scale(1.5); }
.ev-gallery-link {
  font-size: .8rem; font-weight: 700;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color .3s ease;
}
.ev-gallery-link:hover { color: var(--accent); }

/* ── Floating Bubble Orbs ── */
.ev-bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.ev-bubble {
  position: absolute;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: evBubbleDrift ease-in-out infinite;
  box-shadow: inset 0 0 20px rgba(255,255,255,.07), 0 4px 24px rgba(0,0,0,.4);
  filter: blur(1.5px) brightness(.7);
}
@keyframes evBubbleDrift {
  0%   { opacity: 0;    transform: scale(.7) translate(0px, 0px); }
  15%  { opacity: .13; }
  40%  { opacity: .18;  transform: scale(1.08) translate(var(--bx, 18px), var(--by, -14px)); }
  65%  { opacity: .12;  transform: scale(.95) translate(var(--bx2,-12px), var(--by2, 10px)); }
  85%  { opacity: .13; }
  100% { opacity: 0;    transform: scale(.75) translate(0px, 0px); }
}

/* ── Activity Cards ────────────────────────────────────────── */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; }
.activity-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  transition: var(--transition);
}
.activity-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.activity-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  transition: var(--transition);
}
.activity-card h3 { color: var(--primary); font-size: .92rem; margin-bottom: 6px; }
.activity-card p { color: var(--text-light); font-size: .82rem; line-height: 1.6; }

/* ── MPD Stats ─────────────────────────────────────────────── */
.mpd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 0; }
.mpd-stat {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  color: white;
  border-right: 1px solid rgba(255,255,255,.1);
}
.mpd-stat:last-child { border-right: none; }
.mpd-stat-val { font-size: 1.8rem; font-weight: 800; color: white; }
.mpd-stat-label { font-size: .72rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; font-weight: 600; }

/* ── Doc List ──────────────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;        /* button wraps below on narrow screens */
}
.doc-icon { color: #38a169; font-size: 1.1rem; flex-shrink: 0; }
.doc-name {
  flex: 1;
  min-width: 0;           /* lets flex child shrink below its content width */
  font-size: .88rem; color: var(--text); font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.doc-status.ok {
  background: rgba(56,161,105,.12);
  color: #38a169;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.doc-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
  cursor: pointer;
}
.doc-view-btn:hover { background: var(--accent); color: #fff; }
.doc-view-btn i { font-size: .8rem; }

/* ── Fee Highlight ─────────────────────────────────────────── */
.fee-highlight {
  background: linear-gradient(135deg, var(--accent), #e05500);
  color: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.fee-highlight h3 { font-size: 1.1rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.fee-highlight p { color: rgba(255,255,255,.8); font-size: .88rem; }
.fee-highlight-value { font-size: 2.4rem; font-weight: 800; white-space: nowrap; }

/* ── Contact Cards ─────────────────────────────────────────── */
.contact-quick-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  display: block; text-decoration: none; color: inherit;
  transition: var(--transition);
}
.contact-quick-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.cq-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: rgba(13,27,94,.07);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 12px;
  transition: var(--transition);
}
.contact-quick-card:hover .cq-icon { background: var(--accent); color: white; }
.cq-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 6px; }
.cq-value { font-size: .88rem; font-weight: 700; color: var(--primary); word-break: break-all; }

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ci-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(13,27,94,.07); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.contact-item h4 { color: var(--primary); font-size: .88rem; margin-bottom: 4px; }
.contact-item p { color: var(--text-light); font-size: .85rem; line-height: 1.5; }

.contact-form-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-form-wrap h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 24px; display: flex; align-items: center; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: .78rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem; color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,27,94,.08); }
.form-submit {
  width: 100%; padding: 14px;
  background: var(--primary);
  color: white; border: none;
  border-radius: 50px;
  font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.form-submit:hover { background: var(--accent); transform: translateY(-2px); }
.form-success, .form-error {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.form-success { background: rgba(56,161,105,.1); color: #38a169; border: 1px solid rgba(56,161,105,.25); }
.form-error { background: rgba(229,62,62,.1); color: #e53e3e; border: 1px solid rgba(229,62,62,.25); }

/* ── Map ───────────────────────────────────────────────────── */
.map-wrapper { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-placeholder {
  background: var(--off-white);
  height: 280px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--text-light);
}
.map-placeholder i { font-size: 2rem; color: var(--accent); }
.map-placeholder span { font-weight: 600; color: var(--primary); font-size: .88rem; }
.map-placeholder small { font-size: .75rem; }
.map-placeholder a { color: var(--accent); }

/* ── Social Links ──────────────────────────────────────────── */
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(13,27,94,.07);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: var(--transition);
}
.social-link:hover { background: var(--primary); color: white; transform: translateY(-3px); }

/* ── Motto Banner ──────────────────────────────────────────── */
.motto-banner {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  color: white;
  padding: 48px 0;
}
.motto-banner h2 { color: white; }

/* ── Gallery Page ──────────────────────────────────────────── */
.gallery-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  background: var(--off-white);
  border: 1.5px solid var(--border);
  color: var(--text-light);
  font-size: .78rem; font-weight: 700;
  padding: 7px 18px; border-radius: 50px;
  cursor: pointer; transition: var(--transition);
}
.filter-btn.active,
.filter-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.filter-btn .filter-count {
  display: inline-block;
  background: rgba(255,255,255,.25);
  color: inherit;
  font-size: .68rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}
.filter-btn:not(.active) .filter-count { background: var(--border); color: var(--text-light); }

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Filter transition on items */
.gallery-page-grid .gallery-item {
  transition: opacity .3s ease, transform .3s ease, var(--transition);
}
.gallery-page-grid .gallery-item.hidden {
  opacity: 0;
  transform: scale(.95);
  pointer-events: none;
  position: absolute;  /* remove from flow when hidden */
  visibility: hidden;
}

/* Zoom icon overlay */
.gallery-zoom-icon {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,27,94,.0);
  color: white; font-size: 1.6rem;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}
.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  background: rgba(13,27,94,.35);
}

/* ── YouTube Cards ─────────────────────────────────────────── */
.youtube-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; }
.yt-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none; color: inherit;
}
.yt-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.yt-thumb {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
}
.yt-play { font-size: 2.5rem; color: #ff0000; transition: var(--transition); }
.yt-card:hover .yt-play { transform: scale(1.2); }
.yt-info { padding: 14px 16px; }
.yt-info h4 { color: var(--primary); font-size: .85rem; line-height: 1.4; }

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: 900px; width: 100%; text-align: center; }
.lightbox-content img { max-height: 80vh; border-radius: var(--radius); margin: 0 auto; }
.lightbox-content p { color: rgba(255,255,255,.8); margin-top: 12px; font-size: .88rem; }
.lightbox-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; gap: 12px;
}
.lightbox-meta p { color: rgba(255,255,255,.8); font-size: .88rem; margin: 0; flex: 1; text-align: left; }
.lightbox-count {
  color: rgba(255,255,255,.45); font-size: .78rem; font-weight: 700;
  letter-spacing: .5px; flex-shrink: 0; white-space: nowrap;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.12);
  border: none; color: white;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--accent); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ── Download Buttons ──────────────────────────────────────── */
.download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 700;
  color: var(--primary);
  background: var(--card-bg);
  transition: var(--transition);
  text-decoration: none;
}
.download-btn:hover { border-color: var(--primary); background: var(--primary); color: white; transform: translateY(-2px); }
.download-btn.primary-dl { border-color: var(--accent); color: var(--accent); }
.download-btn.primary-dl:hover { background: var(--accent); color: white; }

/* ── Event Calendar ────────────────────────────────────────── */
.ev-cal-section { background: var(--off-white); }
.ev-cal-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
}
.ev-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  padding: 18px 24px;
}
.ev-cal-month-label {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.ev-cal-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.ev-cal-btn:hover { background: var(--accent); }
.ev-cal-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
}
.ev-cal-grid-wrap { padding: 20px 20px 24px; border-right: 1px solid var(--border); }
.ev-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.ev-cal-dow-row span {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 0;
}
.ev-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.ev-cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 2px 4px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  cursor: default;
  position: relative;
  transition: var(--transition);
}
.ev-cal-cell.faded { color: var(--border); }
.ev-cal-cell.today {
  background: rgba(255,109,0,.12);
  color: var(--accent);
  font-weight: 800;
}
.ev-cal-cell.has-event { cursor: pointer; }
.ev-cal-cell.has-event:hover { background: rgba(13,27,94,.07); }
.ev-cal-cell.selected { background: var(--primary); color: #fff !important; border-radius: 8px; }
.ev-cal-cell.selected .ev-cal-dots .ev-cal-dot { background: rgba(255,255,255,.7); }
.ev-cal-dots {
  display: flex;
  gap: 3px;
  margin-top: 3px;
  flex-wrap: wrap;
  justify-content: center;
}
.ev-cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* Events list panel */
.ev-cal-list-wrap {
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  max-height: 420px;
}
.ev-cal-list-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ev-cal-list { flex: 1; }
.ev-cal-event-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ev-cal-event-item:last-child { border-bottom: none; }
.ev-cal-event-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(13,27,94,.08);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}
.ev-cal-event-info { flex: 1; min-width: 0; }
.ev-cal-event-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-cal-event-meta {
  font-size: .72rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ev-cal-event-badge {
  display: inline-block;
  background: rgba(255,109,0,.12);
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
}
.ev-cal-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-light);
}
.ev-cal-empty i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
  opacity: .4;
}
.ev-cal-empty p { font-size: .85rem; }
/* Responsive calendar */
@media (max-width: 768px) {
  .ev-cal-body { grid-template-columns: 1fr; }
  .ev-cal-list-wrap { border-top: 1px solid var(--border); max-height: 300px; }
  .ev-cal-grid-wrap { border-right: none; }
}

/* ── Scroll Reveal ─────────────────────────────────────────── */
[data-reveal] { opacity: 0; transition: opacity .6s ease, transform .6s ease; }
[data-reveal='up']    { transform: translateY(30px); }
[data-reveal='left']  { transform: translateX(-30px); }
[data-reveal='right'] { transform: translateX(30px); }
[data-reveal].revealed { opacity: 1; transform: translate(0,0); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-First Overrides
   Breakpoints: 1100 · 900 · 768 · 600 · 480 · 360
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet Landscape ≤1100px ──────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 32px; }
  .principal-grid { grid-template-columns: 220px 1fr; gap: 40px; }
  .about-grid     { gap: 40px; }
  .ev-scene       { height: 320px; }
  .ev-slide       { width: 300px; height: 230px; margin-left: -150px; margin-top: -115px; }
}

/* ── Tablet Portrait ≤900px ────────────────────────────────── */
@media (max-width: 900px) {
  .principal-grid { grid-template-columns: 1fr; gap: 28px; }
  .principal-photo-wrap {
    flex-direction: row; align-items: center; gap: 24px;
  }
  .principal-photo,
  .principal-photo-placeholder {
    width: 130px; height: 130px; flex-shrink: 0; aspect-ratio: auto;
  }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-emblem-wrap { flex-direction: row; justify-content: flex-start; gap: 24px; }
  .contact-main-grid  { grid-template-columns: 1fr !important; gap: 28px !important; }
  .programs-grid { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
  .ev-slide { width: 260px; height: 200px; margin-left: -130px; margin-top: -100px; }
}

/* ── Mobile ≤768px ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* --- Announcement bar --- */
  .ticker-label { padding: 0 10px; font-size: .7rem; }

  /* --- Navbar --- */
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: white;
    border-bottom: 2px solid var(--border);
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  .nav-links.open   { display: flex; }
  .nav-link         { width: 100%; padding: 10px 14px; font-size: .85rem; }
  .nav-login-btn    { margin-left: 0 !important; margin-top: 6px; justify-content: center; border-radius: 8px; }
  .nav-user-wrap    { margin-left: 0; width: 100%; border-radius: 10px; padding: 8px 12px; margin-top: 6px; }

  /* Hide long school name text on small navbars */
  .school-affil { display: none; }
  .school-name  { font-size: .76rem; max-width: 140px; }

  /* --- Page sections --- */
  .page-section         { padding: 52px 0; }
  .page-section.alt-bg  { padding: 52px 0; }
  .section-header       { margin-bottom: 32px; }
  .section-desc         { font-size: .88rem; }

  /* --- Hero --- */
  .hero-content  { padding: 56px 20px 44px; max-width: 100%; }
  .hero-subtitle { font-size: .95rem; margin-bottom: 28px; max-width: 100%; }
  .hero-actions  { gap: 12px; }
  .hero-actions .btn { padding: 11px 22px; font-size: .84rem; }
  .hero-scroll-hint { display: none; }

  /* --- Page hero banner --- */
  .page-hero { padding: 44px 0; }
  .page-hero h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .page-hero p  { font-size: .88rem; }

  /* --- Stats strip --- */
  .stats-section { padding: 36px 0; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .stat-card     { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding: 24px 16px; }
  .stat-number   { font-size: 2rem; }

  /* --- Grids --- */
  .about-grid      { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; gap: 24px; }
  .cf-grid         { grid-template-columns: 1fr; }
  .programs-grid   { grid-template-columns: 1fr; }
  .events-grid     { grid-template-columns: 1fr; }
  .staff-grid      { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); }
  .values-grid     { grid-template-columns: repeat(2, 1fr); }
  .facility-grid   { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .gallery-grid    { grid-template-columns: repeat(2, 1fr); }

  /* --- Contact page --- */
  .contact-main-grid  { grid-template-columns: 1fr !important; gap: 24px !important; }
  .contact-form-wrap  { padding: 24px 20px; }

  /* --- MPD stats --- */
  .mpd-stats { grid-template-columns: repeat(2, 1fr); }
  .mpd-stat  { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding: 24px; }

  /* --- Content card padding on mobile --- */
  .content-card { padding: 20px 16px; }

  /* --- Table scroll wrappers on mobile --- */
  /* .table-scroll already has overflow-x:auto at all sizes;
     ensure the data-table inside stays wide enough to warrant scrolling */
  .table-scroll .data-table { min-width: 480px; }

  /* --- Class grid (Academics overview) --- */
  .class-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .class-tile { padding: 18px 8px 12px; }
  .ct-num     { font-size: 1.2rem; }

  /* --- Class resource card --- */
  .crc-header  { padding: 16px 18px; gap: 12px; flex-wrap: wrap; }
  .crc-icon    { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 10px; }
  .crc-header h2 { font-size: 1rem; }
  .crc-body    { padding: 16px 18px; }
  .crc-file-row { flex-wrap: wrap; gap: 12px; }
  .crc-hw-actions { width: 100%; display: flex; justify-content: flex-start; gap: 8px; }
  .crc-view-btn { padding: 9px 16px; font-size: .82rem; }
  .crc-doc-item { flex-wrap: wrap; }

  /* --- Footer --- */
  .footer-top { padding: 44px 0; }
  .footer-bottom .container { flex-direction: column; text-align: center; gap: 6px; }

  /* --- CTA --- */
  .cta-actions { flex-direction: column; align-items: center; gap: 12px; }
  .cta-actions .btn { width: 100%; max-width: 300px; justify-content: center; }
  .admissions-cta { padding: 56px 0; }

  /* --- Download links (MPD page etc) --- */
  .download-btn { width: 100%; justify-content: center; text-align: center; }

  /* --- 3D Carousel: flatten to simple view on mobile --- */
  .ev-carousel-section { padding: 56px 0 44px; }
  .ev-scene {
    height: 240px;
    perspective: none;
  }
  .ev-slide {
    width: 260px; height: 200px;
    margin-left: -130px; margin-top: -100px;
  }
  .ev-arrow { width: 38px; height: 38px; }
  .ev-prev  { left: 4px; }
  .ev-next  { right: 4px; }
}

/* ── Small Mobile ≤600px ───────────────────────────────────── */
@media (max-width: 600px) {
  /* Quick-nav chips on class detail page */
  .class-quick-nav { gap: 5px; margin-bottom: 18px; }
  .cqn-item { font-size: .7rem; padding: 4px 10px; }

  /* Class grid */
  .class-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .class-tile { padding: 14px 4px 10px; }
  .ct-num     { font-size: 1rem; }
  .ct-label   { font-size: .55rem; }
  .ct-badge   { font-size: .56rem; padding: 1px 5px; }

  /* Gallery 2-col */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Programs 1-col */
  .programs-grid { grid-template-columns: 1fr; }

  /* Values / facility 2-col */
  .values-grid   { grid-template-columns: repeat(2, 1fr); }
  .facility-grid { grid-template-columns: repeat(2, 1fr); }

  /* Homework file row: stack */
  .crc-file-row { flex-direction: column; align-items: flex-start; }
  .crc-hw-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .crc-hw-actions .btn { justify-content: center; }

  /* MPD / doc list — button sits below the name on narrow screens */
  .doc-view-btn { margin-left: auto; }

  /* Info grid: single column below 480px */
  .info-grid { grid-template-columns: 1fr; }
}

/* ── Phone ≤480px ──────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Container */
  .container { padding: 0 14px; }

  /* Page sections */
  .page-section       { padding: 40px 0; }
  .stats-section      { padding: 28px 0; }
  .admissions-cta     { padding: 44px 0; }

  /* School name: fully hide on tiny phones */
  .school-name  { display: none; }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; width: 100%; }
  .hero-content { padding: 44px 16px 36px; }

  /* Page hero */
  .page-hero { padding: 32px 0; }

  /* Stats: 2 cols on phone */
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 1.8rem; }
  .stat-label  { font-size: .72rem; }

  /* Values / facility: 2-col */
  .values-grid   { grid-template-columns: repeat(2, 1fr); }
  .facility-grid { grid-template-columns: repeat(2, 1fr); }

  /* Class grid: 5-wide stays but shrink tiles */
  .class-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .class-tile { padding: 12px 2px 8px; border-radius: 8px; }
  .ct-num     { font-size: .9rem; }

  /* Content card */
  .content-card { padding: 18px 14px; }

  /* Contact form */
  .contact-form-wrap { padding: 20px 14px; }

  /* Download buttons */
  div[style*="display:flex"][style*="gap:16px"] { flex-direction: column !important; gap: 10px !important; }
  .download-btn { width: 100%; text-align: center; justify-content: center; }

  /* Footer */
  .footer-top  { padding: 36px 0; }
  .footer-grid { gap: 20px; }
  .footer-bottom .container { flex-direction: column; text-align: center; gap: 4px; }

  /* Modal padding */
  .hw-modal-box { padding: 28px 18px; margin: 12px; }

  /* Carousel */
  .ev-carousel-section { padding: 40px 0 32px; }
  .ev-scene    { height: 200px; }
  .ev-slide    { width: 220px; height: 170px; margin-left: -110px; margin-top: -85px; }
  .ev-controls { gap: 12px; }

  /* Section header */
  .section-header { margin-bottom: 24px; }
  .section-title  { font-size: clamp(1.4rem, 5vw, 1.8rem); }
}

/* ── Very Small ≤360px ─────────────────────────────────────── */
@media (max-width: 360px) {
  .container   { padding: 0 12px; }

  /* Class grid: 4-col on very tiny */
  .class-grid  { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .ct-num      { font-size: .8rem; }

  /* Stats: single column */
  .stats-grid  { grid-template-columns: 1fr; }
  .stat-card   { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .stat-number { font-size: 1.6rem; }

  /* MPD stats */
  .mpd-stats { grid-template-columns: 1fr; }
  .mpd-stat  { border-bottom: 1px solid rgba(255,255,255,.1); }

  /* Values / facility: 1-col */
  .values-grid   { grid-template-columns: 1fr; }
  .facility-grid { grid-template-columns: repeat(2, 1fr); }

  /* Carousel */
  .ev-slide { width: 200px; height: 155px; margin-left: -100px; margin-top: -78px; }
}
