/* ═══════════════════════════════════════════
   DESTINYFIELD INTERNATIONAL SCHOOLS
   Main Stylesheet
   ═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --navy:       #0A1628;
  --navy-mid:   #112240;
  --navy-light: #1C3461;
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --gold-pale:  rgba(201,168,76,0.15);
  --ivory:      #F8F4ED;
  --ivory-dark: #EDE8DF;
  --teal:       #1B6B6B;
  --teal-light: #238F8F;
  --white:      #FFFFFF;
  --text-dark:  #0A1628;
  --text-mid:   #3A4A6B;
  --text-light: #7A8BAA;
  --glass:      rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.12);
  --glass-bg:   rgba(10,22,40,0.6);

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --sz-xs:   clamp(0.7rem,  1.2vw, 0.8rem);
  --sz-sm:   clamp(0.85rem, 1.5vw, 0.95rem);
  --sz-base: clamp(0.95rem, 1.8vw, 1.05rem);
  --sz-md:   clamp(1.1rem,  2vw,   1.25rem);
  --sz-lg:   clamp(1.3rem,  2.5vw, 1.6rem);
  --sz-xl:   clamp(1.8rem,  3.5vw, 2.5rem);
  --sz-2xl:  clamp(2.2rem,  5vw,   3.5rem);
  --sz-3xl:  clamp(2.8rem,  6vw,   5rem);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-sm:  0 2px 12px rgba(10,22,40,0.15);
  --shadow-md:  0 8px 32px rgba(10,22,40,0.25);
  --shadow-lg:  0 20px 60px rgba(10,22,40,0.4);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.35);

  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.6s cubic-bezier(0.4,0,0.2,1);

  --nav-h: 76px;
  --section-pad: clamp(3rem, 7vw, 6rem);
  --container-w: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--ff-body);
  font-size: var(--sz-base);
  color: var(--text-dark);
  background: var(--ivory);
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ivory-dark); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

/* ══════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  height: var(--nav-h);
  background: transparent;
  backdrop-filter: blur(0px);
  transition: var(--transition);
}

#site-header.scrolled .navbar {
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--glass-border);
  height: 64px;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}

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

.logo-fallback {
  display: none;
  color: var(--gold);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--white);
}

.brand-sub {
  font-size: var(--sz-xs);
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.8rem);
}

.nav-link {
  font-size: var(--sz-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 0.35rem 0;
  position: relative;
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.nav-logo {
  max-height: 50px; /* Adjust this if your logo is too big/small */
  width: auto;
}

/* The New Tagline Styling */
.nav-tagline {
  color: red;
  font-style: italic;
  font-size: 0.75rem; /* Keeps it small and neat */
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap; /* Prevents the text from breaking into two lines */
}   

.nav-link:hover,
.nav-link.active { color: var(--gold); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  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); }

/* ══════════════════════════════════════════════════
   PAGE SYSTEM
══════════════════════════════════════════════════ */
.page {
  display: none;
  min-height: 100vh;
  padding-top: var(--nav-h);
  animation: pageFadeIn 0.5s ease forwards;
}

.page.active { display: block; }

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Override for Home — no extra padding since hero is full-screen */
#home.page { padding-top: 0; }

/* ══════════════════════════════════════════════════
   CONTAINERS & UTILITIES
══════════════════════════════════════════════════ */
.section-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--section-pad) clamp(1rem, 4vw, 2.5rem);
}

