/* ==============================================================
   FreDil — Unified Master Homepage Design System
   Source of visual truth matching Admin Panel exactly:
   Palette: Navy (#0B1739) + Primary Blue (#1A4FE8) + Restrained Accent Red (#E53945)
   Typography: Montserrat (Headings & UI) + Space Mono
   ============================================================== */

@import url('../fonts/montserrat.css');

[x-cloak] {
  display: none !important;
}

:root {
  /* Brand Palette (Identical to Admin Panel fredil.css) */
  --ink: #0B1739;
  --ink-deep: #060D24;
  --ink-soft: #64748B;
  --ink-muted: #94A3B8;
  --ink-subtle: #94A3B8;
  --paper: #FFFFFF;
  --paper-alt: #F8FAFC;
  --paper-soft: #F3F7FF;
  --line: #E2E8F0;
  --line-subtle: #EDF2F7;
  --border: #E2E8F0;
  --border-subtle: #EDF2F7;

  /* Primary Blue Tokens */
  --primary: #1A4FE8;
  --primary-dark: #1237A8;
  --teal: #1A4FE8;
  --teal-modern: #2563EB;
  --teal-soft: #E8EFFF;
  --teal-glow: rgba(26, 79, 232, 0.16);
  --teal-dark: #1237A8;
  --navy: #0B1739;
  --navy-deep: #060D24;

  /* Accent Red (Restrained highlights, live indicators, alerts) */
  --amber: #E53945;
  --amber-soft: #FFF1F2;
  --amber-deep: #C62836;
  --accent: #E53945;
  --accent-soft: #FFF1F2;

  /* Typography */
  --font-serif: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', 'JetBrains Mono', monospace;

  /* Layout & Elevations */
  --maxw: 1440px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 4px 14px rgba(11, 23, 57, 0.05);
  --shadow-md: 0 12px 32px -16px rgba(26, 79, 232, 0.14);
  --shadow-lg: 0 24px 50px -20px rgba(11, 23, 57, 0.22);
}

/* ==============================================================
   BASE & RESETS
   ============================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.fredil-home {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.025em;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ==============================================================
   HEADER (72px Sticky, Refined Surfaces)
   ============================================================== */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

body.public-site {
  padding-top: 80px;
}

@media (max-width: 860px) {
  body.public-site {
    padding-top: 64px;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
}

/* Refined Brand Logo Mark */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(26, 79, 232, 0.28);
  flex-shrink: 0;
}

/* Nav Links */
nav.nav-center ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.4vw, 40px);
  margin: 0;
  padding: 0;
}

nav.nav-center ul li a {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 0;
  position: relative;
  transition: color 0.18s ease;
}

nav.nav-center ul li a:hover,
nav.nav-center ul li a:focus-visible {
  color: var(--teal);
}

nav.nav-center ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--teal);
  border-radius: 2px;
  transition: width 0.2s ease;
}

nav.nav-center ul li a:hover::after {
  width: 100%;
}

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 26px);
}

/* Compact Language Switcher */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.active {
  background: var(--ink);
  color: #FFFFFF;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 18px -4px rgba(26, 79, 232, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -4px rgba(26, 79, 232, 0.38);
}

.btn-secondary {
  background: var(--teal-soft);
  color: var(--primary);
  border: 1.5px solid var(--teal-soft);
  box-shadow: 0 2px 8px rgba(26, 79, 232, 0.08);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(26, 79, 232, 0.25);
}

.btn-ghost {
  background: var(--teal-soft);
  color: var(--primary);
  border: 1.5px solid var(--teal-soft);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-nav-login {
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 0.88rem;
  background: var(--primary);
  color: #FFFFFF;
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 12px rgba(26, 79, 232, 0.22);
}

.btn-nav-login:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(26, 79, 232, 0.32);
}

/* Language Switcher Pill */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--paper-soft, #EEF2F5);
  border: 1px solid var(--line, #DEE5EA);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-switch a {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.74rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft, #627089);
  transition: all 0.2s ease;
  line-height: 1;
  text-decoration: none;
  display: inline-block;
}

.lang-switch a:hover {
  color: var(--navy);
}

.lang-switch a.active {
  background: var(--navy) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(11, 23, 57, 0.22);
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: all 0.2s ease;
}

/* ==============================================================
   HERO SECTION (Left: Content, Right: Signature CEFR Card)
   ============================================================== */
