/* ============================================
   Enchanting Math Academy - Modern Design System
   Color scheme derived from go.enchanting-math-academy.com
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Primary Palette */
  --color-deep-blue: #053775;
  --color-dark-navy: #031D3D;
  --color-mid-blue: #3174C4;
  --color-light-blue: #74b9ff;
  --color-bright-blue: #0984e3;

  /* Accent / CTA */
  --color-gold: #F5CC2C;
  --color-orange: #ED9011;
  --color-red-accent: #ff6b6b;
  --color-red-dark: #ee5a24;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #f8f9fa;
  --color-light-gray: #e9ecef;
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-light: #999999;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #053775 0%, #031D3D 100%);
  --gradient-cta: linear-gradient(45deg, #F5CC2C, #ED9011);
  --gradient-blue-btn: linear-gradient(135deg, #74b9ff, #0984e3);
  --gradient-dark-btn: linear-gradient(45deg, #3174C4, #072952);
  --gradient-underline: linear-gradient(45deg, #ff6b6b, #ee5a24);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.1);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Typography */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --border-radius-pill: 50px;
  --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-dark-navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--color-mid-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-bright-blue);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: 1.5rem;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2rem 0;
  }
}

.section--dark {
  background: var(--gradient-hero);
  color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section--light {
  background-color: var(--color-off-white);
}

.text-center { text-align: center; }
.text-white { color: var(--color-white); }

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-underline);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

.section--dark .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--primary {
  background: var(--gradient-cta);
  color: var(--color-white);
}

.btn--primary:hover {
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(237, 144, 17, 0.4);
}

.btn--secondary {
  background: var(--gradient-blue-btn);
  color: var(--color-white);
}

.btn--secondary:hover {
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(9, 132, 227, 0.4);
}

.btn--dark {
  background: var(--gradient-dark-btn);
  color: var(--color-white);
}

.btn--dark:hover {
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--sm {
  padding: 12px 36px;
  font-size: 1rem;
}

.btn--lg {
  padding: 18px 42px;
  font-size: 1.1rem;
}

/* --- Header / Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(3, 29, 61, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(3, 29, 61, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar__brand img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  border-radius: 6px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.navbar__links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-cta);
  transition: width 0.3s ease;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--color-white);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

/* Dropdown */
.navbar__has-dropdown {
  position: relative;
}

.navbar__arrow {
  font-size: 0.7rem;
  margin-left: 3px;
  opacity: 0.7;
  transition: transform 0.25s ease;
  display: inline-block;
}

.navbar__has-dropdown:hover .navbar__arrow {
  transform: rotate(180deg);
}

.navbar__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(3, 29, 61, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0;
  list-style: none;
  min-width: 210px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 200;
  /* Small top padding gives visual breathing room without creating a hover gap */
  padding-top: 10px;
}

/* Bridge gap so cursor can travel from link to dropdown without losing hover */
.navbar__has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.navbar__dropdown li {
  width: 100%;
}

.navbar__dropdown a {
  display: block;
  padding: 10px 20px !important;
  font-size: 0.88rem !important;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.navbar__dropdown li:last-child a {
  border-bottom: none !important;
}

.navbar__dropdown a::after {
  display: none !important;
}

.navbar__has-dropdown:hover .navbar__dropdown,
.navbar__has-dropdown:focus-within .navbar__dropdown {
  display: block;
}

.navbar__cta {
  margin-left: 1rem;
}

.navbar__cta a.btn {
  padding: 12px 36px;
  color: var(--color-dark-navy);
}

.navbar__cta a.btn:hover {
  color: var(--color-dark-navy);
}

.navbar__cta a.btn::after {
  display: none;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  margin: 6px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(3, 29, 61, 0.98);
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__links li {
    width: 100%;
  }

  .navbar__links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar__cta {
    margin-left: 0;
    margin-top: var(--space-sm);
    width: auto;
    display: flex;
    justify-content: flex-start;
  }

  .navbar__cta a.btn {
    width: auto;
    display: inline-flex;
  }

  .navbar__toggle {
    display: block;
  }

  /* Mobile dropdown — inline */
  .navbar__dropdown {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.04);
    padding: 0;
    margin: 0 0 4px 12px;
  }

  .navbar__dropdown a {
    font-size: 0.85rem !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  }

  .navbar__arrow {
    display: none;
  }
}

/* --- Hero Section --- */
.hero {
  background: var(--gradient-hero);
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(116, 185, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 204, 44, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-2xl);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero__logo-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__classroom-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .hero__classroom-img {
    max-width: 340px;
    height: 260px;
  }
}

.hero__badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-pill);
  padding: 8px 20px;
  font-size: 0.9rem;
  color: var(--color-gold);
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

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

.hero__stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-gold);
  display: block;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 100px 0 48px;
  }

  .hero__layout {
    grid-template-columns: 1fr;
  }
  .hero__logo-col {
    display: none;
  }
  .hero__stats {
    gap: var(--space-lg);
  }

  .hero__stat-number {
    font-size: 1.5rem;
  }
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .card {
    padding: 1.25rem;
  }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--icon-left {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.1rem;
}