.eyebrow {
  font-size: var(--sz-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: block;
}
.eyebrow.light { color: var(--gold-light); }

.section-title {
  font-family: var(--ff-display);
  font-size: var(--sz-xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.section-title em {
  font-style: italic;
  color: var(--gold);
}

.section-title.center,
.eyebrow.center { text-align: center; }

.body-text {
  font-size: var(--sz-base);
  color: var(--text-mid);
  margin-bottom: 1rem;
  max-width: 65ch;
}

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-size: var(--sz-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: var(--sz-xs);
}

.btn.full-width { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════
   HOME — HERO
══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: var(--nav-h) clamp(1.5rem, 6vw, 5rem) 4rem;
  overflow: hidden;
  gap: 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    var(--navy-mid) 40%,
    var(--navy-light) 70%,
    #1B4A4A 100%
  );
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--gold); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 350px; height: 350px; background: var(--teal); bottom: -50px; right: 20%; animation-delay: 3s; }
.orb-3 { width: 250px; height: 250px; background: var(--gold-light); top: 40%; left: 30%; animation-delay: 6s; }

@keyframes float {
  0%, 100% { transform: translate(0,0); }
  33%       { transform: translate(20px,-30px); }
  66%       { transform: translate(-15px,20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  color: var(--gold);
  font-size: var(--sz-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--ff-display);
  font-size: var(--sz-3xl);
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.3rem;
}

.hero-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  font-size: 0.7em;
}

.hero-title strong {
  display: block;
  color: var(--gold);
}

.hero-tagline {
  font-size: var(--sz-md);
  color: rgba(255,255,255,0.75);
  max-width: 50ch;
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── HERO PHOTO COLLAGE ── */
.hero-photos {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(360px, 48vw, 560px);
}

.hero-photo-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Card base */
.hp-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s ease;
  will-change: transform;
}

.hp-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 6s ease;
}
.hp-card:hover img { transform: scale(1.05); }
.hp-card:hover { box-shadow: 0 28px 70px rgba(0,0,0,0.7), 0 0 0 2px var(--gold); }

.hp-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(to top, rgba(10,22,40,0.9), transparent);
  color: var(--white);
  font-size: var(--sz-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.hp-card:hover .hp-card-label { transform: translateY(0); }

/* Card 1 — large, back-left */
.hp-card-1 {
  width: 62%; height: 72%;
  top: 8%; left: 0;
  transform: rotate(-4deg);
  z-index: 1;
  border: 3px solid rgba(255,255,255,0.06);
  animation: hpFloat1 7s ease-in-out infinite;
}

/* Card 2 — medium, centre-right */
.hp-card-2 {
  width: 55%; height: 62%;
  top: 16%; right: 2%;
  transform: rotate(3.5deg);
  z-index: 2;
  border: 3px solid rgba(255,255,255,0.08);
  animation: hpFloat2 8s ease-in-out infinite;
}

/* Card 3 — small, front-bottom */
.hp-card-3 {
  width: 42%; height: 46%;
  bottom: 2%; left: 18%;
  transform: rotate(-1.5deg);
  z-index: 3;
  border: 3px solid rgba(201,168,76,0.4);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.6),
    0 0 0 2px rgba(201,168,76,0.2),
    0 0 40px rgba(201,168,76,0.15);
  animation: hpFloat3 6s ease-in-out infinite;
}

@keyframes hpFloat1 {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%       { transform: rotate(-4deg) translateY(-10px); }
}
@keyframes hpFloat2 {
  0%, 100% { transform: rotate(3.5deg) translateY(0); }
  50%       { transform: rotate(3.5deg) translateY(-14px); }
}
@keyframes hpFloat3 {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50%       { transform: rotate(-1.5deg) translateY(-8px); }
}

/* Floating badge */
.hp-badge {
  position: absolute;
  top: 0; right: 6%;
  z-index: 5;
  background: var(--gold);
  color: var(--navy);
  padding: 0.55rem 1rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--sz-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(201,168,76,0.5);
  animation: hpBadge 5s ease-in-out infinite;
  white-space: nowrap;
}
.hp-badge i { font-size: 0.9rem; }

@keyframes hpBadge {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-6px) rotate(-2deg); }
}