.hero {
  padding: 96px 0 60px;
  background: radial-gradient(1000px 520px at 85% -12%, var(--teal-soft) 0%, transparent 60%), #FFFFFF;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(26, 79, 232, 0.18);
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

h1.headline {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

h1.headline em {
  font-style: normal;
  color: var(--teal);
}

.hero p.lead {
  margin: 0;
  font-size: 1.14rem;
  color: var(--ink-soft);
  line-height: 1.68;
  max-width: 48ch;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Refined Horizontal Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.hero-stats div {
  padding-left: 0;
}

.hero-stats div + div {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.hero-stats .num {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.hero-stats .lbl {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 4px;
}

/* ==============================================================
   SIGNATURE CEFR TRACK CARD (Deep Navy, Academic Dashboard)
   ============================================================== */
.track-card {
  background: var(--ink-deep);
  border-radius: var(--radius-xl);
  padding: 36px 32px 30px;
  box-shadow: 0 28px 56px -16px rgba(11, 22, 43, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.track-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(26, 79, 232, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.track-card h3 {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.track-card .sub {
  color: #9FB0C9;
  font-size: 0.86rem;
  line-height: 1.5;
  display: block;
}

.track-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 18px;
}

.track-path {
  fill: none;
  stroke: #223455;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
}

.track-path-fill {
  fill: none;
  stroke: url(#trackGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.stop-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: #8FA1C2;
  font-weight: 700;
}

.stop-label.reached {
  fill: var(--amber);
}

.stop-dot {
  fill: #223455;
  transition: all 0.2s ease;
}

.stop-dot.reached {
  fill: var(--teal);
}

.you-badge {
  fill: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ==============================================================
   QUIZ & PLACEMENT SECTION
   ============================================================== */
/* ==============================================================
   QUIZ & PLACEMENT SECTION (PREMIUM MODERN DESIGN SYSTEM)
   ============================================================== */
.quiz-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 52px;
  align-items: start;
}

.quiz-card {
  background: #FFFFFF !important;
  border-radius: 24px !important;
  border: 1px solid var(--border, #E2E8F0) !important;
  box-shadow: 0 20px 60px rgba(11, 23, 57, 0.08) !important;
  padding: 38px 36px !important;
  position: relative;
  transition: box-shadow 0.3s ease;
}

/* Header & Step Counter */
.quiz-step-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 16px !important;
}

.quiz-step-counter {
  font-family: 'Space Mono', monospace !important;
  font-size: 0.82rem !important;
  color: var(--teal, #1A4FE8) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.quiz-target-badge {
  font-family: 'Space Mono', monospace !important;
  font-size: 0.72rem !important;
  padding: 5px 12px !important;
  background: var(--teal-soft, #E8EFFF) !important;
  color: var(--teal, #1A4FE8) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  border: 1px solid rgba(26, 79, 232, 0.16) !important;
}

/* Animated Progress Bar */
.quiz-progress-track {
  height: 8px !important;
  background: #EEF2F5 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin-bottom: 28px !important;
  position: relative !important;
}

.quiz-progress-fill {
  display: block !important;
  height: 100% !important;
  background: linear-gradient(90deg, var(--teal, #1A4FE8) 0%, #2563EB 60%, var(--amber, #E53945) 100%) !important;
  border-radius: 999px !important;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.quiz-question-title {
  font-family: var(--font-sans) !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: var(--navy, #0B1739) !important;
  margin: 0 0 24px 0 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.02em !important;
}

/* Choices & Options */
.quiz-options-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-bottom: 32px !important;
}

.quiz-option-btn {
  display: flex !important;
  align-items: center !important;
  text-align: left !important;
  padding: 14px 18px !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 0.98rem !important;
  line-height: 1.4 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  min-height: 58px !important;
  border: 1.5px solid var(--border, #E2E8F0) !important;
  background: #F8FAFC !important;
  color: var(--navy, #0B1739) !important;
  outline: none !important;
  position: relative !important;
  user-select: none !important;
  box-shadow: 0 1px 3px rgba(11, 23, 57, 0.04) !important;
}

.quiz-option-btn:hover {
  border-color: var(--teal, #1A4FE8) !important;
  background: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(26, 79, 232, 0.1) !important;
}

.quiz-option-btn:active {
  transform: translateY(0) !important;
}

.quiz-option-btn.is-selected {
  border-color: var(--teal, #1A4FE8) !important;
  background: var(--teal-soft, #E8EFFF) !important;
  color: var(--navy, #0B1739) !important;
  box-shadow: 0 6px 20px rgba(26, 79, 232, 0.18) !important;
  transform: translateY(-1px) !important;
}

.quiz-option-badge {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 14px !important;
  font-family: 'Space Mono', monospace !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  background: #EEF2F5 !important;
  color: var(--navy, #0B1739) !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.quiz-option-btn:hover .quiz-option-badge {
  background: #E0E7EC !important;
}

.quiz-option-btn.is-selected .quiz-option-badge {
  background: var(--teal, #1A4FE8) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(26, 79, 232, 0.35) !important;
}

.quiz-option-text {
  font-weight: 600 !important;
  color: inherit !important;
  flex: 1 !important;
}

/* Nav Actions Row */
.quiz-nav-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  padding-top: 8px !important;
}

.quiz-nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 24px !important;
  min-height: 46px !important;
  border-radius: 12px !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1.5px solid transparent !important;
  text-decoration: none !important;
}

.quiz-prev-btn {
  background: var(--teal-soft, #E8EFFF) !important;
  color: var(--teal, #1A4FE8) !important;
  border-color: rgba(26, 79, 232, 0.25) !important;
}

.quiz-prev-btn:hover:not(:disabled) {
  background: #D8E5FD !important;
  border-color: var(--teal, #1A4FE8) !important;
  transform: translateY(-1px) !important;
}

.quiz-prev-btn.is-hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}

.quiz-next-btn {
  background: var(--navy, #0B1739) !important;
  color: #FFFFFF !important;
  border-color: var(--navy, #0B1739) !important;
  box-shadow: 0 4px 14px rgba(11, 23, 57, 0.2) !important;
}

.quiz-next-btn:hover:not(:disabled) {
  background: var(--teal, #1A4FE8) !important;
  border-color: var(--teal, #1A4FE8) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(26, 79, 232, 0.28) !important;
}

.quiz-next-btn:disabled,
.quiz-submit-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.quiz-submit-btn {
  background: var(--teal, #1A4FE8) !important;
  color: #FFFFFF !important;
  border-color: var(--teal, #1A4FE8) !important;
  box-shadow: 0 6px 20px rgba(26, 79, 232, 0.3) !important;
}

.quiz-submit-btn:hover:not(:disabled) {
  background: #1237A8 !important;
  border-color: #1237A8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(26, 79, 232, 0.4) !important;
}

/* Registration Form Inputs */
.quiz-input {
  width: 100% !important;
  height: 52px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border, #E2E8F0) !important;
  background: #FFFFFF !important;
  font-size: 0.95rem !important;
  color: var(--ink, #0B1739) !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

.quiz-input:focus {
  border-color: var(--teal, #1A4FE8) !important;
  box-shadow: 0 0 0 3px rgba(26, 79, 232, 0.16) !important;
}

.quiz-start-btn {
  width: 100% !important;
  height: 52px !important;
  background: var(--primary, #1A4FE8) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 6px 20px rgba(26, 79, 232, 0.28) !important;
  transition: all 0.2s ease !important;
}

.quiz-start-btn:hover:not(:disabled) {
  background: var(--primary-dark, #1237A8) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(26, 79, 232, 0.38) !important;
}

/* Results Screen */
.quiz-result-container {
  text-align: center !important;
  padding: 24px 8px !important;
}

.quiz-trophy-icon {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  background: var(--teal-soft, #E8EFFF) !important;
  color: var(--teal, #1A4FE8) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 20px auto !important;
  font-size: 2.4rem !important;
  box-shadow: 0 10px 28px rgba(26, 79, 232, 0.22) !important;
}

.quiz-level-pill {
  font-family: 'Space Mono', monospace !important;
  font-size: 0.85rem !important;
  padding: 6px 18px !important;
  margin-bottom: 14px !important;
  display: inline-block !important;
  background: var(--teal-soft, #E8EFFF) !important;
  color: var(--teal, #1A4FE8) !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  border: 1px solid rgba(26, 79, 232, 0.2) !important;
}

/* ==============================================================
   SECTION SHARED STYLES
   ============================================================== */
section {
  padding: 100px 0;
}

section.alt {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 50px;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ==============================================================
   QUIZ + DEMO CTA STRIPS (Preserved Structure & IDs)
   ============================================================== */
.cta-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.cta-strip + .cta-strip {
  margin-top: 24px;
}

.cta-strip .tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: inline-block;
}

.cta-strip h3 {
  font-size: 1.65rem;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.cta-strip p {
  font-size: 1.02rem;
  max-width: 58ch;
  line-height: 1.6;
}

/* Dark Variant: Free Demo Lesson */
.cta-strip.dark {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 48px -12px rgba(11, 22, 43, 0.4);
}

.cta-strip.dark::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(26, 79, 232, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cta-strip.dark h3,
.cta-strip.dark p {
  color: #FFFFFF;
}

.cta-strip.dark .tag {
  color: var(--amber);
}

.cta-strip.dark p {
  color: #C4CFE0;
}

.cta-strip.dark .btn-primary {
  background: #FFFFFF;
  color: var(--ink);
  border-color: #FFFFFF;
}

.cta-strip.dark .btn-primary:hover {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

/* ==============================================================
   TUTORS SECTION (3 Columns, High-Res Commercial Photography)
   ============================================================== */
.tutor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 2.5vw, 28px);
  align-items: stretch;
}

.tutor-home-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(16, 28, 52, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tutor-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(16, 28, 52, 0.09);
}

.tutor-home-media-wrap--portrait {
  display: flex;
  justify-content: center;
  padding: 12px 12px 0;
  background: linear-gradient(180deg, #f1f5f9 0%, #fff 100%);
}

.tutor-home-card--portrait {
  max-width: 320px;
  width: 100%;
  justify-self: center;
}

.tutor-grid:has(.tutor-home-card--portrait) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 320px));
  justify-content: center;
}

.tutor-home-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-alt);
  cursor: pointer;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
}

.tutor-home-media--portrait {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 16px;
  background: var(--paper-alt);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  display: block;
  text-decoration: none;
  color: inherit;
}

.tutor-home-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.4s ease;
}

.tutor-home-card:hover .tutor-home-media img {
  transform: scale(1.03);
}

.tutor-home-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 57, 0.14);
  display: block;
  transition: background 0.25s ease;
  pointer-events: none;
}

.tutor-home-card:hover .tutor-home-media-overlay {
  background: rgba(11, 23, 57, 0.28);
}

.tutor-home-play {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(11, 22, 43, 0.3);
  transition: transform 0.25s ease, background 0.2s ease;
}

.tutor-home-card:hover .tutor-home-play {
  transform: scale(1.06);
}

.tutor-home-play-icon {
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--navy);
  margin-left: 3px;
}

.tutor-home-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: rgba(11, 23, 57, 0.82);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(3px);
}

.tutor-home-body {
  padding: 20px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tutor-home-name {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.25;
}

.tutor-home-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 2.4rem;
  max-height: 4.6rem;
  overflow: hidden;
}

.tutor-home-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--teal-soft);
  border: 1px solid rgba(26, 79, 232, 0.16);
  padding: 4px 9px;
  border-radius: 8px;
  line-height: 1.2;
}

.tutor-home-bio-block {
  flex-grow: 1;
  min-width: 0;
}

.tutor-home-bio {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tutor-home-bio.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  min-height: 0;
}

.tutor-home-bio-toggle {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tutor-home-bio-toggle:hover {
  color: var(--navy);
}

.tutor-home-footer {
  padding: 0 20px 20px;
  margin-top: auto;
}

.tutor-home-video-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.tutor-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 22, 43, 0.78);
  backdrop-filter: blur(6px);
}

.tutor-video-modal.is-open {
  display: flex !important;
}

.tutor-video-dialog {
  max-width: 760px;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.tutor-video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}

.tutor-video-frame--portrait {
  padding-bottom: 0;
  height: auto;
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin: 0 auto;
}

.tutor-video-frame iframe,
.tutor-video-frame video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.tutor-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

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

.tutor-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--paper-alt);
}

.tutor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.tutor-card:hover .tutor-photo {
  transform: scale(1.02);
}

.tutor-media .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16, 28, 52, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  z-index: 2;
}

.tutor-card:hover .play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #FFFFFF;
}

.play::before {
  content: "";
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--ink);
  margin-left: 2px;
}

.tutor-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tutor-body h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.tutor-body p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}

.tutor-body .specialty {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ==============================================================
   EVENTS SECTION (3 Cards, 3:4 Aspect Ratio, Editorial Imagery)
   ============================================================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.event-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.event-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.event-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background-color: var(--ink);
}

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

.event-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  z-index: 0;
}

.event-card:hover .event-bg-image {
  transform: scale(1.03);
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 28, 52, 0.05) 30%, rgba(11, 22, 43, 0.88) 100%);
  z-index: 1;
}

.event-card .content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.event-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.event-card h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.25;
}

/* ==============================================================
   FOOTER (Preserved Structure, Deep Navy #101C34)
   ============================================================== */
footer.site-footer {
  background: var(--ink);
  color: #C4CFE0;
  padding: 80px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

footer.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26, 79, 232, 0.6), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

footer h5 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8FA1C2;
  margin: 0 0 18px;
  text-transform: uppercase;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

footer ul li a {
  font-size: 0.93rem;
  color: #C4CFE0;
  transition: color 0.15s ease;
}

footer ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  font-size: 0.86rem;
  color: #8FA1C2;
  flex-wrap: wrap;
  gap: 14px;
}

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

.socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FFFFFF;
  transition: all 0.2s ease;
}

.socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 79, 232, 0.35);
}

/* ==============================================================
   REVEAL INTERACTION
   ============================================================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Free Demo Lesson (#demo) */
#demo.demo-section {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 100px) 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafd 50%, #ffffff 100%);
  border-top: 1px solid #e8eef3;
  border-bottom: 1px solid #e8eef3;
}

.demo-section-inner {
  position: relative;
  z-index: 2;
}

.demo-section-ambient {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.demo-section-ambient--primary {
  top: 12%;
  right: -8%;
  width: min(520px, 88vw);
  height: min(520px, 88vw);
  background: radial-gradient(circle, rgba(26, 79, 232, 0.06) 0%, transparent 70%);
}

.demo-section-ambient--secondary {
  bottom: 8%;
  left: -10%;
  width: min(460px, 82vw);
  height: min(460px, 82vw);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
}

.demo-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 4.5vw, 68px);
  align-items: center;
}

.demo-section-copy {
  min-width: 0;
}

.demo-section-lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 50ch;
  margin: 0 0 32px;
}

.demo-benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 34px;
}

.demo-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
}

.demo-social-proof {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(11, 23, 57, 0.04);
  max-width: 460px;
  width: 100%;
  box-sizing: border-box;
}

.demo-card {
  background: #ffffff;
  border-radius: 26px;
  padding: clamp(22px, 3.2vw, 38px);
  box-shadow: 0 22px 64px rgba(11, 23, 57, 0.08);
  border: 1.5px solid var(--border);
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.demo-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.demo-field-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
}

.demo-field-label--phone {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.demo-phone-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-notes-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.demo-notes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-success-panel {
  text-align: center;
  padding: 20px 10px 10px;
}

.demo-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.demo-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 6px;
}

.demo-summary-line--last {
  border-bottom: none;
  padding-bottom: 0;
}

.demo-summary-line strong {
  text-align: right;
  word-break: break-word;
  max-width: 58%;
}

/* ==============================================================
   RESPONSIVE DESIGN SYSTEM (Desktop, Tablet, Mobile)
   ============================================================== */

/* Base Container Helper */
.public-container,
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
  box-sizing: border-box;
}

/* Tablet Landscape & iPads (<= 1024px) */
@media (max-width: 1024px) {
  .public-container,
  .wrap {
    padding: 0 28px !important;
  }

  .nav {
    padding: 0 28px !important;
  }

  nav.nav-center,
  nav.nav-center ul {
    display: none !important;
  }

  .burger {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 68px 0 44px !important;
  }

  .hero-grid,
  div.hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .quiz-section-grid,
  div.quiz-section-grid {
    grid-template-columns: 1fr !important;
    gap: 38px !important;
  }

  .demo-section-grid,
  div.demo-section-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    align-items: stretch !important;
  }

  #demo.demo-section {
    padding: clamp(56px, 7vw, 72px) 0 !important;
  }

  .demo-form-row,
  #demo .demo-form-row.form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .tutor-grid,
  div.tutor-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }

  .event-grid,
  div.event-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }

  .footer-grid,
  div.footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 36px !important;
  }
}

/* Tablet Portrait & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .public-container,
  .wrap {
    padding: 0 20px !important;
  }

  .nav {
    padding: 0 20px !important;
  }

  .site-header {
    height: 68px !important;
  }

  .brand {
    font-size: 1.25rem !important;
    gap: 10px !important;
  }

  .brand-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.72rem !important;
  }

  .hero {
    padding: 48px 0 32px !important;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 6.8vw, 3.2rem) !important;
    margin-bottom: 16px !important;
  }

  .hero p {
    font-size: 1rem !important;
    margin-bottom: 26px !important;
  }

  .hero-cta-group {
    gap: 12px !important;
    margin-bottom: 32px !important;
  }

  .hero-stats-row,
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    padding-top: 22px !important;
  }

  .hero-stats-row .hero-stat-item,
  .hero-stats > div {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .hero-stats-row .hero-stat-item .mono,
  .hero-stats .mono {
    font-size: 1.55rem !important;
  }

  /* Free Demo Lesson */
  #demo.demo-section {
    padding: 52px 0 !important;
  }

  .demo-section-ambient {
    opacity: 0.45;
  }

  .demo-section-lead {
    font-size: 1rem;
    max-width: none;
    margin-bottom: 26px;
  }

  .demo-benefit-list {
    margin-bottom: 26px;
    gap: 12px;
  }

  .demo-benefit-item {
    font-size: 0.92rem;
  }

  .demo-social-proof {
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
    gap: 12px;
  }

  .demo-card {
    padding: 24px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 14px 40px rgba(11, 23, 57, 0.07) !important;
  }

  #demo .demo-input,
  #demo .demo-textarea {
    font-size: 16px !important;
  }

  .demo-summary-line {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .demo-summary-line strong {
    max-width: 100%;
    text-align: left;
  }

  /* Quiz Section */
  #quiz {
    padding: 56px 0 !important;
  }

  .quiz-section-grid,
  div.quiz-section-grid {
    gap: 32px !important;
  }

  .quiz-card,
  #quiz .card {
    padding: 28px 22px !important;
    border-radius: 20px !important;
  }

  .quiz-form-row,
  .form-grid-2,
  div.form-grid-2,
  #demo .demo-form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Tutors & Events */
  #tutors,
  #events {
    padding: 56px 0 !important;
  }

  .modal-dialog {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  /* Footer */
  .site-footer,
  footer {
    padding: 52px 0 28px !important;
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .public-container,
  .wrap {
    padding: 0 16px !important;
  }

  .nav {
    padding: 0 14px !important;
  }

  /* Nav Right optimization for phone header */
  .nav-right {
    gap: 8px !important;
  }

  .nav-right .btn-nav-login {
    display: none !important; /* Prominently available inside mobile hamburger menu */
  }

  .lang-switch a {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
  }

  .hero-cta-group {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-cta-group .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
  }

  .tutor-grid,
  div.tutor-grid,
  .event-grid,
  div.event-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .footer-grid,
  div.footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 36px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

/* ==============================================================
   STUDENT FEEDBACK VIDEOS (Homepage)
   ============================================================== */
.student-feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(20px, 2.5vw, 28px);
  align-items: stretch;
}

.student-feedback-card {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.student-feedback-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.student-feedback-media--portrait {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.student-feedback-card--portrait {
  max-width: 340px;
  width: 100%;
  justify-self: center;
}

.student-feedback-grid:has(.student-feedback-card--portrait) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 300px));
  justify-content: center;
}