.card--icon-left .card__icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.card--icon-left .card__body {
  flex: 1;
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-md);
}

.card h3 {
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-mid-blue);
}

.card__link:hover {
  gap: 10px;
}

/* Dark cards (for dark sections) */
.section--dark .card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.section--dark .card:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.section--dark .card h3 {
  color: var(--color-white);
}

.section--dark .card p {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Feature / Program Cards --- */
.program-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.program-card__image {
  height: 220px;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}

.program-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.program-card:hover .program-card__image img {
  transform: scale(1.05);
}

.program-card__body {
  padding: var(--space-lg);
}

.program-card__tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.08), rgba(5, 55, 117, 0.04));
  color: var(--color-deep-blue);
  padding: 4px 14px;
  border-radius: var(--border-radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.program-card__body h3 {
  margin-bottom: var(--space-xs);
}

.program-card__body p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.program-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-light-gray);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* --- Testimonials --- */
.testimonial-trust-badge {
  font-weight: 600;
  color: var(--color-mid-blue);
  font-size: 1rem;
  margin-top: 0.25rem;
}

.tcarousel {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.tcarousel__track {
  position: relative;
  min-height: 260px;
}

.tcarousel__slide {
  display: none;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-card);
  border-left: 5px solid var(--color-dark-navy);
  animation: slideIn 0.4s ease;
}

.tcarousel__slide.active {
  display: block;
}

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

.tcarousel__stars {
  color: #f5a623;
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.tcarousel__text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.tcarousel__author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tcarousel__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-blue-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tcarousel__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-dark-navy);
}

.tcarousel__role {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.tcarousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.tcarousel__btn {
  background: var(--color-dark-navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.tcarousel__btn:hover {
  background: var(--color-mid-blue);
}

.tcarousel__dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tcarousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--color-light-gray);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.tcarousel__dot.active {
  background: var(--color-dark-navy);
  transform: scale(1.3);
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--gradient-hero);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cta-banner {
    padding: 2rem 1.25rem;
  }
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 204, 44, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  position: relative;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
  font-size: 1.1rem;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-light-gray);
  border-radius: var(--border-radius);
  background: var(--color-white);
  color: var(--color-text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-mid-blue);
  box-shadow: 0 0 0 3px rgba(49, 116, 196, 0.15);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Footer --- */
.footer {
  background: var(--color-dark-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  text-decoration: none;
}

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer__social a:hover {
  background: var(--gradient-cta);
  color: var(--color-white);
}

.footer h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
  padding: 0;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer__links a:hover {
  color: var(--color-white);
}

.footer__bottom {
  padding: var(--space-md) 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Popup / Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  max-width: 520px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
  transition: var(--transition);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal__close:hover {
  background: var(--color-light-gray);
  color: var(--color-text-primary);
}

.modal h2 {
  margin-bottom: var(--space-sm);
}

.modal p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.modal__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #023068;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
  color: #ffffff;
}

.modal__option:hover {
  border-color: var(--color-mid-blue);
  background: #052d5e;
}

.modal__option span:first-child {
  font-size: 1.4rem;
}

/* --- Page Header / Breadcrumb --- */
.page-header {
  background: var(--gradient-hero);
  padding: 110px 0 48px;
  text-align: center;
}

@media (max-width: 768px) {
  .page-header {
    padding: 90px 0 36px;
  }
}

.page-header h1 {
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-sm);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a:hover {
  color: var(--color-white);
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb .current {
  color: var(--color-gold);
}

/* --- Contact Info --- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.contact-info__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.08), rgba(5, 55, 117, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-info__text h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.contact-info__text p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* --- Timeline (for process/steps) --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-light-gray);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-cta);
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

.timeline__item h3 {
  margin-bottom: var(--space-xs);
}

.timeline__item p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* --- FAQ / Accordion --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion__item {
  border: 1px solid var(--color-light-gray);
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  background: var(--color-white);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-text-primary);
  transition: var(--transition);
}

.accordion__trigger:hover {
  background: var(--color-off-white);
}

.accordion__trigger::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-text-light);
  transition: var(--transition);
}

.accordion__item.active .accordion__trigger::after {
  content: '\2212';
  color: var(--color-mid-blue);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion__content__inner {
  padding: 0 20px 20px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--gradient-dark-btn);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* --- Loading / Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--color-light-gray) 25%, var(--color-off-white) 50%, var(--color-light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Toast / Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-dark-navy);
  color: var(--color-white);
  padding: 14px 28px;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transition: transform 0.3s ease;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.toast--success {
  border-left: 4px solid #27ae60;
}

.toast--error {
  border-left: 4px solid #e74c3c;
}

/* --- Image Panels --- */
.img-panel {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
}

.img-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-panel--tall {
  height: 320px;
}

.img-panel--medium {
  height: 300px;
}

.img-panel--overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 55, 117, 0.15) 0%, rgba(3, 29, 61, 0.4) 100%);
  pointer-events: none;
}