/* Floating stat pill */
.hp-stat {
  position: absolute;
  bottom: 10%; right: 0;
  z-index: 5;
  background: rgba(10,22,40,0.75);
  border: 1px solid rgba(201,168,76,0.4);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  animation: hpStat 7s ease-in-out infinite;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.hp-stat-num {
  font-family: var(--ff-display);
  font-size: var(--sz-xl);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.hp-stat-text {
  font-size: var(--sz-xs);
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@keyframes hpStat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.5);
  font-size: var(--sz-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── STATS RIBBON ── */
.stats-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Allows safe wrapping on smaller screens */
  background: var(--navy);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
  gap: 1rem;
}

.stat-item {
  flex: 1;
  min-width: 140px; /* Prevents text from squishing too much */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-num {
  font-family: var(--ff-display);
  font-size: var(--sz-2xl);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--ff-display);
  font-size: var(--sz-xl);
  color: var(--gold);
  font-weight: 700;
}

.stat-label {
  font-size: var(--sz-xs);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.stat-divider {
  width: 1px;
  height: 60px; /* Explicit height so it stretches properly */
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ── WELCOME ── */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.welcome-images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 240px 180px;
  gap: 12px;
}

.img-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--navy-light);
}

.img-card.main-img {
  grid-column: 1 / -1;
  grid-row: 1;
  border-radius: var(--radius-lg);
}

.img-card.accent-img-1,
.img-card.accent-img-2 {
  grid-row: 2;
}

.img-card img {
  transition: transform var(--transition-slow);
}
.img-card:hover img { transform: scale(1.04); }

/* placeholder when image fails */
.img-card.img-placeholder,
.director-photo-frame.img-placeholder,
.news-img.img-placeholder,
.strip-img.img-placeholder {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-card.img-placeholder::after,
.news-img.img-placeholder::after,
.strip-img.img-placeholder::after {
  content: '\f03e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.2);
}

/* ── CORE VALUES (Home) ── */
.values-section {
  background: var(--navy);
  padding: var(--section-pad) clamp(1rem, 4vw, 2.5rem);
}

.values-section .eyebrow,
.values-section .section-title { color: var(--white); }
.values-section .section-title em { color: var(--gold); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: var(--container-w);
  margin-left: auto;
  margin-right: auto;
}

.value-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(16px);
  transition: all var(--transition);
  animation: fadeSlideUp 0.6s ease both;
  animation-delay: var(--delay, 0s);
}

.value-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(201,168,76,0.4);
}

.value-icon {
  width: 56px; height: 56px;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.3rem;
  color: var(--gold);
  transition: all var(--transition);
}

.value-card:hover .value-icon {
  background: var(--gold);
  color: var(--navy);
}

.value-card h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  color: var(--white);
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ── TRIPLE F ── */
.triple-f-section {
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 60%);
  padding: var(--section-pad) clamp(1rem, 4vw, 2.5rem);
  text-align: center;
}

.triple-f-glass {
  max-width: 750px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 4rem);
  backdrop-filter: blur(20px);
}

.tf-badge {
  display: inline-block;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: var(--sz-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.tf-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.tf-letter {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.tf-word {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tf-dot { font-size: 2rem; color: rgba(255,255,255,0.3); }

.tf-desc {
  color: rgba(255,255,255,0.7);
  font-size: var(--sz-base);
  max-width: 45ch;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ── QUICK LINKS ── */
.quick-links-section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.quick-card {
  background: var(--white);
  border: 1px solid var(--ivory-dark);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-dark);
}

.quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.quick-card:hover::before { opacity: 1; }

.quick-card > * { position: relative; z-index: 1; }

.quick-card i:first-child {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
  transition: transform var(--transition);
}
.quick-card:hover i:first-child { transform: scale(1.15); }

.quick-card h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  transition: color var(--transition);
}
.quick-card:hover h3 { color: var(--white); }

.quick-card p {
  font-size: var(--sz-sm);
  color: var(--text-light);
  transition: color var(--transition);
}
.quick-card:hover p { color: rgba(255,255,255,0.7); }

.quick-card .arrow {
  margin-top: auto;
  color: var(--gold);
  font-size: var(--sz-sm);
}

/* ══════════════════════════════════════════════════
   PAGE HEROES (inner pages)
══════════════════════════════════════════════════ */
.page-hero.small-hero {
  position: relative;
  min-height: clamp(240px, 35vw, 380px);
  display: flex;
  align-items: flex-end;
  padding: 3rem clamp(1rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--teal) 100%);
  overflow: hidden;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C9A84C' fill-opacity='0.05'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-w);
  width: 100%;
  margin: 0 auto;
}

.page-hero-content h1 {
  font-family: var(--ff-display);
  font-size: var(--sz-2xl);
  color: var(--white);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.6);
  font-size: var(--sz-sm);
}
.breadcrumb a { color: var(--gold); transition: opacity var(--transition); }
.breadcrumb a:hover { opacity: 0.8; }
.breadcrumb i { font-size: 0.65rem; }

/* ══════════════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════════════ */
.vm-section { padding-bottom: 0; }

.vm-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: stretch;
}

.vm-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 100px;
}

.vm-card.vision {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  text-align: center;
  align-items: center;
}

.vm-card.mission {
  background: var(--navy);
  color: var(--white);
}

.vm-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.vm-card.vision .vm-icon { color: var(--navy); }
.vm-card.mission .vm-icon { color: var(--gold); }

