/* =============================================================
   Tutors @ Zwartkop — Complete Brand Design System
   Typography: Blogh (Headings) | Quicksand (Body)
   ============================================================= */

/* --- Local Fonts ---
   font-display: optional
     - Gives the browser a ~100ms window to load the font.
     - If the font is in the preload cache (which it will be via
       <link rel="preload"> in every page's <head>), it is used
       on first paint with NO swap and NO layout shift.
     - If for any reason it misses the window, the browser falls
       back to the system font permanently for that page view —
       no swap, no CLS, no FOUC.
   font-synthesis: none
     - Prevents Firefox from synthesising fake bold/italic
       variants before the real font loads, which causes visual
       glitches and reflow in Firefox specifically.
*/
@font-face {
  font-family: 'Blogh';
  src: url('assets/fonts/Blogh/Blogh.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Quicksand';
  src: url('assets/fonts/Quicksand/Quicksand-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: optional;
}

/* =============================================================
   CSS Variables
   ============================================================= */
:root {
  --color-navy:      #142643;
  --color-light-blue: #C6E4E9;
  --color-teal:      #1AE6C1;
  --color-yellow:    #EEE733;
  --color-green:     #2BB44A;
  --color-white:     #ffffff;
  --color-off-white: #f8fbfc;

  --font-heading: 'Blogh', cursive, display;
  --font-body:    'Quicksand', sans-serif;

  --nav-height: 72px;
  --section-pad: 5rem;
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
  --radius-organic: 255px 15px 225px 15px / 15px 225px 15px 255px;

  --shadow-sm: 0 2px 8px rgba(20, 38, 67, 0.08);
  --shadow-md: 0 6px 24px rgba(20, 38, 67, 0.12);
  --shadow-lg: 0 16px 48px rgba(20, 38, 67, 0.18);

  --transition: 0.25s ease;
}

/* =============================================================
   Reset & Base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-synthesis: none;
  color: var(--color-navy);
  background-color: var(--color-off-white);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-width: 0;
}

img { max-width: 100%; height: auto; display: block; }

/* Prevent overflow from long unbroken strings (emails, URLs) */
p, span, a, li { overflow-wrap: break-word; word-wrap: break-word; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; margin: 0; padding: 0; }

button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* =============================================================
   Typography
   ============================================================= */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: normal;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); }

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  margin: 0 0 0.5em;
}

h4 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  font-style: italic;
  border-left: 4px solid var(--color-teal);
  padding-left: 1.25rem;
  margin: 1rem 0;
  color: var(--color-navy);
}

/* =============================================================
   Layout
   ============================================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: var(--section-pad) 0; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 0.5rem;
}

.section-header h2 { margin-bottom: 0.75rem; }

.section-header p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
  color: var(--color-navy);
  opacity: 0.8;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* =============================================================
   Background Utilities
   ============================================================= */
.bg-navy        { background-color: var(--color-navy);       color: var(--color-light-blue); }
.bg-light-blue  { background-color: var(--color-light-blue); color: var(--color-navy); }
.bg-teal        { background-color: var(--color-teal);       color: var(--color-navy); }
.bg-yellow      { background-color: var(--color-yellow);     color: var(--color-navy); }
.bg-green       { background-color: var(--color-green);      color: var(--color-white); }
.bg-white       { background-color: var(--color-white);      color: var(--color-navy); }
.bg-off-white   { background-color: var(--color-off-white);  color: var(--color-navy); }

.text-navy   { color: var(--color-navy); }
.text-teal   { color: var(--color-teal); }
.text-yellow { color: var(--color-yellow); }
.text-green  { color: var(--color-green); }
.text-white  { color: var(--color-white); }

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition: transform var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: scale(1.04); }

