/* ==========================================================================
   GIRIDEEPAM ENGLISH HIGH SCHOOL — DESIGN SYSTEM (2026 REDESIGN)
   Clean, understated layout: white space, Lato type, pill buttons and
   rounded cards with flat brand colours and gentle motion.
   Palette: Navy (#1E2F4F), School Green (#1F6B57), Soft Gold (#D9B65E)
   Breakpoints: 420 / 768 / 992 / 1024px (hamburger) / 1280px (compact desktop)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Cinzel:wght@600;700&display=swap');

:root {
  /* Brand palette */
  --primary: #1F6B57;
  --primary-dark: #17513F;
  --primary-light: #3C8C74;
  --secondary: #1E2F4F;
  --secondary-dark: #16223A;
  --accent: #D9B65E;
  --accent-hover: #C9A54C;
  --accent-light: rgba(217, 182, 94, 0.16);

  /* Flat brand fills (kept as variables so components stay consistent) */
  --gradient: linear-gradient(var(--primary), var(--primary));
  --gradient-btn: linear-gradient(var(--primary), var(--primary));
  --gradient-text: linear-gradient(var(--primary), var(--primary));
  --gradient-text-light: linear-gradient(var(--accent), var(--accent));

  /* Backgrounds */
  --bg-main: #FFFFFF;
  --bg-light: #F6F7F8;
  --bg-teal: #EEF4F1;
  --bg-cream: #FFF8EA;
  --bg-dark: #0B1733;

  /* Text */
  --text-dark: #1E2F4F;
  --text-body: #4A4F57;
  --text-muted: #6B7280;
  --white: #FFFFFF;

  /* Borders & shadows */
  --border: #E5E7EB;
  --border-light: #F0F1F3;
  --shadow-sm: 0 2px 6px rgba(18, 38, 77, 0.05);
  --shadow-md: 0 6px 18px -8px rgba(30, 47, 79, 0.12);
  --shadow-lg: 0 12px 28px -12px rgba(30, 47, 79, 0.16);
  --shadow-xl: 0 18px 36px -14px rgba(30, 47, 79, 0.2);

  /* Geometry & motion */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.4s var(--ease);
  --max-width: 1240px;
  --gutter: 24px;
  --header-h: 76px;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* html clips the off-canvas drawer; body uses clip (not hidden) so it never becomes
   a scroll container, which would break the sticky header */
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  line-height: 1.65;
  background-color: var(--bg-main);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { color: var(--text-dark); line-height: 1.2; }

a { text-decoration: none; color: inherit; transition: color 0.25s ease; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   SCROLL ANIMATIONS
   ========================================================================== */
.animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.animate.fade-left { transform: translateX(-18px); }
.animate.fade-right { transform: translateX(18px); }
.animate.zoom-in { transform: scale(0.98); }
.animate.visible { opacity: 1; transform: none; }

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }

/* Scroll progress bar */
.scroll-progress {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--gradient);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 10002;
  pointer-events: none;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   BUTTONS & LINKS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn i { transition: transform 0.4s var(--ease); }
.btn:hover i.fa-arrow-right { transform: translateX(5px); }

.btn-primary {
  background: var(--gradient-btn);
  background-size: 200% 100%;
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-dark); color: var(--white); }

.btn-accent {
  background: var(--accent);
  color: var(--secondary-dark);
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--secondary-dark);
}

.btn-light { background: var(--white); color: var(--secondary); }
.btn-light:hover { background: var(--bg-teal); color: var(--secondary); }

.btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
  background: transparent;
}
.btn-outline:hover { background: var(--white); border-color: var(--white); color: var(--secondary); }

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

/* Text link with sliding arrow + growing underline */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 4px;
  width: fit-content;
}
.link-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.link-arrow i { font-size: 0.8rem; transition: transform 0.4s var(--ease); }
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow:hover i { transform: translateX(6px); }
.link-arrow.light { color: var(--accent); margin-top: 10px; }

/* ==========================================================================
   ANNOUNCEMENT MARQUEE
   ========================================================================== */
.marquee-bar {
  background: var(--secondary-dark);
  color: var(--white);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}
.marquee-badge {
  background: var(--accent);
  color: var(--secondary-dark);
  font-weight: 700;
  font-size: 0.68rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-left: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  box-shadow: 12px 0 16px var(--secondary-dark);
}
.marquee-content {
  display: inline-block;
  animation: marqueeScroll 28s linear infinite;
  padding-left: 100%;
}
.marquee-bar:hover .marquee-content { animation-play-state: paused; }
.marquee-item { margin-right: 60px; font-weight: 400; }
.marquee-item i { color: var(--accent); margin-right: 8px; font-size: 0.7rem; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
/* No backdrop-filter here: it would become the containing block for the
   fixed mobile drawer and pin it to the header instead of the viewport */
.main-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: transform 0.45s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
.main-header.scrolled { box-shadow: 0 6px 24px -12px rgba(18, 38, 77, 0.25); border-bottom-color: var(--border-light); }
.main-header.hide { transform: translateY(-100%); }
body.nav-open .main-header { transform: none; }
body.nav-open .floating-action-area { opacity: 0; pointer-events: none; }

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 1; min-width: 0; }
.logo img { flex-shrink: 0; }
.logo img { width: 54px; height: 54px; object-fit: contain; transition: transform 0.6s var(--ease); }
.logo-text {
  display: inline-flex;
  flex-direction: column;
  align-items: center; /* name, subtitle and divider centred on each other */
}
/* School name lockup: Cinzel serif, two stacked lines, navy #1E2F4F */
.logo-text h1 {
  font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
  font-size: 2.15rem; /* size of the name; the subtitle scales from this */
  color: var(--secondary);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}