.vm-card h2 {
  font-family: var(--ff-display);
  font-size: var(--sz-lg);
}

.vm-card.vision h2 { color: var(--navy); }
.vm-card.mission h2 { color: var(--gold); }

.vm-card.vision p {
  font-size: var(--sz-md);
  font-style: italic;
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--navy);
}

.vm-card.mission ul {
  list-style: disc;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.vm-card.mission ul li {
  color: rgba(255,255,255,0.85);
  font-size: var(--sz-sm);
  line-height: 1.7;
}

/* DIRECTOR */
.director-section {
  background: var(--ivory-dark);
  padding: var(--section-pad) clamp(1rem, 4vw, 2.5rem);
}

.director-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 2.5rem;
}

.director-photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-lg);
  background: var(--navy-light);
  border: 4px solid var(--gold);
}

.director-title-card {
  background: var(--navy);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 1.2rem 1.5rem;
  text-align: center;
}

.dir-title {
  font-size: var(--sz-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.director-title-card h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  color: var(--white);
  margin: 0.3rem 0;
}

.dir-sub {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.6);
}

.director-bio { display: flex; flex-direction: column; gap: 1rem; }

.director-bio p {
  color: var(--text-mid);
  font-size: var(--sz-base);
  line-height: 1.8;
}

.director-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.director-tags span {
  background: var(--navy);
  color: var(--gold);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: var(--sz-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Photo strip */
.about-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: clamp(160px, 20vw, 260px);
}

.strip-img { overflow: hidden; position: relative; }
.strip-img img { transition: transform var(--transition-slow); }
.strip-img:hover img { transform: scale(1.06); }

/* Values detail */
.values-detail-section { background: var(--white); }

.values-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2.5rem;
  border: 1px solid var(--ivory-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.vd-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--ivory-dark);
  transition: background var(--transition);
}
.vd-item:last-child { border-bottom: none; }
.vd-item:hover { background: var(--ivory); }

.vd-num {
  background: var(--navy);
  color: var(--gold);
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: var(--sz-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.vd-content {
  padding: 1.5rem 2rem;
}

.vd-content h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  color: var(--navy);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.vd-content h3 i { color: var(--gold); }

.vd-content p {
  color: var(--text-mid);
  font-size: var(--sz-sm);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════
   ADMISSIONS PAGE
══════════════════════════════════════════════════ */
.admission-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

.admission-contact-box {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.admission-contact-box h3 {
  font-family: var(--ff-display);
  color: var(--gold);
  font-size: var(--sz-md);
  margin-bottom: 0.3rem;
}

.admission-contact-box p { color: rgba(255,255,255,0.7); font-size: var(--sz-sm); }

.contact-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-size: var(--sz-sm);
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0;
  transition: color var(--transition);
}
.contact-line:hover { color: var(--gold); }
.contact-line i { color: var(--gold); }

/* Steps */
.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--ivory-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  transform: translateX(4px);
}

.step-num {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: var(--sz-lg);
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.step-content h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.step-content p {
  color: var(--text-mid);
  font-size: var(--sz-sm);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.step-connector {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
  color: var(--gold);
  font-size: 1.1rem;
}

/* Documents section */
.docs-section {
  background: var(--navy);
  padding: var(--section-pad) clamp(1rem, 4vw, 2.5rem);
}

.docs-section .eyebrow,
.docs-section .section-title { color: var(--white); }
.docs-section .section-title em { color: var(--gold); }

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.doc-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  backdrop-filter: blur(16px);
  transition: all var(--transition);
}

.doc-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
  border-color: rgba(201,168,76,0.4);
}

.doc-icon {
  width: 60px; height: 60px;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--gold);
}

.doc-info h3 {
  font-family: var(--ff-display);
  color: var(--white);
  font-size: var(--sz-md);
  margin-bottom: 0.4rem;
}

.doc-info p {
  color: rgba(255,255,255,0.65);
  font-size: var(--sz-sm);
  line-height: 1.6;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.4);
  font-size: var(--sz-xs);
  margin-top: 0.4rem;
}

/* What to expect */
.expect-section { background: var(--ivory-dark); }

.expect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.expect-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  text-align: center;
  border: 1px solid var(--ivory-dark);
  transition: all var(--transition);
}

.expect-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--gold);
}

.expect-item i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  display: block;
}

.expect-item h4 {
  font-family: var(--ff-display);
  color: var(--navy);
  font-size: var(--sz-base);
  margin-bottom: 0.4rem;
}

