/* ============================================================
   programs.css — Missahoe Montessori School
   Uniform with about.css — desktop · tablet · mobile
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: #2d2d2d;
  background: #ffffff;
  line-height: 1.65;
  overflow-x: hidden;
}
a   { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── VARIABLES ── */
:root {
  --teal:    #58d4f0;
  --gold:    #cfa900;
  --gold-dk: #a88200;
  --dark:    #0b3d2e;
  --text:    #444;
  --light:   #f7fbfd;
  --radius:  14px;
  --shadow:  0 8px 32px rgba(0,0,0,0.08);
  --header-h: 70px;
}

/* ── CONTAINER ── */
.container {
  width: 92%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────
   HEADER  (identical to about)
───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(88, 212, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(88, 212, 240, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 92%;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img      { width: 48px; height: 48px; object-fit: contain; }
.logo-name     { display: block; font-size: 1rem; font-weight: 700; color: #1a1a1a; line-height: 1.2; }
.logo-tag      { display: block; font-size: 0.7rem; color: #333; font-weight: 400; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #222;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--gold-dk); }

.btn-enroll {
  background: var(--gold) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.btn-enroll:hover { background: var(--gold-dk) !important; }

/* ─────────────────────────────────────────────
   HAMBURGER  (identical to about)
───────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
  transition: background 0.25s;
}
.hamburger:hover { background: rgba(207,169,0,0.2); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #1a1a1a;
  border-radius: 3px;
  transition: transform 0.38s cubic-bezier(0.23,1,0.32,1),
              opacity   0.25s ease,
              width     0.25s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────
   MOBILE DRAWER  (identical to about)
───────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 300px; max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding: 0 0 30px;
  box-shadow: -6px 0 40px rgba(0,0,0,0.14);
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.23,1,0.32,1);
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.drawer-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}
.drawer-brand img  { width: 38px; }
.drawer-brand span { font-weight: 700; font-size: 0.95rem; color: #1a1a1a; }

.nav-drawer a {
  display: block;
  padding: 13px 24px;
  font-size: 0.97rem; font-weight: 500;
  color: #333;
  opacity: 0; transform: translateX(16px);
  transition: background 0.2s, color 0.2s,
              opacity 0.35s ease, transform 0.35s ease,
              padding-left 0.2s;
}
.nav-drawer.open a                { opacity: 1; transform: translateX(0); }
.nav-drawer.open a:nth-child(2)   { transition-delay: 0.06s; }
.nav-drawer.open a:nth-child(3)   { transition-delay: 0.10s; }
.nav-drawer.open a:nth-child(4)   { transition-delay: 0.14s; }
.nav-drawer.open a:nth-child(5)   { transition-delay: 0.18s; }
.nav-drawer.open a:nth-child(6)   { transition-delay: 0.22s; }
.nav-drawer.open a:nth-child(7)   { transition-delay: 0.26s; }
.nav-drawer.open a:nth-child(8)   { transition-delay: 0.30s; }
.nav-drawer a:hover                { background: #f5fbfe; color: var(--gold); padding-left: 30px; }
.nav-drawer a.active               { color: var(--gold); font-weight: 600; background: rgba(207,169,0,0.07); }

.drawer-enroll {
  margin: 14px 24px 0 !important;
  padding: 13px 24px !important;
  background: var(--gold) !important;
  color: #fff !important;
  border-radius: 10px !important;
  text-align: center !important;
  font-weight: 600 !important;
}
.drawer-enroll:hover { background: var(--gold-dk) !important; padding-left: 24px !important; }

/* ─────────────────────────────────────────────
   HERO  (identical to about)
───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 82vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--header-h);
}

.hero-slides {
  position: absolute; inset: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: #fff;
  padding: 0 20px;
  max-width: 780px;
}
.hero-content h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700; line-height: 1.2;
  margin: 14px 0 16px;
}
.hero-content h1 em { font-style: normal; color: var(--gold); }
.hero-content p {
  font-size: clamp(0.92rem, 1.8vw, 1.1rem);
  opacity: 0.9; max-width: 640px; margin: 0 auto;
}

/* ─────────────────────────────────────────────
   BADGES  (identical to about)
───────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 10px;
}
.badge-gold { background: rgba(207,169,0,0.22); color: #b08f00; }
.badge-teal { background: rgba(88,212,240,0.18); color: #0a8faa; }

/* ─────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────── */
.section     { padding: 80px 0; }
.section-alt { background: var(--light); }

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; color: var(--dark);
  margin: 6px 0 12px;
}
.section-header p {
  color: var(--text); max-width: 560px;
  margin: 0 auto; font-size: 0.97rem;
}

/* ─────────────────────────────────────────────
   PROGRAMS GRID
───────────────────────────────────────────── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Wide card spans full row */
.program-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.program-wide .card-slider { height: 100%; min-height: 280px; }

/* ─────────────────────────────────────────────
   PROGRAM CARD
───────────────────────────────────────────── */
.program-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.38s cubic-bezier(0.23,1,0.32,1),
              box-shadow 0.38s ease;
}
.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 52px rgba(0,0,0,0.13);
}

/* Card image slider */
.card-slider {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  background: #e8f4f8;
}
.card-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.card-slide.active { opacity: 1; }

/* Dot indicators */
.card-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 2;
}
.card-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.card-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Hover accent bar */
.card-slider::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
  z-index: 2;
}
.program-card:hover .card-slider::after { transform: scaleX(1); }

/* Card body */
.card-body {
  padding: 20px 22px 24px;
}
.age-tag {
  display: inline-block;
  background: rgba(88,212,240,0.14);
  color: #0a8faa;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 50px;
  margin-bottom: 10px;
}
.card-body h3 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 10px;
}
.card-body p {
  font-size: 0.86rem; color: var(--text); line-height: 1.65;
}