.logo-name {
  display: block;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logo-sub {
  display: block;
  margin-top: 0.12em;
  font-size: 0.45em; /* keeps the subtitle the same width as the name at any size */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions { display: flex; align-items: center; gap: 10px; order: 3; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a, .nav-dropdown > a {
  position: relative;
  padding: 10px 9px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--secondary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
/* gradient underline that grows on hover */
.main-nav > a:not(.nav-cta)::after, .nav-dropdown > a::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.main-nav > a:hover::after, .main-nav > a.active::after,
.nav-dropdown > a:hover::after, .nav-dropdown > a.active::after { transform: scaleX(1); }
.main-nav > a.active, .nav-dropdown > a.active { color: var(--primary); }
.nav-dropdown > a i { transition: transform 0.3s ease; }
.nav-dropdown:hover > a i { transform: rotate(180deg); }

.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 250px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 10px;
  z-index: 200;
  border: 1px solid var(--border-light);
  animation: fadeIn 0.3s var(--ease);
}
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.dropdown-menu a:hover { background: var(--bg-teal); color: var(--primary); padding-left: 20px; }
.nav-dropdown:hover .dropdown-menu { display: block; }

.nav-cta {
  margin-left: 10px;
  padding: 11px 22px !important;
  border-radius: var(--radius-full);
  background: var(--gradient-btn);
  background-size: 200% 100%;
  color: var(--white) !important;
  font-size: 0.95rem !important;
  transition: var(--transition);
}
.nav-cta i { font-size: 0.75rem; transition: transform 0.4s var(--ease); }
.nav-cta:hover { background: var(--primary-dark); }
.nav-cta:hover i { transform: translateX(4px); }

.nav-mobile-footer { display: none; }

/* Hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--secondary);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0 13px;
  z-index: 10001;
  position: relative;
}
.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 51, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

/* ==========================================================================
   HERO VIDEO CAROUSEL
   ========================================================================== */
.hero-carousel-section {
  --hero-header-h: 76px; /* overwritten by main.js with the real header height */
  position: relative;
  width: 100%;
  height: calc(100vh - var(--hero-header-h));
  height: calc(100svh - var(--hero-header-h));
  min-height: 560px;
  max-height: 940px;
  background: var(--secondary-dark);
  overflow: hidden;
  touch-action: pan-y;
  isolation: isolate;
}
.hero-carousel-slides { position: absolute; inset: 0; }
.hero-carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}
.hero-carousel-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 10s linear;
}
.hero-carousel-slide.active .hero-slide-bg-video { transform: scale(1); }
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(11, 23, 51, 0.25) 0%, rgba(11, 23, 51, 0.2) 35%, rgba(11, 23, 51, 0.85) 75%, rgba(11, 23, 51, 0.96) 100%);
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 120px; /* clears the slide indicators */
}

/* Staggered entrance, replayed on every slide change */
.hero-slide-content > * { opacity: 0; transform: translateY(30px); }
.hero-carousel-slide.active .hero-slide-content > * { animation: heroTextIn 1s var(--ease) forwards; }
.hero-carousel-slide.active .hero-slide-content > :nth-child(1) { animation-delay: 0.15s; }
.hero-carousel-slide.active .hero-slide-content > :nth-child(2) { animation-delay: 0.3s; }
.hero-carousel-slide.active .hero-slide-content > :nth-child(3) { animation-delay: 0.45s; }
.hero-carousel-slide.active .hero-slide-content > :nth-child(4) { animation-delay: 0.6s; }
@keyframes heroTextIn { to { opacity: 1; transform: none; } }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--gradient-text-light); flex-shrink: 0; }

.hero-main-title {
  font-size: clamp(1.9rem, 6vw, 3.3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  max-width: 900px;
}
.hero-main-title .text-gradient { background: none; color: var(--white); -webkit-text-fill-color: var(--white); }

.hero-about-text {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 28px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

/* Indicators with progress fill */
.hero-indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 20px;
}
.hero-indicator {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 8px;
  align-items: baseline;
  font-size: 0.82rem;
  transition: color 0.3s ease;
  padding: 0;
}
.hero-indicator.active, .hero-indicator:hover { color: var(--white); }
.hi-num { font-weight: 700; }
.hi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-bar { grid-column: 1 / -1; height: 2px; background: rgba(255, 255, 255, 0.25); overflow: hidden; border-radius: 2px; }
.hi-fill { display: block; height: 100%; width: 100%; background: var(--gradient-text-light); transform: scaleX(0); transform-origin: left; }
.hero-indicator.done .hi-fill { transform: scaleX(1); }

.hero-scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 30px;
  z-index: 3;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  display: none;
}
.hero-scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(14px); } }

@media (min-width: 768px) {
  .hero-carousel-slide { align-items: center; }
  .hero-slide-overlay {
    background:
      linear-gradient(90deg, rgba(11, 23, 51, 0.9) 0%, rgba(11, 23, 51, 0.65) 45%, rgba(11, 23, 51, 0.15) 100%),
      linear-gradient(180deg, rgba(11, 23, 51, 0) 60%, rgba(11, 23, 51, 0.7) 100%);
  }
  .hero-slide-content { padding-top: 40px; padding-bottom: 80px; }
  .hero-indicators { bottom: 40px; gap: 32px; }
}

/* Short phones: tighter hero */
@media (max-height: 680px) and (max-width: 767px) {
  .hero-about-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide-bg-video { transform: none; transition: none; }
  .hero-slide-content > * { opacity: 1; transform: none; }
  .hero-carousel-slide.active .hero-slide-content > * { animation: none; }
}

/* ==========================================================================
   PAGE BANNERS (inner pages)
   ========================================================================== */