.expect-item p {
  color: var(--text-light);
  font-size: var(--sz-sm);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   NEWS PAGE
══════════════════════════════════════════════════ */
.news-filter {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--ivory-dark);
  background: var(--white);
  color: var(--text-mid);
  font-size: var(--sz-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--ff-body);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ivory-dark);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--gold);
}

.news-card.featured { grid-column: 1 / -1; flex-direction: row; }

.news-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--navy-light);
  flex-shrink: 0;
}

.news-card.featured .news-img {
  aspect-ratio: unset;
  width: 45%;
  min-height: 280px;
}

.news-img img { transition: transform var(--transition-slow); }
.news-card:hover .news-img img { transform: scale(1.04); }

.news-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-size: var(--sz-xs);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.news-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.news-date {
  font-size: var(--sz-xs);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-title {
  font-family: var(--ff-display);
  font-size: var(--sz-md);
  color: var(--navy);
  line-height: 1.3;
}

.news-card.featured .news-title { font-size: var(--sz-lg); }

.news-excerpt {
  color: var(--text-mid);
  font-size: var(--sz-sm);
  line-height: 1.7;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  font-size: var(--sz-sm);
  font-weight: 600;
  margin-top: 0.5rem;
  transition: gap var(--transition);
  text-decoration: none;
}
.read-more:hover { gap: 0.8rem; }

/* News sections grid (admission post) */
.news-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 1rem 0;
}

.ns-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--ivory);
  border: 1px solid var(--ivory-dark);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}

.ns-item i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.ns-item div { display: flex; flex-direction: column; }
.ns-item strong { font-size: var(--sz-sm); color: var(--navy); font-weight: 600; }
.ns-item span   { font-size: var(--sz-xs); color: var(--text-light); }

/* News contact strip */
.news-contact-strip {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

.news-contact-strip span {
  font-size: var(--sz-xs);
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-contact-strip i { color: var(--gold); flex-shrink: 0; }

/* News list (scholarship) */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.news-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--sz-sm);
  color: var(--text-mid);
}

.news-list i { color: var(--teal); font-size: 0.95rem; flex-shrink: 0; }

/* News CTA strip */
.news-cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: var(--ivory-dark);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  border-left: 4px solid var(--gold);
}

.cta-label {
  font-size: var(--sz-sm);
  font-weight: 600;
  color: var(--navy);
  font-family: var(--ff-display);
  font-style: italic;
}

/* Tag variants */
.news-tag.gold-tag { background: var(--gold); color: var(--navy); }
.news-tag.teal-tag { background: var(--teal); color: var(--white); }

/* Summer highlights */
.summer-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.summer-highlights span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ivory);
  border: 1px solid var(--ivory-dark);
  border-radius: 50px;
  padding: 0.3rem 0.75rem;
  font-size: var(--sz-xs);
  color: var(--text-dark);
  font-weight: 500;
  transition: all var(--transition);
}

.summer-highlights span i { color: var(--teal); font-size: 0.75rem; }
.summer-highlights span:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.summer-highlights span:hover i { color: var(--white); }

/* Summer details */
.summer-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 0.8rem 0;
}

.sd-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
}

.sd-item > i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.sd-item div { display: flex; flex-direction: column; }
.sd-item strong { font-size: var(--sz-xs); color: var(--gold); font-weight: 600; }
.sd-item span   { font-size: var(--sz-xs); color: rgba(255,255,255,0.8); margin-top: 0.1rem; }

/* Responsive tweaks for news cards */
@media (max-width: 640px) {
  .news-sections-grid { grid-template-columns: 1fr; }
  .summer-details { grid-template-columns: 1fr; }
  .news-cta-strip { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════
   GALLERY PAGE — INTERACTIVE GRID
══════════════════════════════════════════════════ */

.gallery-page-body {
  background: var(--navy);
  min-height: 60vh;
  padding-bottom: 5rem;
}

/* ── Category Tabs ── */
.gal-tabs-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.gal-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: var(--container-w);
  margin: 0 auto;
}
.gal-tabs::-webkit-scrollbar { display: none; }

.gal-tab {
  flex-shrink: 0;
  padding: 1.1rem 1.3rem;
  font-size: var(--sz-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff-body);
  position: relative;
  transition: color 0.25s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gal-tab::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2.5px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.gal-tab:hover { color: rgba(255,255,255,0.85); }
.gal-tab.active { color: var(--gold); }
.gal-tab.active::after { transform: scaleX(1); }

/* ── Count / view toggle bar ── */
.gal-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  max-width: var(--container-w);
  margin: 0 auto;
}

#gal-count-label {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.5);
}
#gal-count-label strong { color: var(--gold); }