/* ─────────────────────────────────────────────
   SCROLL ANIMATIONS  (identical to about)
───────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-animate="fade-up"]    { transform: translateY(40px); }
[data-animate="fade-left"]  { transform: translateX(-45px); }
[data-animate="fade-right"] { transform: translateX(45px); }
[data-animate].animated     { opacity: 1; transform: translate(0); }

/* Stagger program cards */
.programs-grid [data-animate].animated:nth-child(2) { transition-delay: 0.10s; }
.programs-grid [data-animate].animated:nth-child(3) { transition-delay: 0.20s; }
.programs-grid [data-animate].animated:nth-child(4) { transition-delay: 0.10s; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: #1c1c1c;
  color: #bbb;
  padding: 28px 0;
  text-align: center;
  font-size: 0.88rem;
}

/* ─────────────────────────────────────────────
   BACK TO TOP  (identical to about)
───────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--gold); color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(207,169,0,0.4);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  pointer-events: none;
}
#back-to-top.show  { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { background: var(--gold-dk); }

/* ═══════════════════════════════════════════
   TABLET  (≤ 960px)
═══════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }

  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .program-wide  {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }
  .program-wide .card-slider { min-height: 240px; }
}

/* ═══════════════════════════════════════════
   MOBILE  (≤ 600px)
═══════════════════════════════════════════ */
@media (max-width: 600px) {
  :root { --header-h: 62px; }

  .logo-tag { display: none; }
  .hero     { height: 72vh; min-height: 420px; }
  .section  { padding: 52px 0; }

  .section-header { margin-bottom: 36px; }

  .programs-grid { grid-template-columns: 1fr; gap: 20px; }
  .program-wide  { grid-template-columns: 1fr; }
  .card-slider   { height: 210px; }

  #back-to-top { bottom: 18px; right: 18px; width: 40px; height: 40px; font-size: 1rem; }
}

/* ═══════════════════════════════════════════
   VERY SMALL  (≤ 380px)
═══════════════════════════════════════════ */
@media (max-width: 380px) {
  .logo-name { font-size: 0.88rem; }
  .card-slider { height: 180px; }
}