.page-banner {
  position: relative;
  overflow: hidden;
  background: var(--secondary-dark);
  color: var(--white);
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 80px;
  isolation: isolate;
}
/* Layer 1: page photo with a slow Ken Burns zoom/pan (background-image set per page in header.php) */
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--secondary-dark);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -3;
}
@keyframes kenBurns {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.16) translate(-2%, 1.5%); }
}
/* Optional background video (About page) sits above the photo layer, below the overlay */
.page-banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}
.page-banner.has-video { min-height: 460px; }
@media (max-width: 768px) { .page-banner.has-video { min-height: 320px; } }
/* Layer 2: readability gradient + brand tint + bottom gradient bar */
.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--primary), var(--primary)) bottom / 100% 3px no-repeat,
    linear-gradient(90deg, rgba(22, 34, 58, 0.88) 0%, rgba(22, 34, 58, 0.72) 50%, rgba(22, 34, 58, 0.5) 100%);
  z-index: -2;
}
/* Layer 3: drifting dot grid */
.page-banner .container::before {
  display: none;
  content: '';
  position: absolute;
  inset: -40px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
  mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
  animation: dotDrift 18s linear infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes dotDrift { to { transform: translate(28px, 28px); } }
/* Layer 4: glowing orbs floating behind the text */
.page-banner .container::after {
  display: none;
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  right: -120px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 168, 90, 0.45) 0%, rgba(14, 124, 102, 0) 65%);
  filter: blur(4px);
  animation: floatBlob 12s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}
@keyframes floatBlob { to { transform: translate(-120px, 90px) scale(1.2); } }
.page-banner .container { width: 100%; }
/* Small gradient accent line above the title */
.page-banner h2::before {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-text-light);
  margin-bottom: 20px;
  transform-origin: left;
}
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.page-banner h2 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  animation: heroTextIn 1s var(--ease) both;
  opacity: 0;
  transform: translateY(24px);
}
.page-banner p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 640px;
  animation: heroTextIn 1s var(--ease) 0.15s both;
  opacity: 0;
  transform: translateY(24px);
}

/* ==========================================================================
   SECTIONS & HEADINGS
   ========================================================================== */
.section { padding: 64px 0; }
.section-alt { background-color: var(--bg-light); }
.section-teal { background-color: var(--bg-teal); }
.section-cream { background-color: var(--bg-cream); }
.section-dark {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.section-dark::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  left: -300px;
  bottom: -400px;
  border-radius: 50%;
  display: none;
}
.section-dark h2, .section-dark h4 { color: var(--white); }

.section-title { text-align: center; margin-bottom: 36px; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.section-tag::before { content: ''; width: 28px; height: 2px; background: var(--gradient); flex-shrink: 0; }
.section-tag.light { color: var(--accent); }
.section-tag.light::before { background: var(--gradient-text-light); }
.section-title h2, .section-head-split h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-title p { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }
.section-title .underline {
  width: 60px;
  height: 4px;
  background: var(--gradient);
  margin: 18px auto 0;
  border-radius: var(--radius-full);
}

/* Heading on the left, intro (or link) on the right */
.section-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 60px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head-split > div { max-width: 640px; }
.section-head-split h2 { margin-bottom: 0; }
.section-head-split > p { max-width: 440px; color: var(--text-muted); font-size: 1rem; }
.section-dark .section-head-split > p { color: rgba(255, 255, 255, 0.7); }
.section-cta { text-align: center; margin-top: 28px; }

/* Big statement sentence */
.statement {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--secondary);
  letter-spacing: -0.015em;
  max-width: 1000px;
  margin-bottom: 40px;
}
.statement .text-gradient { font-weight: 700; }

/* ==========================================================================
   STATS BAND
   ========================================================================== */
.stats { padding: 56px 0; background: var(--white); border-bottom: 1px solid var(--border-light); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-card {
  padding: 8px 28px;
  text-align: left;
  border-left: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:first-child { border-left: none; padding-left: 0; }
.stat-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-teal);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 14px;
  transition: var(--transition);
}
.stat-card h3 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}
.stat-card p { color: var(--text-muted); font-weight: 700; font-size: 0.92rem; }

/* ==========================================================================
   ABOUT / SPLIT LAYOUT
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr; /* wider image column */
  gap: 56px;
  align-items: center;
}
.about-grid.reverse { grid-template-columns: 1fr 1.3fr; }
.about-grid.reverse > :first-child { order: 2; }
.about-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.about-image-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.about-badge {
  position: absolute;
  bottom: 22px;
  left: 22px;
  right: 22px;
  width: fit-content;
  max-width: calc(100% - 44px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  color: var(--secondary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-badge strong {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.about-text p { margin-bottom: 18px; font-size: 1rem; line-height: 1.8; }
.about-text .link-arrow { margin-top: 8px; }

.check-list { display: grid; gap: 12px; margin: 6px 0 26px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--secondary); }
.check-list i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-teal);
  color: var(--primary);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   VALUES TICKER
   ========================================================================== */
.ticker {
  overflow: hidden;
  padding: 26px 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: tickerMove 36s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--secondary);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.ticker-track span:nth-of-type(odd) {
  -webkit-text-stroke: 0;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
}
.ticker-track i { color: var(--accent); font-size: 1.2rem; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* ==========================================================================
   FEATURE CARDS (Why Choose Us)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  position: relative;
  background: var(--white);
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  overflow: hidden;
  isolation: isolate;
}
/* gradient wash that rises on hover */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  display: none;
  background: var(--gradient);
  opacity: 0;
  transform: translateY(30%);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  z-index: -1;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 54px;
  height: 54px;
  background: var(--bg-teal);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 22px;
  transition: var(--transition);
}
.feature-card h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; transition: color 0.3s ease; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; transition: color 0.3s ease; }