.student-feedback-media iframe,
.student-feedback-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.student-feedback-media--facade .student-feedback-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.student-feedback-media--facade .student-feedback-play {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.student-feedback-media--facade .student-feedback-play:hover,
.student-feedback-media--facade .student-feedback-play:focus-visible {
  background: rgba(15, 23, 42, 0.12);
}

.student-feedback-media--facade .student-feedback-iframe {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.student-feedback-media--facade.is-playing .student-feedback-poster,
.student-feedback-media--facade.is-playing .student-feedback-play {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.student-feedback-media--facade.is-playing .student-feedback-iframe {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.student-feedback-media--portrait iframe,
.student-feedback-media--portrait video {
  object-fit: cover;
}

.student-feedback-caption {
  padding: 14px 16px 16px;
}

.student-feedback-name {
  font-family: var(--font-primary, 'Montserrat', sans-serif);
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-feedback-title {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Compact Smartphones (<= 420px) */
@media (max-width: 420px) {
  .hero-stats-row,
  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .quiz-card,
  #quiz .card {
    padding: 20px 14px !important;
    border-radius: 16px !important;
  }

  #demo.demo-section {
    padding: 44px 0 !important;
  }

  .demo-section-ambient {
    display: none;
  }

  .demo-card {
    padding: 18px 14px !important;
    border-radius: 16px !important;
  }

  .demo-success-panel {
    padding: 12px 0 4px;
  }

  .brand span:last-child {
    font-size: 1.15rem !important;
  }
}