.btn-primary {
  background-color: var(--color-yellow);
  color: var(--color-navy);
}
.btn-primary:hover { background-color: var(--color-teal); }

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-outline:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn-teal {
  background-color: var(--color-teal);
  color: var(--color-navy);
}
.btn-teal:hover { background-color: var(--color-yellow); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* =============================================================
   Navigation
   ============================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: var(--color-navy);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(20, 38, 67, 0.4);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(198, 228, 233, 0.85);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu .nav-cta {
  background-color: var(--color-yellow);
  color: var(--color-navy);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  margin-left: 0.5rem;
}

.nav-menu .nav-cta:hover {
  background-color: var(--color-teal);
  color: var(--color-navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================================
   Navbar Placeholder
   Reserves the correct space and colour while the nav partial
   is being fetched + injected by JS. Eliminated on repeat visits
   because the service worker serves the partial from cache instantly.
   ============================================================= */
.navbar-placeholder {
  height: var(--nav-height);
  background-color: var(--color-navy);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}

/* =============================================================
   Page Offset (below fixed nav)
   ============================================================= */
.page-content { padding-top: var(--nav-height); }

/* =============================================================
   Hero — Homepage (full screen)
   ============================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero.loaded .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(20, 38, 67, 0.82) 0%,
    rgba(20, 38, 67, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 3rem 2rem;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(26, 230, 193, 0.4);
  border-radius: var(--radius-pill);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(198, 228, 233, 0.9);
  margin-bottom: 2rem;
  max-width: 560px;
}

/* =============================================================
   Hero — Inner Pages (shorter)
   ============================================================= */
.page-hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  background-color: var(--color-navy);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero h1 { color: var(--color-white); margin-bottom: 0.5rem; }
.page-hero .page-hero-sub {
  font-size: 1.1rem;
  color: rgba(198, 228, 233, 0.85);
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--color-teal); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* =============================================================
   Wave Dividers
   ============================================================= */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
}

/* =============================================================
   Feature Strip
   ============================================================= */
.feature-strip {
  background-color: var(--color-navy);
  padding: 0;
}

.feature-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.feature-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(198, 228, 233, 0.1);
  transition: background-color var(--transition);
}

.feature-item:last-child { border-right: none; }

.feature-item:hover { background-color: rgba(255,255,255,0.05); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-item h4 {
  color: var(--color-white);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.feature-item p {
  color: rgba(198, 228, 233, 0.7);
  font-size: 0.875rem;
  margin: 0;
}

/* =============================================================
   Info Cards
   ============================================================= */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-body { padding: 1.75rem; }
.card-body h3 { margin-bottom: 0.75rem; }

.card-accent-top {
  height: 5px;
}

/* Organic decorative box */
.organic-box {
  border: 3px solid var(--color-navy);
  border-radius: var(--radius-organic);
  padding: 2rem;
  background-color: var(--color-light-blue);
}

/* Belangrike Inligting badges */
.info-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-navy);
  border-left: 4px solid var(--color-teal);
}

.info-badge-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* =============================================================
   Team / Tutor Cards
   ============================================================= */
.tutor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.tutor-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tutor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tutor-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.75rem 0;
  background-color: transparent;
}

.tutor-photo img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.tutor-info {
  padding: 1.75rem;
  flex: 1;
}

.tutor-info h3 { margin-bottom: 0.25rem; }

.tutor-grade-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  max-width: 100%;
  overflow-wrap: break-word;
}

.tutor-info p { font-size: 0.925rem; color: rgba(20, 38, 67, 0.8); }

.tutor-quote {
  font-style: italic;
  border-left: 3px solid var(--color-teal);
  padding-left: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(20, 38, 67, 0.7);
}

/* =============================================================
   Scripture / Quote Section
   ============================================================= */
.quotes-section {
  background-color: var(--color-navy);
  position: relative;
  overflow: hidden;
}

.quotes-section::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 2rem;
  font-family: var(--font-heading);
  font-size: 18rem;
  color: rgba(26, 230, 193, 0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.quote-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(198, 228, 233, 0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--color-teal);
  opacity: 0.4;
  line-height: 1;
}

.quote-card p {
  font-style: italic;
  color: rgba(198, 228, 233, 0.9);
  font-size: 0.975rem;
  margin-bottom: 1rem;
}

.quote-card cite {
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-teal);
  text-transform: uppercase;
}

/* =============================================================
   Activity / Extracurricular Cards
   ============================================================= */
.activity-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--color-white);
  transition: transform var(--transition), box-shadow var(--transition);
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.activity-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.activity-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.activity-card:hover .activity-card-image img { transform: scale(1.05); }

.activity-card-body {
  padding: 1.5rem;
}

.activity-card-body h3 { margin-bottom: 0.5rem; }