/* Numbered variant on dark background */
.features-grid.numbered .feature-card { box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.feature-num {
  position: absolute;
  top: 22px;
  right: 26px;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: #D5DAE0;
}

/* ==========================================================================
   PILLAR CARDS (home "Why Choose Girideepam")
   Horizontal card: icon tile on the left, number label + text on the right,
   thin green accent bar on the left edge that grows on hover.
   ========================================================================== */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillar-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px 26px 28px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.7s ease, transform 0.7s ease;
}
.pillar-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  transform: scaleY(0.35);
  transform-origin: top;
  transition: transform 0.4s ease;
}
.pillar-card:hover { box-shadow: var(--shadow-md); border-color: #D9E3DF; }
.pillar-card:hover::before { transform: scaleY(1); }
.pillar-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-teal);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.pillar-card:hover .pillar-icon { background: var(--primary); color: var(--white); }
.pillar-num {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-hover);
  margin-bottom: 4px;
}
@keyframes slideFromLeft { from { opacity: 0; transform: translateX(-110%); } to { opacity: 1; transform: none; } }
@keyframes slideFromRight { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
.pillar-body h4 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.pillar-body p { font-size: 0.92rem; line-height: 1.65; color: var(--text-muted); }

/* ==========================================================================
   FACILITIES
   ========================================================================== */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.facility-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}
.facility-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.facility-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.facility-card:hover::after { transform: scaleX(1); }
.facility-icon {
  width: 54px;
  height: 54px;
  background: var(--bg-teal);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
  transition: var(--transition);
}
.facility-card:hover .facility-icon { background: var(--primary); color: var(--white); }
.facility-card h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.facility-card p { color: var(--text-muted); font-size: 0.94rem; line-height: 1.65; }

/* ==========================================================================
   EVENTS
   ========================================================================== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}
.event-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.event-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-teal);
}
.event-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.event-card:hover .event-img-wrap img { transform: scale(1.03); }
.event-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 107, 87, 0.35);
  font-size: 2.6rem;
  background: var(--bg-teal);
}
.event-date-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-md);
}
.event-info { padding: 26px; display: flex; flex-direction: column; flex-grow: 1; }
.event-date {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-info h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.event-info p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.65; }
.event-empty {
  text-align: center;
  padding: 48px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.event-empty i { font-size: 3rem; color: var(--primary); margin-bottom: 16px; opacity: 0.8; }

/* ==========================================================================
   LEADERSHIP
   ========================================================================== */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.leader-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.leader-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.leader-img-wrap {
  aspect-ratio: 4 / 4.2;
  overflow: hidden;
  background: var(--bg-teal);
  position: relative;
}
.leader-img-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--primary);
}
.leader-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 1s var(--ease);
}
.leader-card:hover .leader-img-wrap img { transform: scale(1.03); }
.leader-placeholder {
  aspect-ratio: 4 / 4.2;
  background: var(--bg-teal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  gap: 10px;
}
.leader-placeholder i { font-size: 3.5rem; }
.leader-info { padding: 24px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.leader-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6em; /* two lines so roles align across cards */
  margin-bottom: 6px;
}
.leader-info p { font-size: 0.85rem; color: var(--primary); font-weight: 700; }
.leader-info .leader-role { margin-bottom: 12px; }
.leader-info .leader-quote {
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.leader-info .btn, .leader-info .link-arrow { margin-top: auto; }

/* Leadership / principal message pages: narrow photo column, photo shown whole */
.about-grid.message-grid {
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 40px;
  align-items: start;
}
.message-grid .leader-card { position: sticky; top: 110px; }
.message-grid .leader-img-wrap { aspect-ratio: auto; height: auto; }
.message-grid .leader-img-wrap img { height: auto; object-fit: initial; }
.message-grid .leader-card:hover { transform: none; }
.message-grid .leader-card:hover .leader-img-wrap img { transform: none; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta-band {
  background: var(--gradient);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--white); margin-bottom: 14px; }
.cta-band p { font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); max-width: 640px; margin: 0 auto 32px; }
.cta-group { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   VISIT / MAP
   ========================================================================== */
.visit-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.visit-section { padding: 56px 0; }
/* Slim band: heading + address on the left, actions on the right */
.visit-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
}
.visit-text h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.visit-text p { font-size: 1.02rem; margin: 0; display: flex; align-items: flex-start; gap: 10px; }
.visit-text p i { color: var(--primary); margin-top: 5px; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map-embed {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 420px;
}
.map-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-btn {
  padding: 9px 22px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--secondary); color: var(--white); border-color: var(--secondary); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 260px;
  cursor: pointer;
  background: var(--bg-light);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery-item img[src*="mar-ivanios"] { object-position: center top; }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 23, 51, 0.85) 0%, rgba(11, 23, 51, 0) 60%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.gallery-overlay span {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  transform: translateY(12px);
  transition: transform 0.5s var(--ease);
}
.gallery-overlay i {
  color: var(--secondary);
  background: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  transform: scale(0.5);
  transition: transform 0.5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay span { transform: none; }
.gallery-item:hover .gallery-overlay i { transform: scale(1); }

/* Bento layout (home page) */
.gallery-grid.bento {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
}
.gallery-grid.bento .gallery-item { height: auto; }
.gallery-grid.bento .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid.bento .gallery-item:nth-child(n+4) { grid-column: span 2; }

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 51, 0.94);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; animation: fadeIn 0.35s var(--ease); }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 85vh; text-align: center; }
.lightbox-inner img { max-width: 100%; max-height: 78vh; border-radius: var(--radius-md); box-shadow: var(--shadow-xl); }
.lightbox-caption { color: var(--white); margin-top: 14px; font-size: 1rem; font-weight: 700; }
.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}
.lightbox-nav:hover { background: var(--accent); color: var(--secondary); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ==========================================================================
   MOBILE SWIPE SLIDERS (activated <= 768px)
   ========================================================================== */
.slider-dots { display: none; justify-content: center; gap: 8px; margin-top: 18px; }
.slider-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: var(--border);
  cursor: pointer;
  transition: width 0.4s var(--ease), background 0.3s ease;
}
.slider-dots button.active { width: 26px; background: var(--primary); }
.slider-dots.light button { background: rgba(255, 255, 255, 0.25); }
.slider-dots.light button.active { background: var(--accent); }