.gal-view-toggle {
  display: flex;
  gap: 0.4rem;
}

.gv-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gv-btn.active,
.gv-btn:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ── Gallery Grid ── */
/* ── Gallery Grid ── */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 10px;
  padding: 0 clamp(1rem, 3vw, 2rem);
  max-width: var(--container-w);
  margin: 0 auto;
  grid-auto-flow: dense; /* CRITICAL: Forces the grid to tightly pack and fill all empty holes! */
}

/* Masonry mode */
.gal-grid.masonry-mode {
  display: block;
  columns: 4;
  column-gap: 10px;
}
.gal-grid.masonry-mode .gal-item {
  break-inside: avoid;
  margin-bottom: 10px;
  display: block;
  height: auto;
  grid-column: unset;
  grid-row: unset;
}
.gal-grid.masonry-mode .gal-item img { height: auto; }

/* Wide items span 2 cols */
.gal-item.gal-wide { grid-column: span 2; }
/* Tall items span 2 rows */
.gal-item.gal-tall { grid-row: span 2; }

/* ── Gallery Item ── */
.gal-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--navy-mid);
  /* entry animation */
  animation: galItemIn 0.45s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes galItemIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gal-item.gal-exiting {
  animation: galItemOut 0.28s ease forwards;
  pointer-events: none;
}

@keyframes galItemOut {
  to { opacity: 0; transform: scale(0.92); }
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.gal-item:hover img { transform: scale(1.07); }

/* ── Overlay ── */
.gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,0) 40%,
    rgba(10,22,40,0.82) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gal-item:hover .gal-overlay { opacity: 1; }

.gal-overlay p {
  width: 100%;
  text-align: left;
  font-size: var(--sz-xs);
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--ff-display);
  font-style: italic;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.gal-expand {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.gal-expand:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  transform: scale(1.12);
}

/* ── Empty state ── */
.gal-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: rgba(255,255,255,0.3);
}
.gal-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.gal-empty p { font-size: var(--sz-md); }

/* ── Hidden items ── */
.gal-item[style*="display: none"] { display: none !important; }

/* ══════════════════════════════════════════════════
   LIGHTBOX (Bulletproof Mobile & Desktop)
══════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999; /* Now that it's out of the section, this will actually work! */
  display: none;
  background: rgba(4, 8, 18, 0.98);
  backdrop-filter: blur(15px);
}

.lightbox.open { display: block; /* Removed flexbox from the outer container to stop iOS squishing */ }

.lightbox-inner {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 15px 40px; /* Hardcoded padding for X button (top) and screen edge (bottom) */
}

.lightbox-img-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0; /* The magic line that stops tall images from breaking the screen */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(10,22,40,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  margin-top: 1.5rem;
  flex-shrink: 0;
}

.lightbox-caption { font-family: var(--ff-display); font-style: italic; color: rgba(255,255,255,0.9); font-size: var(--sz-sm); }
.lightbox-counter { font-size: var(--sz-xs); color: var(--gold); font-weight: 600; white-space: nowrap; }

/* ── Lightbox Buttons ── */
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--gold); color: var(--navy); border-color: var(--gold); transform: scale(1.1);
}

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { top: 50%; left: 1.5rem; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 1.5rem; transform: translateY(-50%); }

/* ── Mobile Layout Fixes ── */
@media (max-width: 768px) {
  .lightbox-close { 
    top: 1rem; right: 1rem; 
    width: 44px; height: 44px; 
    background: rgba(10,22,40,0.98); /* Solid background blocks anything behind it */
  }
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-info { max-width: 90vw; padding: 0.6rem 1rem; }
}
/* ══════════════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.info-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.info-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold); }

.info-icon {
  width: 44px; height: 44px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gold);
}

.info-card h4 {
  font-weight: 600;
  font-size: var(--sz-sm);
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.info-card p,
.info-card a {
  font-size: var(--sz-sm);
  color: var(--text-mid);
  line-height: 1.6;
  display: block;
  text-decoration: none;
  transition: color var(--transition);
}
.info-card a:hover { color: var(--gold); }

/* Contact Form */
.form-glass {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ivory-dark);
}