.activity-card-body p {
  font-size: 0.9rem;
  color: rgba(20, 38, 67, 0.75);
}

.activity-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-green);
  transition: gap var(--transition);
}

.activity-link:hover { gap: 0.6rem; }

/* =============================================================
   Hours / Info Strip
   ============================================================= */
.hours-strip {
  background-color: var(--color-teal);
  padding: 3rem 0;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.hours-item h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.7;
  color: var(--color-navy);
}

.hours-item p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

.hours-item .detail {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.75;
}

/* =============================================================
   CTA Banner
   ============================================================= */
.cta-banner {
  background-color: var(--color-green);
  padding: 4rem 0;
  text-align: center;
}

.cta-banner h2 { color: var(--color-white); }
.cta-banner p  { color: rgba(255,255,255,0.85); margin-bottom: 2rem; font-size: 1.05rem; }

/* =============================================================
   Gallery Preview (Homepage)
   ============================================================= */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 220px 220px;
  gap: 0.75rem;
}

.gallery-preview-grid .gallery-preview-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-preview-grid .gallery-preview-item:first-child {
  grid-row: 1 / 3;
  grid-column: 1;
}

.gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-preview-item:hover img { transform: scale(1.06); }

/* =============================================================
   Gallery Page — Full Grid
   ============================================================= */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-navy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-navy);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  aspect-ratio: 1;
  background-color: var(--color-light-blue);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,38,67,0.7), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.gallery-item.hidden {
  display: none;
}

/* =============================================================
   Lightbox
   ============================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 18, 35, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition);
  z-index: 10000;
}

.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition);
  z-index: 10000;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.28); }

.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  z-index: 10000;
}

.lightbox-counter {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  z-index: 10000;
}

/* =============================================================
   Contact Page
   ============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-card {
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--color-light-blue);
}

.contact-info-card h3 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail-text h4 {
  color: var(--color-teal);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.contact-detail-text p, .contact-detail-text a {
  color: rgba(198, 228, 233, 0.9);
  font-size: 0.95rem;
  margin: 0;
}

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 350px;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================================
   Contact Form
   ============================================================= */
.form-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--color-navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(20, 38, 67, 0.15);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-navy);
  background: var(--color-off-white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-teal);
  background: var(--color-white);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* =============================================================
   Calendar Page
   ============================================================= */
.calendar-embed-wrapper {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.calendar-embed-wrapper iframe {
  width: 100%;
  height: 700px;
  border: none;
  display: block;
}

.calendar-notice {
  background: var(--color-light-blue);
  border-left: 4px solid var(--color-teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* =============================================================
   Admissions Page
   ============================================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-yellow);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-card h4 { margin-bottom: 0.5rem; }
.step-card p { font-size: 0.9rem; color: rgba(20,38,67,0.75); }

/* =============================================================
   Curriculum Section
   ============================================================= */
.curriculum-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
  gap: 2rem;
}

.curriculum-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.curriculum-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.curriculum-card h3 { color: var(--color-white); margin-bottom: 0.5rem; }
.curriculum-card .grade-range {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.2);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.curriculum-card p { color: rgba(255,255,255,0.85); font-size: 0.925rem; }

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subject-tag {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 600;
}

/* =============================================================
   Footer
   ============================================================= */
.footer {
  background-color: var(--color-navy);
  color: rgba(198, 228, 233, 0.8);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  height: 56px;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
  opacity: 0.75;
}

.footer-col h5 {
  color: var(--color-white);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  opacity: 0.75;
  transition: opacity var(--transition), color var(--transition);
}

.footer-col ul a:hover {
  opacity: 1;
  color: var(--color-teal);
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-contact-item .icon {
  width: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-teal);
}

.footer-bottom {
  border-top: 1px solid rgba(198, 228, 233, 0.1);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* =============================================================
   Scroll Animations
   ============================================================= */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* =============================================================
   Affiliate Section
   ============================================================= */
.affiliate-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition);
}

.affiliate-card:hover { transform: translateY(-4px); }
.affiliate-card h4 { margin-bottom: 0.5rem; }
.affiliate-card p { font-size: 0.9rem; color: rgba(20,38,67,0.7); }
.affiliate-card a { color: var(--color-green); font-weight: 700; }