/* ==========================================================================
   RULES ACCORDION
   ========================================================================== */
.rules-accordion { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.rules-section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.rules-section:hover { box-shadow: var(--shadow-md); }
.rules-section-head {
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.rules-section-head:hover, .rules-section-head.open { color: var(--primary); }
.rules-section-head i { transition: transform 0.4s var(--ease); font-size: 0.85rem; }
.rules-section-head.open i { transform: rotate(180deg); }
.rules-section-body { display: none; padding: 4px 24px 24px; }
.rules-section-body.open { display: block; animation: fadeIn 0.4s var(--ease); }
.rules-list { display: flex; flex-direction: column; gap: 12px; }
.rules-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; }
.rules-list li i { color: var(--primary); margin-top: 5px; font-size: 0.85rem; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-weight: 700; font-size: 0.9rem; color: var(--secondary); margin-bottom: 8px; }
.form-control {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 1rem; /* 16px prevents iOS zoom on focus */
  background: var(--bg-light);
  color: var(--text-dark);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(14, 124, 102, 0.12);
}
textarea.form-control { resize: vertical; min-height: 130px; }

.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.alert-error { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-info-card {
  background: var(--white);
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}
.contact-info-card:hover { box-shadow: var(--shadow-md); }
.contact-info-card i {
  width: 46px;
  height: 46px;
  background: var(--bg-teal);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.contact-info-card h5 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.contact-info-card p { color: var(--text-muted); font-size: 0.92rem; overflow-wrap: anywhere; }

/* ==========================================================================
   FLOATING ACTIONS
   ========================================================================== */
.floating-action-area {
  transition: opacity 0.3s ease;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9995;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease), opacity 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
}
.floating-btn:hover { transform: translateY(-3px) scale(1.06); }
.floating-btn.whatsapp { background: #25D366; }
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.floating-btn.scroll-top { background: var(--secondary); opacity: 0; transform: translateY(12px); pointer-events: none; }
.floating-btn.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer { background: var(--secondary-dark); color: rgba(255, 255, 255, 0.72); }
.footer-cta {
  background: var(--primary-dark);
  color: var(--white);
  padding: 64px 0;
}
@keyframes gradientShift { to { background-position: 100% 0; } }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-cta-text { max-width: 640px; }
.footer-cta .section-tag.light { color: var(--white); }
.footer-cta h3 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 700; color: var(--white); letter-spacing: -0.02em; margin-bottom: 10px; }
.footer-cta p { font-size: 1.05rem; opacity: 0.92; }
.footer-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.footer-body { padding: 56px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 48px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-logo img { width: 48px; height: 48px; }
.footer-logo h3 { font-family: 'Cinzel', Georgia, serif; color: var(--white); line-height: 1; text-transform: uppercase; }
.footer-logo h3 .logo-name { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; }
.footer-logo h3 .logo-sub { display: block; margin-top: 4px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.8); }
.footer-about p { font-size: 0.93rem; line-height: 1.75; }
.footer-values { margin-top: 16px; font-weight: 700; color: var(--accent); font-size: 0.86rem; }
.footer-col h4 {
  font-size: 0.8rem;
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 0.94rem; position: relative; display: inline-block; transition: color 0.3s ease, transform 0.4s var(--ease); }
.footer-links a:hover { color: var(--accent); transform: translateX(6px); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 0.92rem; }
.footer-contact-item p { overflow-wrap: anywhere; }
.footer-contact-item a:hover { color: var(--accent); }
.footer-contact-item i { color: var(--accent); margin-top: 5px; width: 16px; text-align: center; flex-shrink: 0; }
.footer-bottom { padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.84rem; color: rgba(255, 255, 255, 0.55); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Small laptops / zoomed desktop windows: keep the full menu, just more compact */
@media (min-width: 1025px) and (max-width: 1280px) {
  .header-flex { gap: 14px; }
  .logo { gap: 10px; }
  .logo img { width: 46px; height: 46px; }
  .logo-text h1 { font-size: 1.9rem; }
  /* link spacing grows with the window: ~6px at 1025px up to ~10px at 1280px */
  .main-nav > a, .nav-dropdown > a { --nav-pad: clamp(6px, calc(1.5vw - 9px), 10px); padding: 10px var(--nav-pad); font-size: 0.93rem; }
  .main-nav > a:not(.nav-cta)::after, .nav-dropdown > a::after { left: var(--nav-pad); right: var(--nav-pad); }
  .nav-cta { margin-left: 6px; padding: 10px 16px !important; }
  .nav-cta .cta-long { display: none; }
}
.nav-cta .cta-short { display: none; }
@media (min-width: 1025px) and (max-width: 1280px) {
  .nav-cta .cta-short { display: inline; }
}

/* Tablets & phones: hamburger + full-height drawer */
@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .mobile-toggle { display: flex; }
  .header-actions { order: 0; }
  .logo-text h1 { font-size: 2.5rem; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 96px 24px 28px;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.55s var(--ease), visibility 0.55s;
    z-index: 10000;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .main-nav.active { transform: none; visibility: visible; }
  .main-nav > * { opacity: 0; transform: translateX(24px); transition: opacity 0.4s ease, transform 0.5s var(--ease); }
  .main-nav.active > * { opacity: 1; transform: none; }
  .main-nav.active > :nth-child(1) { transition-delay: 0.10s; }
  .main-nav.active > :nth-child(2) { transition-delay: 0.14s; }
  .main-nav.active > :nth-child(3) { transition-delay: 0.18s; }
  .main-nav.active > :nth-child(4) { transition-delay: 0.22s; }
  .main-nav.active > :nth-child(5) { transition-delay: 0.26s; }
  .main-nav.active > :nth-child(6) { transition-delay: 0.30s; }
  .main-nav.active > :nth-child(7) { transition-delay: 0.34s; }
  .main-nav.active > :nth-child(8) { transition-delay: 0.38s; }
  .main-nav.active > :nth-child(9) { transition-delay: 0.42s; }

  .main-nav > a, .nav-dropdown > a {
    width: 100%;
    min-height: 52px;
    padding: 12px 4px;
    font-size: 1.15rem;
    font-weight: 700;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
  }
  .main-nav > a:not(.nav-cta)::after, .nav-dropdown > a::after { display: none; }
  .nav-dropdown:hover > a i { transform: none; }
  .nav-dropdown.open > a i { transform: rotate(180deg); }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg-light);
    margin: 6px 0;
    padding: 6px;
    min-width: 0;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .dropdown-menu a { font-size: 0.98rem; padding: 12px 14px; }
  .nav-cta {
    margin: 22px 0 0;
    justify-content: center !important;
    min-height: 52px;
    font-size: 1rem !important;
    border-bottom: none !important;
  }
  .nav-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 28px;
    font-size: 0.9rem;
    color: var(--text-muted);
  }
  .nav-mobile-footer i { color: var(--primary); width: 18px; margin-right: 8px; }

  .features-grid, .facilities-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .leadership-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 992px) {
  .about-grid, .contact-grid, .visit-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-grid.reverse { grid-template-columns: 1fr; }
  .about-grid.message-grid { grid-template-columns: 1fr; gap: 28px; }
  .message-grid .leader-card { position: static; width: 100%; max-width: 420px; margin: 0 auto; }
  .about-grid.reverse > :first-child { order: 0; }
  .about-image-wrap img { height: 340px; }
  .section { padding: 56px 0; }
  .statement { margin-bottom: 32px; }
}

/* Phones */
@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .section { padding: 64px 0; }
  .section-head-split { margin-bottom: 32px; }
  .section-title { margin-bottom: 36px; }
  .section-cta { margin-top: 32px; }
  .statement { margin-bottom: 40px; }

  .logo { gap: 10px; }
  .logo img { width: 46px; height: 46px; }
  /* Name grows with the screen to fill the space up to the menu button */
  .logo { flex: 1; }
  /* name width is about 7x its font size; this leaves ~18px before the menu button */
  .logo-text h1 { font-size: clamp(1.2rem, calc(16.1vw - 29px), 2.5rem); }
  .logo-name { letter-spacing: 0.03em; }

  .hero-carousel-section { min-height: 520px; }
  .hero-buttons .btn { flex: 1 1 140px; padding: 12px 18px; }
  .hero-indicators { bottom: 22px; gap: 14px; grid-template-columns: repeat(2, 1fr); }
  .hero-slide-content { padding-bottom: 96px; }

  /* Compact 2x2 stats */
  .stats { padding: 28px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-card { padding: 16px 14px; border-left: none; }
  .stat-card:first-child { padding-left: 14px; }
  .stat-card:nth-child(even) { border-left: 1px solid var(--border); }
  .stat-card:nth-child(n+3) { border-top: 1px solid var(--border); }
  .stat-icon { width: 34px; height: 34px; font-size: 0.85rem; margin-bottom: 10px; }
  .stat-card h3 { font-size: 1.9rem; }
  .stat-card p { font-size: 0.8rem; line-height: 1.3; }

  .about-image-wrap { border-radius: var(--radius-lg); }
  .about-image-wrap img { height: 230px; }
  .about-badge { bottom: 14px; left: 14px; padding: 10px 14px; font-size: 0.8rem; }
  .about-badge strong { font-size: 1.4rem; }

  .ticker { padding: 18px 0; }
  .ticker-track { gap: 24px; }

  .feature-card { padding: 26px 22px; }

  /* Pillar cards: single column, sliding in alternately from left and right */
  .pillar-grid { grid-template-columns: 1fr; gap: 14px; }
  .pillar-card { padding: 20px 18px 20px 22px; gap: 14px; }
  .pillar-icon { width: 46px; height: 46px; font-size: 1.1rem; border-radius: 12px; }
  /* The card stays in place (so the scroll observer can see it) but hidden; once it is
     revealed, a keyframe slides it in from fully off-screen like a slide. */
  .pillar-card.animate { transform: none; transition: none; }
  .pillar-card.animate.visible:nth-child(odd) { animation: slideFromLeft 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .pillar-card.animate.visible:nth-child(even) { animation: slideFromRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .feature-num { font-size: 2.4rem; top: 18px; right: 20px; }

  /* Compact 2-column facility tiles */
  .facilities-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .facility-card { padding: 18px 16px; border-radius: var(--radius-md); }
  .facility-icon { width: 42px; height: 42px; font-size: 1rem; margin-bottom: 12px; }
  .facility-card h4 { font-size: 0.95rem; line-height: 1.3; margin-bottom: 6px; }
  .facility-card p { font-size: 0.8rem; line-height: 1.5; }

  /* Swipeable card rows */
  .snap-slider {
    display: flex !important;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    margin: 0 calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .snap-slider::-webkit-scrollbar { display: none; }
  .snap-slider > * { flex: 0 0 82%; max-width: 340px; scroll-snap-align: start; }
  .snap-slider > .animate { opacity: 1; transform: none; }
  .snap-slider + .slider-dots { display: flex; }
  .leader-card:hover, .event-card:hover { transform: none; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item { height: 160px; border-radius: var(--radius-md); }
  .gallery-grid.bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery-grid.bento .gallery-item:nth-child(n+4) { grid-column: auto; }
  .gallery-grid.bento .gallery-item:nth-child(4) { grid-column: span 2; }
  .gallery-overlay { opacity: 1; padding: 12px; }
  .gallery-overlay span { transform: none; font-size: 0.78rem; }
  .gallery-overlay i { display: none; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .map-embed { height: 300px; border-radius: var(--radius-lg); }
  .visit-section { padding: 56px 0; }
  .visit-actions { width: 100%; }
  .visit-actions .btn { flex: 1 1 160px; }

  .page-banner { min-height: 280px; padding: 88px 0 48px; }
  .page-banner::before { background-position: 60% center; }
  .page-banner p { font-size: 0.98rem; }

  .form-card { padding: 26px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .footer-cta { padding: 56px 0; }
  .footer-cta-actions { width: 100%; }
  .footer-cta-actions .btn { flex: 1 1 150px; }
  .footer-body { padding: 56px 0 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-about, .footer-contact { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .floating-action-area { bottom: 16px; right: 16px; gap: 10px; }
  .floating-btn { width: 48px; height: 48px; font-size: 1.15rem; }

  .lightbox-close { top: -44px; }

  .section table { font-size: 0.86rem !important; }
}

@media (max-width: 420px) {
  .hero-buttons .btn { flex-basis: 100%; }
}

/* Reduced motion: show everything immediately */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .animate { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}

/* ==========================================================================
   ADMIN PANEL HELPERS
   ========================================================================== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  padding: 20px;
}
.login-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
}
.login-card img { width: 64px; height: 64px; margin: 0 auto 16px; }
.login-card h2 { color: var(--secondary); font-size: 1.5rem; font-weight: 700; }
.login-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }

.dashboard-grid { display: grid; gap: 20px; margin-bottom: 32px; }
.dash-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.dash-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.4rem;
}
.dash-icon.bg-blue { background: var(--primary); }
.dash-icon.bg-green { background: #16A34A; }
.dash-icon.bg-orange { background: var(--accent); color: var(--secondary-dark); }
.dash-card h4 { font-size: 1.5rem; color: var(--secondary); font-weight: 700; }
.dash-card p { font-size: 0.85rem; color: var(--text-muted); }

.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-table-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.admin-table-header h3 { font-size: 1.15rem; color: var(--secondary); font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.admin-table th { background: var(--bg-light); padding: 14px 20px; font-weight: 700; color: var(--secondary); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 14px 20px; border-bottom: 1px solid var(--border-light); color: var(--text-body); }

.badge-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.badge-new { background: #FEF3C7; color: #D97706; }
.badge-contacted { background: #E0F2FE; color: #0284C7; }
.badge-closed { background: #DCFCE7; color: #16A34A; }

.btn-add {
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
}
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* Venerable Archbishop Mar Ivanios section (Home and About) */
.ivanios-block {
  background: var(--bg-cream);
  color: var(--text-body); /* stays readable inside dark sections */
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 40px;
  overflow: hidden; /* keeps the slide-in from widening the page on phones */
}
.about-grid.ivanios-grid { grid-template-columns: minmax(200px, 260px) 1fr; gap: 36px; align-items: start; }
.ivanios-grid .about-image-wrap img { height: auto; display: block; }
.ivanios-grid .about-text h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.ivanios-grid .about-text p { font-size: 0.9rem; line-height: 1.65; margin-bottom: 10px; }
.ivanios-grid .about-text p.ivanios-subtitle { font-size: 0.95rem; font-weight: 700; color: var(--primary); }
.ivanios-grid .about-text p.ivanios-vision {
  font-weight: 700;
  color: var(--secondary);
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 0;
}

/* Slide in: photo from the left, then the text line by line from the right */
.ivanios-grid .animate { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.ivanios-grid .animate.fade-left { transform: translateX(-90px); }
.ivanios-grid .animate.fade-right { transform: translateX(90px); }
.ivanios-grid .animate.visible { transform: none; }
.ivanios-grid .delay-1 { transition-delay: 0.15s; }
.ivanios-grid .delay-2 { transition-delay: 0.3s; }
.ivanios-grid .delay-3 { transition-delay: 0.45s; }
.ivanios-grid .delay-4 { transition-delay: 0.6s; }
.ivanios-grid .delay-5 { transition-delay: 0.75s; }

@media (max-width: 992px) {
  .about-grid.ivanios-grid { grid-template-columns: 1fr; gap: 24px; }
  .ivanios-grid .about-image-wrap { width: 100%; max-width: 240px; margin: 0 auto; }
  .ivanios-grid .about-image-wrap img { height: auto; }
}
@media (max-width: 768px) {
  .ivanios-block { padding: 22px 18px; border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .ivanios-grid .animate.fade-left,
  .ivanios-grid .animate.fade-right { transform: none; transition: none; }
}

/* Home page: Management & Leadership */
.leadership-section { padding: 64px 0; }
.leadership-section .section-title { margin-bottom: 36px; }
.leadership-section .section-title h2 { color: #fff; }
.leadership-section .section-title p { color: rgba(255, 255, 255, 0.78); }
.leadership-section .section-tag { color: var(--accent); }
.leadership-section .section-tag::before { background: var(--accent); }
.leadership-section .section-title .underline { background: var(--accent); }

.leadership-top { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.leadership-top .ivanios-block { margin-bottom: 0; }
.leadership-grid.leaders-three { grid-template-columns: repeat(3, 1fr); gap: 24px; }

.lead-card { margin: 0; }
.lead-card-inner {
  position: relative;
  height: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.lead-card-jesus { width: 100%; max-width: 280px; margin: 0 auto; }
.lead-card-inner::after { /* gold ring on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lead-card-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 1.2s var(--ease);
}
.lead-card-inner:hover { transform: translateY(-8px); box-shadow: 0 26px 48px -14px rgba(0, 0, 0, 0.7); }
.lead-card-inner:hover::after { opacity: 1; }
.lead-card-inner:hover img { transform: scale(1.06); }

.lead-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 70px 22px 20px;
  color: #fff;
  background: linear-gradient(to top, rgba(11, 23, 51, 0.97) 0%, rgba(11, 23, 51, 0.86) 50%, rgba(11, 23, 51, 0.45) 78%, rgba(11, 23, 51, 0) 100%);
}
.lead-caption h4 { color: #fff; font-size: 1.15rem; margin: 0 0 4px; }
.lead-caption h4::after { /* gold line that draws itself in */
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 6px;
  background: var(--accent);
  transition: width 0.9s var(--ease) 0.5s;
}
.lead-card.visible .lead-caption h4::after { width: 44px; }
.lead-role { color: var(--accent); font-size: 0.85rem; font-weight: 700; margin: 8px 0 0; }
.lead-quote { color: rgba(255, 255, 255, 0.88); font-size: 0.85rem; font-style: italic; line-height: 1.5; margin: 8px 0 0; }
.lead-link { display: inline-block; color: #fff; font-size: 0.85rem; font-weight: 700; margin-top: 10px; }
.lead-link i { margin-left: 4px; transition: transform 0.3s var(--ease); }
.lead-link:hover { color: var(--accent); }
.lead-link:hover i { transform: translateX(4px); }

/* Entrance: Jesus slides in from the left, the leaders rise one after another */
.lead-card.animate { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.lead-card.animate.fade-left { transform: translateX(-90px); }
.lead-card.animate.visible { transform: none; }
@media (min-width: 769px) {
  .lead-card.animate.fade-up { transform: translateY(60px) scale(0.95); }
  .lead-card.animate.fade-up.visible { transform: none; }
  .leaders-three .delay-1 { transition-delay: 0.1s; }
  .leaders-three .delay-2 { transition-delay: 0.3s; }
  .leaders-three .delay-3 { transition-delay: 0.5s; }
}

@media (max-width: 992px) {
  .lead-caption { padding: 50px 16px 16px; }
  .lead-quote { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 768px) {
  .leadership-section { padding: 56px 0; }
  .lead-card-inner:hover { transform: none; }
  .lead-quote { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-card.animate, .lead-card.animate.fade-left, .lead-card.animate.fade-up { transform: none; transition: none; }
  .lead-card-inner, .lead-card-inner img, .lead-caption h4::after { transition: none; }
  .lead-card-inner:hover, .lead-card-inner:hover img { transform: none; }
}
/* Tablets: keep Mar Ivanios' portrait beside the text */
@media (min-width: 601px) and (max-width: 992px) {
  .about-grid.ivanios-grid { grid-template-columns: 180px 1fr; gap: 24px; }
  .ivanios-grid .about-image-wrap { max-width: none; margin: 0; }
}

/* ==========================================================================
   PHONE SIZING: smaller text and images across the whole site
   Almost all text is in rem, so the html size scales it everywhere.
   ========================================================================== */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .section { padding: 48px 0; }
  .leadership-section { padding: 44px 0; }
  .section-title, .section-head-split { margin-bottom: 26px; }
  .statement { margin-bottom: 28px; }
  .about-text p, .ivanios-grid .about-text p { line-height: 1.6; }

  /* Header and banners */
  .logo img { width: 38px; height: 38px; }
  .hero-carousel-section { min-height: 440px; max-height: 620px; }
  .page-banner, .page-banner.has-video { min-height: 200px; padding: 76px 0 30px; }

  /* Images */
  .about-image-wrap img { height: 180px; }
  .about-grid { gap: 26px; }
  .gallery-item { height: 120px; }
  .gallery-grid.bento { grid-auto-rows: 110px; }
  .map-embed { height: 220px; }
  .floating-btn { width: 42px; height: 42px; font-size: 1rem; }

  /* Portraits */
  .ivanios-grid .about-image-wrap { max-width: 150px; }
  .lead-card-jesus { max-width: 180px; }
  .lead-caption { padding: 40px 14px 14px; }
  .leaders-three.snap-slider > * { flex-basis: 72%; max-width: 270px; }
  .lead-caption h4 { font-size: 1rem; }
  .lead-quote, .lead-role, .lead-link { font-size: 0.8rem; margin-top: 6px; }
  .leader-img-wrap { aspect-ratio: 1 / 1; }
  .leadership-grid:not(.snap-slider) { gap: 12px; }
  .message-grid .leader-card { max-width: 220px; }

  /* Tables fit the screen: long words such as Physics/Chemistry/Biology may wrap */
  .section table th, .section table td { padding: 10px 8px !important; }
  .section table th:last-child, .section table td:last-child { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  html { font-size: 14.5px; }
  .about-image-wrap img { height: 165px; }
  .hero-carousel-section { min-height: 400px; }
}