.form-glass h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-lg);
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.form-glass > p {
  color: var(--text-light);
  font-size: var(--sz-sm);
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: var(--sz-sm);
  font-weight: 600;
  color: var(--text-dark);
}

.form-group label span { color: var(--gold); }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--ivory-dark);
  border-radius: var(--radius-md);
  font-size: var(--sz-sm);
  font-family: var(--ff-body);
  color: var(--text-dark);
  background: var(--ivory);
  transition: all var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: none;
  align-items: center;
  gap: 0.8rem;
  background: rgba(27,107,107,0.1);
  border: 1px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  color: var(--teal);
  font-size: var(--sz-sm);
}

.form-success i { font-size: 1.4rem; }
.form-success.show { display: flex; }

/* Map */
.map-section { margin-top: 3rem; }
.map-section .section-title { margin-bottom: 1.5rem; }

.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: clamp(280px, 40vw, 450px);
  border: 1px solid var(--ivory-dark);
  box-shadow: var(--shadow-md);
}

.map-wrapper iframe { width: 100%; height: 100%; border: 0; }

.map-address-badge {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: var(--sz-sm);
}

.map-address-badge i { color: var(--gold); }

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  max-width: var(--container-w);
  margin: 0 auto;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.footer-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.footer-name {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  color: var(--white);
  font-size: 1.1rem;
}

.footer-sub {
  display: block;
  font-size: var(--sz-xs);
  color: var(--gold);
  letter-spacing: 0.08em;
}

.footer-tagline {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--gold);
  font-size: var(--sz-base);
  margin-bottom: 0.8rem;
}

.footer-about {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.footer-social {
  display: flex;
  gap: 0.7rem;
}

.footer-social a {
  width: 38px; height: 38px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.footer-links-col h4,
.footer-contact-col h4 {
  font-family: var(--ff-display);
  color: var(--white);
  font-size: var(--sz-md);
  margin-bottom: 1.2rem;
}

.footer-links-col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-links-col a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.65);
  font-size: var(--sz-sm);
  transition: color var(--transition);
  text-decoration: none;
}
.footer-links-col a i { color: var(--gold); font-size: 0.65rem; }
.footer-links-col a:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.footer-contact-item i {
  color: var(--gold);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.footer-contact-item p,
.footer-contact-item a {
  font-size: var(--sz-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  display: block;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-contact-item a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  max-width: var(--container-w);
  margin: 0 auto;
  font-size: var(--sz-xs);
  color: rgba(255,255,255,0.4);
}

.footer-verse {
  font-style: italic;
  color: rgba(201,168,76,0.6);
}

/* ══════════════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 900;
  cursor: pointer;
  border: none;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-crest { display: none; }
  .hero-content { max-width: 100%; }

  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-images { grid-template-rows: 200px 150px; }

  .footer-top { grid-template-columns: 1fr 1fr; }

  .director-grid { grid-template-columns: 280px 1fr; }

  .vm-grid { grid-template-columns: 1fr; }

  .gallery-masonry { columns: 3; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 68px; }

  /* Ensure hamburger is always clickable and on top */
  .hamburger { 
    display: flex; 
    z-index: 1200; 
  }

  /* Full screen mobile menu overlay */
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(10,22,40,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    transform: translateY(-100%);
    transition: transform var(--transition-slow);
    padding: 2rem;
    z-index: 1100;
  }

  .nav-links.open { transform: translateY(0); }

  .nav-link {
    font-size: var(--sz-md);
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    width: 100%;
    text-align: center;
  }

  /* Fix Mobile Stats Layout (Creates a 2x2 grid and hides the ugly dividers) */
  .stats-ribbon { 
    padding: 2.5rem 1rem;
    gap: 2.5rem 1rem;
  }
  
  .stat-item {
    flex: 1 1 40%; /* Forces 2 items per row */
  }

  .stat-divider { 
    display: none; /* Hide dividers on mobile for a much cleaner look */
  }

  .about-photo-strip { grid-template-columns: repeat(2, 1fr); height: auto; }
  .strip-img { aspect-ratio: 1; }

  .director-grid { grid-template-columns: 1fr; }
  .director-photo-frame { aspect-ratio: 1; max-width: 260px; margin: 0 auto; }

  .news-card.featured { flex-direction: column; }
  .news-card.featured .news-img { width: 100%; min-height: 220px; }

  .gallery-masonry { columns: 2; }

  .admission-intro { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }

  .footer-bottom { flex-direction: column; text-align: center; }

  .triple-f-section .tf-items { gap: 0.5rem; }
  .tf-letter { font-size: clamp(2.5rem, 8vw, 4rem); }

  .quick-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: var(--nav-h) 1rem 3rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; justify-content: center; }
  .stats-ribbon { grid-template-columns: 1fr 1fr; }
  .gallery-masonry { columns: 1; }
  .quick-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .about-photo-strip { grid-template-columns: 1fr 1fr; }
  .vd-item { grid-template-columns: 60px 1fr; }

  .tf-items { flex-direction: column; }
  .tf-dot { display: none; }
}