/* =============================================================
   Responsive — Tablet (max 900px)
   ============================================================= */
@media (max-width: 900px) {
  :root { --section-pad: 3.5rem; }

  .nav-container { padding: 0 1.25rem; }
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background-color: var(--color-navy);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-menu a {
    padding: 0.9rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-menu .nav-cta {
    margin: 1rem 2rem;
    text-align: center;
    border-radius: var(--radius-pill);
  }

  .feature-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .feature-item { border-right: none; border-bottom: 1px solid rgba(198, 228, 233, 0.1); }

  .grid-3, .quotes-grid, .steps-grid { grid-template-columns: 1fr 1fr; }
  .grid-4, .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .tutor-grid { grid-template-columns: 1fr 1fr; }

  .curriculum-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .gallery-preview-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery-preview-grid .gallery-preview-item:first-child { grid-row: auto; grid-column: auto; }

  .hours-grid { grid-template-columns: 1fr; gap: 1rem; }

  .page-hero { padding: 4rem 0 3rem; }
  .cta-banner { padding: 3rem 1.5rem; }

  /* Quick contact tiles — remove right borders, add bottom borders */
  .grid-4 > div {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .grid-4 > div:last-child { border-bottom: none; }
}

/* =============================================================
   Responsive — Mobile (max 600px)
   ============================================================= */
@media (max-width: 600px) {
  :root { --section-pad: 2.5rem; }

  .container { padding: 0 1.25rem; }
  .nav-container { padding: 0 1rem; }

  .grid-2, .grid-3, .grid-4,
  .tutor-grid, .quotes-grid,
  .steps-grid, .curriculum-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .gallery-preview-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery-preview-grid .gallery-preview-item:first-child {
    grid-row: auto;
    grid-column: auto;
  }

  .feature-strip-inner { grid-template-columns: 1fr; }

  .info-badges { grid-template-columns: 1fr; gap: 0.75rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .hero-content { padding: 2rem 1.25rem; }
  .hero-slogan { font-size: 1.1rem !important; }
  .hero-sub-slogan { font-size: 0.75rem !important; }
  .hero-content .fade-up img { max-height: 100px !important; }
  .page-hero { padding: 3rem 0 2.5rem; }

  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 1.5rem; }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.75rem;
  }
  .footer-brand img { max-height: 90px; }
  .footer-grid { gap: 2rem; }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn-group .btn { width: 100%; justify-content: center; }

  .lightbox { padding: 1rem; }
  .lightbox-prev { left: 0.5rem; width: 40px; height: 40px; }
  .lightbox-next { right: 0.5rem; width: 40px; height: 40px; }

  .calendar-embed-wrapper iframe { height: 450px; min-height: 350px; }

  .cta-banner { padding: 2.5rem 1rem; }
  .cta-banner h2 { font-size: 1.5rem; }
  .cta-banner p { font-size: 0.95rem; margin-bottom: 1.5rem; }

  /* Calendar tips stack on mobile */
  .calendar-tip { flex-direction: column; text-align: center; }

  /* About page stats boxes stack on mobile */
  .mission-stats { grid-template-columns: 1fr !important; }
}

/* =============================================================
   Responsive — Extra small (max 400px)
   ============================================================= */
@media (max-width: 400px) {
  .container { padding: 0 1rem; }
  .nav-container { padding: 0 0.75rem; }

  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-filters { flex-direction: column; }
  .filter-btn { width: 100%; }

  .tutor-grade-tag { font-size: 0.7rem; padding: 0.2rem 0.5rem; }

  .hero h1 { font-size: 1.75rem; }
  .hero-subtitle, .page-hero-sub { font-size: 0.95rem; }

  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: 0.95rem; }

  .map-embed { height: 280px; }
  .calendar-embed-wrapper iframe { height: 400px; }

  .term-info-block { flex-direction: column !important; }
}

/* =============================================================
   View Transition API
   Animates old page out and new page in on same-site navigation.
   Falls back gracefully in Firefox / older Safari (no animation, instant nav).
   ============================================================= */
@keyframes vt-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

::view-transition-old(root) {
  animation: 200ms ease-in vt-fade-out both;
}

::view-transition-new(root) {
  animation: 320ms ease-out vt-fade-in both;
}

/* Reduce motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