/* Hero with background image */
.hero--img {
  position: relative;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.92) 0%, rgba(3, 29, 61, 0.88) 100%);
}

/* Page header with background image */
.page-header {
  position: relative;
  overflow: hidden;
}

.page-header__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.page-header__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.9) 0%, rgba(3, 29, 61, 0.85) 100%);
}

.page-header > *:not(.page-header__bg) {
  position: relative;
  z-index: 1;
}

/* Two-column layout helper */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split--reverse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* On desktop: text is first in DOM but should appear on the right; image on left */
.split--reverse > *:first-child {
  order: 2;
}

.split--reverse > *:last-child {
  order: 1;
}

@media (max-width: 768px) {
  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }

  /* On mobile: reset order so DOM order is followed (text first, image second) */
  .split--reverse > *:first-child,
  .split--reverse > *:last-child {
    order: unset;
  }

  /* On mobile: for .split sections, hoist image above text */
  .split .img-panel {
    order: -1;
  }

  .img-panel--tall {
    height: 220px;
  }

  .split,
  .split--reverse {
    gap: 1.5rem;
  }
}

/* --- Middle & High School inline grid mobile fix --- */
/* Overrides hardcoded grid-template-columns on the track/subject boxes */
@media (max-width: 768px) {
  /* 3-col track grid (middle school math/ELA subject boxes) */
  .split > div > div[style*="repeat(3, 1fr)"],
  .split > div > div[style*="repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* 2-col list grid (high school math topics) */
  .split > div > div[style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Unpin fixed-width image panels set inline (e.g. flex: 0 0 340px) */
  .split .img-panel[style*="flex: 0 0"] {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}

/* Stats grid — 4 columns on desktop, wraps on mobile */
.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

/* --- "NEW" blinking badge --- */
.badge-new {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-dark-navy);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--border-radius-pill);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
  animation: blink-new 1.2s ease-in-out infinite;
}

@keyframes blink-new {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* --- Enrollment form mobile fix --- */
@media (max-width: 768px) {
  .enrollment-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .enrollment-card {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  .enrollment-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .enrollment-card {
    padding: 0.5rem !important;
    border-radius: 0.5rem !important;
  }
}

/* --- Calendly widget mobile fix --- */
@media (max-width: 768px) {
  .calendly-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .calendly-card {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  .calendly-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .calendly-card {
    padding: 0.5rem !important;
    border-radius: 0.5rem !important;
  }
}

/* --- Calendly embed responsive height --- */
.calendly-iframe {
  height: 900px;
}

@media (max-width: 768px) {
  .calendly-iframe {
    height: 1100px;
  }
}

@media (max-width: 480px) {
  .calendly-iframe {
    height: 1200px;
  }
}

/* Footer logo */
.footer__brand img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 4px;
}

/* ============================================
   Camp-specific styles (camps.html)
   ============================================ */

.camp-hero-badge {
  background: linear-gradient(45deg, #F5CC2C, #ED9011);
  color: var(--color-dark-navy);
  font-weight: 700;
}

.camps-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.camp-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  border-top: 4px solid transparent;
}

.camp-card:nth-child(1) { border-top-color: #0984e3; }
.camp-card:nth-child(2) { border-top-color: #6c5ce7; }
.camp-card:nth-child(3) { border-top-color: #00b894; }
.camp-card:nth-child(4) { border-top-color: #e17055; }
.camp-card:nth-child(5) { border-top-color: #fdcb6e; }

.camp-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.camp-card__header {
  padding: var(--space-lg);
  padding-bottom: var(--space-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.camp-card__emoji {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.08), rgba(5, 55, 117, 0.04));
}

.camp-card__title-area h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.camp-card__tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(5, 55, 117, 0.08), rgba(5, 55, 117, 0.04));
  color: var(--color-deep-blue);
  padding: 3px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.camp-card__body {
  padding: 0 var(--space-lg) var(--space-lg);
}

.camp-card__body p {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  margin-bottom: var(--space-sm);
}

/* Schedule table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}

.schedule-table th {
  background: var(--color-off-white);
  color: var(--color-text-secondary);
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-light-gray);
  color: var(--color-text-primary);
  vertical-align: top;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table .grade-badge {
  display: inline-block;
  background: var(--gradient-blue-btn);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.schedule-table .dates {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

/* Detail sections */
.camp-detail {
  scroll-margin-top: 90px;
}

.camp-detail__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--space-md);
}

.camp-detail__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.icon--blue   { background: linear-gradient(135deg, rgba(9,132,227,0.15), rgba(9,132,227,0.05)); }
.icon--purple { background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(108,92,231,0.05)); }
.icon--green  { background: linear-gradient(135deg, rgba(0,184,148,0.15), rgba(0,184,148,0.05)); }
.icon--orange { background: linear-gradient(135deg, rgba(225,112,85,0.15), rgba(225,112,85,0.05)); }
.icon--yellow { background: linear-gradient(135deg, rgba(253,203,110,0.3), rgba(253,203,110,0.1)); }

.highlights-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 var(--space-md);
}

.highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.highlights-list li::before {
  content: '✓';
  color: #00b894;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Full schedule section */
.full-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.full-schedule-table th {
  background: var(--gradient-hero);
  color: var(--color-white);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
}

.full-schedule-table th:first-child { border-radius: 8px 0 0 0; }
.full-schedule-table th:last-child  { border-radius: 0 8px 0 0; }

.full-schedule-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-light-gray);
  vertical-align: middle;
}

.full-schedule-table tr:last-child td {
  border-bottom: none;
}

.full-schedule-table tr:nth-child(even) td {
  background: var(--color-off-white);
}

.full-schedule-table .camp-name {
  font-weight: 600;
  color: var(--color-dark-navy);
}

.full-schedule-table .month-june { color: #0984e3; font-weight: 600; }
.full-schedule-table .month-july { color: #6c5ce7; font-weight: 600; }

.grade-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 2px;
}

.grade-1  { background: #dff9fb; color: #00a8c6; }
.grade-2  { background: #e8f5e9; color: #2e7d32; }
.grade-3  { background: #fff3e0; color: #e65100; }
.grade-4  { background: #f3e5f5; color: #7b1fa2; }
.grade-5  { background: #fce4ec; color: #c62828; }

/* Anchor nav tabs */
.camp-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.camp-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-pill);
  background: var(--color-white);
  border: 2px solid var(--color-light-gray);
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.camp-tab:hover,
.camp-tab.active {
  background: var(--color-deep-blue);
  color: var(--color-white);
  border-color: var(--color-deep-blue);
}

/* Enrollment CTA inside detail cards */
.enroll-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-light-gray);
  margin-top: var(--space-sm);
}

.enroll-row .seats-note {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.seats-note strong {
  color: #e17055;
}

@media (max-width: 768px) {
  .camps-overview {
    grid-template-columns: 1fr;
  }
  .full-schedule-table {
    font-size: 0.8rem;
  }
  .full-schedule-table th,
  .full-schedule-table td {
    padding: 10px 10px;
  }
}