/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Category Tabs & Scroll Buttons ── */
.gal-tabs-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gal-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none; /* Hides native scrollbar on Firefox */
  max-width: var(--container-w);
  scroll-behavior: smooth; /* Ensures buttery smooth scrolling */
}

.gal-tabs::-webkit-scrollbar { 
  display: none; /* Hides native scrollbar on Chrome/Safari */
}

/* The Left/Right Arrow Buttons */
.tab-scroll-btn {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  opacity: 0; /* Hidden by default */
  pointer-events: none; /* Prevents clicking when hidden */
}

.tab-scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.tab-scroll-btn:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  transform: scale(1.1);
}

/* ==========================================
   ANTI-STRETCH GRID FIX (For all screens)
========================================== */
/* 1. Give the picture containers strict, locked boundaries */
.gal-item, 
.bento-item {
  position: relative !important;
  overflow: hidden;
}

/* 2. Absolute positioning forces the browser to obey the crop (cover) rule */
.gal-item img, 
.bento-item img {
  position: absolute !important;
  top: 0; 
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* The magic rule that crops instead of warping */
}

/* 3. Mobile View: Use a uniform Aspect Ratio instead of hard heights */
@media (max-width: 500px) {
  .gal-grid, 
  .bento-gallery {
    grid-template-columns: 1fr !important; /* Single column */
    grid-auto-rows: auto !important; /* Removes the old hard height */
  }
  
  .gal-item, 
  .bento-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important; /* Forces every box into a perfect, uniform rectangle */
  }
}
/* ==========================================
   CONTACT PAGE: SIDE-BY-SIDE LAYOUT
========================================== */

/* Utility for centering the top description text */
.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 60ch;
  margin-bottom: 3rem;
}

.contact-top-info {
  margin-bottom: 4rem;
}

/* 1. Info Cards 3-Column Grid */
.info-cards.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0;
}

/* 2. Form & Map Side-by-Side */
.contact-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch; /* Forces both columns to be the exact same height */
}

/* Make map wrapper stretch to fill the height to match the form */
.map-section.side-map {
  margin-top: 0; 
  display: flex;
  flex-direction: column;
  height: 100%;
}

.map-section.side-map .map-wrapper {
  flex: 1; /* Forces the map iframe container to stretch vertically */
  height: auto;
  min-height: 400px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
}

.map-section.side-map .map-address-badge {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Mobile Layout Adjustments ── */
@media (max-width: 1024px) {
  .info-cards.grid-3-cols {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
  }
  .contact-split-grid {
    grid-template-columns: 1fr; /* Stacks the Map under the Form on smaller screens */
  }
  .map-section.side-map .map-wrapper {
    min-height: 350px;
  }
}

@media (max-width: 640px) {
  .info-cards.grid-3-cols {
    grid-template-columns: 1fr; /* 1 column on phones */
  }
}

/* ==========================================
   PAGE: PORTAL
========================================== */


.portal-card {
  background: rgba(10, 22, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  align-items: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.portal-card:hover {
  transform: translateY(-8px);
  border-color: rgba(244, 180, 26, 0.3); /* Soft gold border on hover */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.portal-icon {
  width: 90px;
  height: 90px;
  background: rgba(244, 180, 26, 0.1);
  color: var(--gold);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.portal-card h3 {
  font-family: var(--ff-display);
  font-size: var(--sz-xl);
  margin-bottom: 1rem;
}

.portal-card p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
  flex-grow: 1;
  font-size: 1.05rem;
  line-height: 1.6;
}