/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-light: #06b6d4;
  --color-violet: #8b5cf6;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-rose: #f43f5e;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-surface: rgba(255, 255, 255, 0.7);
  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-hover: rgba(59, 130, 246, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HIGHLIGHT TEXT ===== */
.highlight-inline {
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== PROGRAM HEADER ===== */
.program-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e1b4b 50%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.program-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.program-header > .container {
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.back-link:hover {
  color: #fff;
}

.program-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.program-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.6);
  max-width: 700px;
}

/* ===== STATS ===== */
.program-stats {
  background: var(--color-bg-alt);
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-accent), var(--color-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ===== PROGRAM MAIN ===== */
.program-main {
  padding: 60px 0 80px;
}

/* ===== MODULES ===== */
.module {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.module:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-border-hover);
}

/* Module headers — unified style with white text */
.module-header {
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e293b 100%);
}

.module-header h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.module-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
  background: var(--color-bg);
}

.module-body:not(.collapsed) {
  max-height: 5000px;
  padding: 32px;
}

/* ===== CHAPTER GROUPS ===== */
.chapter-group {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition);
}

.chapter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.chapter-group:hover {
  transform: translateX(4px);
}

.chapter-group h3 {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-primary);
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chapter-group h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  margin-right: 12px;
  margin-bottom: 2px;
  border-radius: 2px;
  vertical-align: middle;
  background: var(--color-accent);
}

.chapter-desc {
  color: var(--color-text-secondary);
  font-size: clamp(0.9rem, 2vw, 0.98rem);
  line-height: 1.75;
  margin: 0;
  padding-left: 16px;
}

/* ===== CTA ===== */
.program-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e1b4b 50%, var(--color-primary-light) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.program-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.program-cta > .container {
  position: relative;
  z-index: 1;
}

.program-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 36px;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-violet) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.45);
  color: #fff;
}

.btn-large {
  padding: 20px 48px;
  font-size: 1.15rem;
  border-radius: var(--radius);
}

/* ===== NOTE ===== */
.program-note {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
  text-align: center;
}

.note-text {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ===== FOOTER ===== */
.program-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  text-align: center;
}

.program-footer p {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .program-header {
    padding: 100px 0 70px;
  }

  .module-header {
    padding: 28px 36px;
  }

  .module-body:not(.collapsed) {
    padding: 36px;
  }
}

@media (min-width: 1024px) {
  .program-main {
    padding: 80px 0 100px;
  }
}

@media (max-width: 480px) {
  .program-header {
    padding: 60px 0 40px;
  }

  .stats-grid {
    gap: 32px;
  }

  .module-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
  }

  .toggle-btn {
    width: 100%;
    text-align: center;
  }

  .module-body:not(.collapsed) {
    padding: 24px 20px;
  }

  .chapter-group h3 {
    font-size: 1rem;
  }

  .program-cta {
    padding: 60px 0;
  }
}

/* Focus styles */
.btn:focus-visible,
.toggle-btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
