/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
  overflow-x: hidden;
  background: #fafbff;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --secondary: #7209b7;
  --accent: #f72585;
  --success: #06d6a0;
  --warning: #ffd166;
  --error: #ef476f;
  --info: #118ab2;
  --bg-light: #f8f9ff;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8e8ea0;
  --shadow-sm: 0 2px 8px rgba(67,97,238,0.08);
  --shadow-md: 0 4px 20px rgba(67,97,238,0.12);
  --shadow-lg: 0 8px 40px rgba(67,97,238,0.16);
  --shadow-xl: 0 20px 60px rgba(67,97,238,0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --gradient-primary: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
  --gradient-warm: linear-gradient(135deg, #f72585 0%, #ff6b6b 100%);
  --gradient-cool: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
  --gradient-sunset: linear-gradient(135deg, #ffd166 0%, #ef476f 100%);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --bg-light: #1a1a2e;
  --bg-card: #16213e;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6e6e85;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.4);
}
[data-theme="dark"] body { background: #0f0f23; color: var(--text-primary); }

/* Dark - Navbar */
[data-theme="dark"] .navbar {
  background: rgba(15,15,35,0.9);
  border-bottom-color: rgba(67,97,238,0.15);
}
[data-theme="dark"] .nav-links a { color: var(--text-secondary); }
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active { color: #7b93f7; background: rgba(67,97,238,0.12); }
[data-theme="dark"] .nav-links.open { background: #16213e; }

/* Dark - Cards & Surfaces */
[data-theme="dark"] .user-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .feature-card-v2,
[data-theme="dark"] .pain-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .calculator-box,
[data-theme="dark"] .service-card,
[data-theme="dark"] .why-item,
[data-theme="dark"] .grade-section,
[data-theme="dark"] .contact-form-box {
  background: #16213e;
  border-color: rgba(67,97,238,0.12);
}

/* Dark - Stats bar */
[data-theme="dark"] .stats-bar {
  background: #16213e;
  border-color: rgba(67,97,238,0.1);
}

/* Dark - Phone mockup */
[data-theme="dark"] .phone-screen { background: #1e1e3a; }
[data-theme="dark"] .screen-card { background: #16213e; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
[data-theme="dark"] .phone-float { background: #16213e; }

/* Dark - Buttons */
[data-theme="dark"] .btn-outline {
  background: #16213e;
  border-color: rgba(67,97,238,0.3);
  color: #7b93f7;
}
[data-theme="dark"] .btn-outline:hover { background: rgba(67,97,238,0.15); }
[data-theme="dark"] .tab-btn {
  background: #16213e;
  border-color: rgba(67,97,238,0.15);
  color: var(--text-secondary);
}
[data-theme="dark"] .tab-btn:hover { color: #7b93f7; }

/* Dark - Flow / Timeline */
[data-theme="dark"] .flow-step .step-dot {
  background: #16213e; box-shadow: 0 0 0 6px #0f0f23;
}
[data-theme="dark"] .flow-step .step-content {
  background: #16213e; border-color: rgba(67,97,238,0.1);
}

/* Dark - Accordion */
[data-theme="dark"] .accordion-header:hover { background: rgba(67,97,238,0.08); }

/* Dark - Tables */
[data-theme="dark"] .comparison-table tbody tr { background: #16213e; }
[data-theme="dark"] .comparison-table tbody tr:nth-child(even) { background: #1a1a2e; }
[data-theme="dark"] .comparison-table-v2 tbody tr { background: #16213e; }
[data-theme="dark"] .comparison-table-v2 tbody tr:nth-child(even) { background: #1a1a2e; }
[data-theme="dark"] .comparison-table-v2 td.cp-col {
  background: linear-gradient(to right, rgba(67,97,238,0.1), rgba(67,97,238,0.05));
}
[data-theme="dark"] .cp-feature strong { color: #7b93f7; }

/* Dark - Inputs */
[data-theme="dark"] .calc-group input,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #1a1a2e; color: var(--text-primary);
  border-color: rgba(67,97,238,0.2);
}
[data-theme="dark"] .calc-group input:focus,
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: var(--primary);
}

/* Dark - Calculator results */
[data-theme="dark"] .calc-result.current { background: rgba(239,71,111,0.12); }
[data-theme="dark"] .calc-result.new { background: rgba(67,97,238,0.12); }
[data-theme="dark"] .calc-result.savings { background: rgba(6,214,160,0.12); }

/* Dark - Free card */
[data-theme="dark"] .free-card {
  background: #16213e; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
[data-theme="dark"] .free-card-header {
  background: linear-gradient(135deg, rgba(6,214,160,0.1), rgba(67,97,238,0.08));
}

/* Dark - Grade features */
[data-theme="dark"] .grade-feature { background: rgba(67,97,238,0.06); }

/* Dark - Badges */
[data-theme="dark"] .section-badge { opacity: 0.9; }
[data-theme="dark"] .feature-tag { background: rgba(67,97,238,0.15); }

/* Dark - Footer (already dark, minimal changes) */
[data-theme="dark"] .footer { background: #0a0a1a; }

/* Dark - Success modal */
[data-theme="dark"] .success-modal-content { background: #16213e; }

/* Dark - Hero backgrounds */
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(67,97,238,0.12) 0%, transparent 70%);
}
[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(114,9,183,0.1) 0%, transparent 70%);
}

/* Dark - Highlight text readable */
[data-theme="dark"] .highlight-text { color: #7b93f7; }

/* Dark - Override inline background:white on sub-page elements */
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: white"] {
  background: #16213e !important;
}

/* Dark - Smooth transition */
body, .navbar, .stats-bar, .footer,
.user-card, .feature-card, .feature-card-v2,
.pain-card, .testimonial-card, .accordion-item,
.calculator-box, .service-card, .why-item,
.flow-step .step-dot, .flow-step .step-content,
.tab-btn, .btn-outline, .calc-group input {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 2px solid rgba(67,97,238,0.12);
  background: transparent; cursor: pointer;
  font-size: 1.1rem; color: var(--text-secondary);
  transition: all 0.3s ease; flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(67,97,238,0.06);
}
[data-theme="dark"] .theme-toggle { border-color: rgba(67,97,238,0.2); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(67,97,238,0.12); }
.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline; color: #ffd166; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(67,97,238,0.08);
  transition: all 0.3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.5rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  -webkit-text-fill-color: white;
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  padding: 8px 18px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: rgba(67,97,238,0.08);
}
.nav-links a.btn-nav {
  background: var(--gradient-primary);
  color: white !important;
  -webkit-text-fill-color: white;
  padding: 10px 24px;
}
.nav-links a.btn-nav:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(67,97,238,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute; bottom: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(114,9,183,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-container {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
  position: relative; z-index: 1;
}
.hero-content h1 {
  font-size: 3.5rem; font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-content h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  font-size: 1.2rem; color: var(--text-secondary);
  margin-bottom: 32px; max-width: 500px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 12px;
  font-weight: 700; font-size: 1rem;
  transition: all 0.3s ease;
  border: none; cursor: pointer;
}
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(67,97,238,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67,97,238,0.4);
}
.btn-outline {
  background: white;
  color: var(--primary);
  border: 2px solid rgba(67,97,238,0.2);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(67,97,238,0.04);
  transform: translateY(-2px);
}

/* Phone Mockup */
.hero-visual { display: flex; justify-content: center; position: relative; }
.phone-mockup {
  width: 280px; height: 580px;
  background: #1a1a2e;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), inset 0 0 0 2px rgba(255,255,255,0.1);
  position: relative;
  transform: perspective(800px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.phone-mockup:hover { transform: perspective(800px) rotateY(0deg) rotateX(0deg); }
.phone-mockup .notch {
  width: 120px; height: 28px;
  background: #1a1a2e;
  border-radius: 0 0 20px 20px;
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 10;
}
.phone-screen {
  width: 100%; height: 100%;
  background: white;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}
.screen-content {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
}
.screen-header {
  padding: 40px 16px 16px;
  background: var(--gradient-primary);
  color: white;
}
.screen-header h3 { font-size: 1.1rem; font-weight: 700; }
.screen-header p { font-size: 0.75rem; opacity: 0.8; }
.screen-body { padding: 12px; flex: 1; overflow: hidden; }
.screen-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex; align-items: center; gap: 10px;
  animation: slideUp 0.5s ease forwards;
  opacity: 0;
}
.screen-card:nth-child(1) { animation-delay: 0.2s; }
.screen-card:nth-child(2) { animation-delay: 0.4s; }
.screen-card:nth-child(3) { animation-delay: 0.6s; }
.screen-card:nth-child(4) { animation-delay: 0.8s; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.screen-card .card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.screen-card .card-text { font-size: 0.7rem; }
.screen-card .card-text strong { display: block; font-size: 0.8rem; color: var(--text-primary); }
.screen-card .card-text span { color: var(--text-muted); }

.phone-float {
  position: absolute;
  background: white; border-radius: 14px;
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: floatBadge 3s ease-in-out infinite;
  z-index: 5;
}
.phone-float.top-right { top: 20px; right: -40px; animation-delay: 0.5s; }
.phone-float.bottom-left { bottom: 60px; left: -50px; animation-delay: 1s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.float-text { font-size: 0.85rem; }
.float-text strong { display: block; font-weight: 700; }
.float-text span { color: var(--text-muted); font-size: 0.75rem; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: white;
  padding: 40px 24px;
  border-top: 1px solid rgba(67,97,238,0.06);
  border-bottom: 1px solid rgba(67,97,238,0.06);
}
.stats-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  text-align: center;
}
.stat-item .stat-number {
  font-size: 2.5rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .stat-label { color: var(--text-muted); font-weight: 500; margin-top: 4px; }

/* ===== SECTION ===== */
.section {
  padding: 100px 24px;
  max-width: 1200px; margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-badge {
  display: inline-block;
  padding: 6px 18px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.section-header h2 {
  font-size: 2.5rem; font-weight: 800;
  margin-bottom: 16px;
}
.section-header p {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto;
}

/* ===== USER CARDS ===== */
.user-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.user-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s ease;
  border: 1px solid rgba(67,97,238,0.06);
  position: relative;
  overflow: hidden;
}
.user-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: height 0.4s ease;
}
.user-card:nth-child(1)::before { background: var(--gradient-primary); }
.user-card:nth-child(2)::before { background: var(--gradient-warm); }
.user-card:nth-child(3)::before { background: var(--gradient-cool); }
.user-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.user-card:hover::before { height: 6px; }
.user-card .card-emoji {
  font-size: 3.5rem; margin-bottom: 20px;
  display: block;
}
.user-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.user-card p { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.95rem; }
.user-card .btn { width: 100%; justify-content: center; }

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px;
}
.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
  border: 1px solid rgba(67,97,238,0.06);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(67,97,238,0.15);
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.92rem; }
.feature-card .feature-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tag {
  padding: 4px 12px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(67,97,238,0.06);
  color: var(--primary);
}

/* ===== FLOW / TIMELINE ===== */
.flow-steps {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
  max-width: 700px; margin: 0 auto;
}
.flow-steps::before {
  content: '';
  position: absolute; left: 28px; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--accent));
  border-radius: 3px;
}
.flow-step {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 20px 0;
  position: relative;
}
.flow-step .step-dot {
  width: 56px; height: 56px; flex-shrink: 0;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
  color: var(--primary);
  z-index: 1;
  box-shadow: 0 0 0 6px white;
}
.flow-step .step-content {
  background: white;
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(67,97,238,0.06);
  flex: 1;
}
.flow-step .step-content h4 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 6px;
  color: var(--primary);
}
.flow-step .step-content p { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== PHONE DEMO SECTION ===== */
.demo-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
  padding: 60px 0;
}
.demo-section.reverse { direction: rtl; }
.demo-section.reverse > * { direction: ltr; }
.demo-info h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.demo-info p { color: var(--text-secondary); margin-bottom: 24px; }
.demo-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.demo-list li {
  display: flex; align-items: center; gap: 12px;
  font-weight: 500;
}
.demo-list li .check {
  width: 28px; height: 28px;
  background: rgba(6,214,160,0.12);
  color: var(--success);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.demo-phone { display: flex; justify-content: center; }
.demo-phone .phone-mockup { width: 240px; height: 490px; }
.demo-phone .phone-mockup .phone-screen { border-radius: 28px; }

/* ===== TABS ===== */
.tabs-container { margin-bottom: 40px; }
.tabs {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 24px; border-radius: 50px;
  border: 2px solid rgba(67,97,238,0.12);
  background: white;
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
  background: var(--gradient-primary);
  color: white; border-color: transparent;
}
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Priority indicator cho tab Mầm non + CLB — chấm vàng nhỏ bên cạnh nhãn */
.tab-priority-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd166 0%, #f7af20 100%);
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(247,175,32,0.18);
  animation: pulseDot 2s ease-in-out infinite;
}
.tab-btn.active .tab-priority-dot {
  background: white;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.85; }
}

/* Hero priority banner — nhấn mạnh 2 đối tượng ưu tiên (Mầm non + CLB) */
.hero-priority-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: 12px 0 16px 0;
  background: linear-gradient(135deg, rgba(255,209,102,0.15) 0%, rgba(247,175,32,0.10) 100%);
  border: 1px solid rgba(247,175,32,0.35);
  border-radius: 999px;
  font-size: 0.9rem;
  color: #5b3700;
}
.hero-priority-banner i {
  color: #f7af20;
}
[data-theme="dark"] .hero-priority-banner {
  background: linear-gradient(135deg, rgba(255,209,102,0.18) 0%, rgba(247,175,32,0.12) 100%);
  color: #ffd166;
}

/* Badge "Ưu tiên" bên cạnh tên cấp học trong grade-section */
.priority-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #ffd166 0%, #f7af20 100%);
  color: #5b3700;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}
[data-theme="dark"] .priority-badge { color: #2b1900; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--gradient-primary);
  padding: 80px 24px;
  text-align: center;
  color: white;
  border-radius: var(--radius-lg);
  margin: 0 24px 60px;
  max-width: 1200px;
  margin-left: auto; margin-right: auto;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.cta-section h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; position: relative; }
.cta-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; position: relative; }
.cta-section .btn {
  background: white; color: var(--primary);
  font-size: 1.1rem; padding: 16px 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
}
.cta-section .btn:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }

/* ===== FOOTER ===== */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 30px;
}
.footer-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand .nav-logo .logo-icon { -webkit-text-fill-color: white; }
.footer-brand p { font-size: 0.9rem; line-height: 1.8; }
.footer h4 { color: white; font-size: 1rem; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { transition: color 0.3s; font-size: 0.9rem; }
.footer ul a:hover { color: white; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center; font-size: 0.85rem;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 30px 0;
}
.comparison-table th, .comparison-table td {
  padding: 16px 20px;
  text-align: left;
}
.comparison-table thead th {
  background: var(--gradient-primary);
  color: white; font-weight: 700;
}
.comparison-table tbody tr { background: white; transition: background 0.2s; }
.comparison-table tbody tr:nth-child(even) { background: var(--bg-light); }
.comparison-table tbody tr:hover { background: rgba(67,97,238,0.04); }
.comparison-table .check-mark { color: var(--success); font-weight: 700; font-size: 1.2rem; }
.comparison-table .feature-name { font-weight: 600; }

/* ===== TESTIMONIAL ===== */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid rgba(67,97,238,0.06);
  transition: all 0.3s ease;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-stars { color: #ffd166; font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-text { color: var(--text-secondary); font-style: italic; margin-bottom: 16px; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.testimonial-name strong { display: block; font-size: 0.95rem; }
.testimonial-name span { color: var(--text-muted); font-size: 0.85rem; }

/* ===== ACCORDION ===== */
.accordion { max-width: 700px; margin: 0 auto; }
.accordion-item {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border: 1px solid rgba(67,97,238,0.06);
  overflow: hidden;
}
.accordion-header {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.accordion-header:hover { background: var(--bg-light); }
.accordion-header .arrow { transition: transform 0.3s; font-size: 0.9rem; }
.accordion-item.open .accordion-header .arrow { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.accordion-item.open .accordion-body { max-height: 500px; }
.accordion-body-inner {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== GRADE TABS (SubPage) ===== */
.grade-section {
  padding: 30px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(67,97,238,0.06);
}
.grade-section h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.grade-section h3 .emoji { margin-right: 8px; }
.grade-section p.desc { color: var(--text-secondary); margin-bottom: 20px; }
.grade-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px;
}
.grade-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
}
.grade-feature .gf-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.grade-feature .gf-text strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.grade-feature .gf-text span { color: var(--text-muted); font-size: 0.8rem; }

/* ===== SCROLL ANIMATE ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HERO EXTRAS ===== */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(67,97,238,0.08); color: var(--primary);
  font-weight: 700; font-size: 0.9rem;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 1.15rem !important; color: var(--text-secondary) !important;
  margin-bottom: 24px !important;
}
.hero-features-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 32px;
}
.hero-feature-item {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; color: var(--text-primary);
}
.hero-feature-item i { color: var(--success); }
.hero-note {
  font-size: 0.85rem !important; color: var(--text-muted) !important;
  margin-top: 16px !important; margin-bottom: 0 !important;
}
.hero-note i { margin-right: 6px; }
.hero-wave {
  position: absolute; bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: auto; }
.highlight-text { color: var(--primary); }

/* ===== PAIN POINTS ===== */
.pain-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.pain-card {
  background: white; border-radius: var(--radius); padding: 32px;
  text-align: center; transition: all 0.3s ease;
  border: 1px solid rgba(67,97,238,0.06);
}
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pain-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 20px;
}
.pain-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.pain-card p { color: var(--text-secondary); font-size: 0.92rem; }
.pain-solution {
  text-align: center; margin-top: 40px;
  font-size: 1.1rem; color: var(--text-secondary);
}
.pain-solution i {
  display: block; font-size: 1.5rem;
  color: var(--primary); margin-bottom: 12px;
  animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== FEATURES V2 (5 Unique) ===== */
.features-grid-5 {
  /* Tên cũ giữ nguyên, layout đổi sang grid auto-fit để clean với mọi card count
     (5 hoặc 6+). Trên desktop ~3 cột, tablet 2 cột, mobile 1 cột. */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.feature-card-v2 {
  background: white; border-radius: var(--radius); padding: 32px;
  border: 1px solid rgba(67,97,238,0.06);
  transition: all 0.3s ease; position: relative;
}
.feature-card-v2:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-badge-v2 {
  display: inline-block; padding: 4px 14px;
  border-radius: 50px; font-size: 0.75rem; font-weight: 700;
  background: rgba(6,214,160,0.12); color: var(--success);
  margin-bottom: 12px;
}
.feature-badge-v2.blue { background: rgba(67,97,238,0.1); color: var(--primary); }
.feature-badge-v2.purple { background: rgba(114,9,183,0.1); color: var(--secondary); }
.feature-badge-v2.green { background: rgba(6,214,160,0.12); color: var(--success); }
.feature-badge-v2.red { background: rgba(239,71,111,0.1); color: var(--error); }
.feature-badge-v2.orange { background: rgba(247,175,32,0.15); color: #b56b00; }
.feature-icon-v2 {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
  background: rgba(6,214,160,0.12); color: var(--success);
}
.feature-icon-v2.blue { background: rgba(67,97,238,0.1); color: var(--primary); }
.feature-icon-v2.purple { background: rgba(114,9,183,0.1); color: var(--secondary); }
.feature-icon-v2.green { background: rgba(6,214,160,0.12); color: var(--success); }
.feature-icon-v2.red { background: rgba(239,71,111,0.1); color: var(--error); }
.feature-icon-v2.orange { background: rgba(247,175,32,0.15); color: #b56b00; }
.feature-card-v2 h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature-card-v2 p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 14px; }
.feature-list-v2 { list-style: none; }
.feature-list-v2 li {
  padding: 4px 0; font-size: 0.88rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.feature-list-v2 li i { color: var(--success); font-size: 0.8rem; }

/* ===== COMPARISON TABLE V2 ===== */
.comparison-wrapper { overflow-x: auto; }
.comparison-table-v2 {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.comparison-table-v2 th, .comparison-table-v2 td {
  padding: 16px 24px; text-align: left;
}
.comparison-table-v2 thead th {
  background: #1a1a2e; color: white; font-weight: 700;
}
.comparison-table-v2 thead th.cp-col {
  background: var(--gradient-primary);
  font-size: 1rem; letter-spacing: 0.5px;
}
.comparison-table-v2 tbody tr { background: white; transition: background 0.2s; }
.comparison-table-v2 tbody tr:nth-child(even) { background: var(--bg-light); }
.comparison-table-v2 tbody tr:hover { background: rgba(67,97,238,0.03); }
.comparison-table-v2 td i { margin-right: 8px; color: var(--text-muted); }
.comparison-table-v2 td.cp-col {
  background: linear-gradient(to right, rgba(67,97,238,0.04), rgba(67,97,238,0.02));
  border-left: 3px solid rgba(67,97,238,0.15);
}
.comparison-table-v2 tbody tr:hover td.cp-col {
  background: linear-gradient(to right, rgba(67,97,238,0.08), rgba(67,97,238,0.04));
}
/* ClassPlus feature cell */
.cp-feature {
  display: flex; align-items: center; gap: 12px;
}
.cp-feature > i {
  font-size: 1.3rem; color: var(--success);
  flex-shrink: 0; margin-right: 0 !important;
}
.cp-feature strong {
  display: block; font-size: 0.95rem; font-weight: 700;
  color: var(--primary); margin-bottom: 2px;
}
.cp-feature span {
  display: block; font-size: 0.78rem; color: var(--text-muted); font-weight: 400;
}
/* Other column */
.comparison-table-v2 td.other-col { color: var(--text-secondary); }
.status-badge {
  display: inline-block; padding: 4px 14px;
  border-radius: 50px; font-size: 0.8rem; font-weight: 600;
}
.status-badge.full { background: rgba(6,214,160,0.12); color: var(--success); }
.status-badge.partial { background: rgba(255,209,102,0.2); color: #b8860b; }
.status-badge.none { background: rgba(239,71,111,0.1); color: var(--error); }

/* ===== CALCULATOR ===== */
.calculator-section { max-width: 800px; }
.calculator-box {
  background: white; border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(67,97,238,0.06);
}
.calc-inputs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 32px;
}
.calc-group label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
}
.calc-group label i { margin-right: 6px; color: var(--primary); }
.calc-group input {
  width: 100%; padding: 12px 16px;
  border: 2px solid rgba(67,97,238,0.12);
  border-radius: var(--radius-sm); font-size: 1rem;
  font-weight: 600; transition: border-color 0.3s;
}
.calc-group input:focus {
  outline: none; border-color: var(--primary);
}
.calc-results {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap; margin-bottom: 8px;
}
.calc-result {
  text-align: center; padding: 16px 24px;
  border-radius: var(--radius-sm);
}
.calc-result.current { background: rgba(239,71,111,0.06); }
.calc-result.new { background: rgba(67,97,238,0.06); }
.calc-result.savings { background: rgba(6,214,160,0.08); }
.calc-label { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.calc-value { display: block; font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.calc-result.current .calc-value { color: var(--error); }
.calc-result.new .calc-value { color: var(--primary); }
.calc-result.savings .calc-value { color: var(--success); }
.calc-note { font-size: 0.75rem; color: var(--text-muted); }
.calc-arrow { font-size: 1.5rem; color: var(--primary); }

/* ===== PRICING - FREE HIGHLIGHT ===== */
.pricing-free-highlight { max-width: 900px; margin: 0 auto; }
.free-card {
  background: white; border-radius: var(--radius-lg);
  border: 2px solid var(--success); overflow: hidden;
  box-shadow: 0 8px 32px rgba(6,214,160,0.15);
}
.free-card-header {
  display: flex; gap: 32px; align-items: center;
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, rgba(6,214,160,0.06), rgba(67,97,238,0.04));
}
.free-price-tag {
  display: flex; flex-direction: column; align-items: center;
  background: var(--success); color: white; border-radius: var(--radius);
  padding: 20px 28px; min-width: 140px; text-align: center;
}
.free-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }
.free-price { font-size: 2.5rem; font-weight: 900; line-height: 1.1; }
.free-period { font-size: 0.85rem; opacity: 0.9; margin-top: 2px; }
.free-desc h3 { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.free-desc p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; }
.free-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 24px 32px 32px;
}
.free-feature-col h4 {
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.free-feature-col ul { list-style: none; }
.free-feature-col ul li {
  padding: 5px 0; font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.free-feature-col ul li i { color: var(--success); font-size: 0.75rem; }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.service-card {
  background: white; border-radius: var(--radius); padding: 24px;
  border: 1px solid rgba(67,97,238,0.08);
  text-align: center; transition: all 0.3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(67,97,238,0.08); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 1.2rem;
}
.service-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.service-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(255,209,102,0.15); color: #e6a800;
}

/* ===== WHY CLASSPLUS GRID ===== */
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.why-item {
  background: white; border-radius: var(--radius); padding: 24px;
  border: 1px solid rgba(67,97,238,0.08);
  transition: all 0.3s ease;
}
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.why-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(67,97,238,0.08); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 1.1rem;
}
.why-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.why-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* Keep old pricing-note for reuse */
.pricing-note {
  text-align: center; margin-top: 32px;
  font-size: 0.85rem; color: var(--text-muted);
}
.pricing-note i { margin-right: 6px; color: var(--info); }

/* ===== CONTACT FORM ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}
.contact-text h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.contact-text p { color: var(--text-secondary); margin-bottom: 24px; font-size: 1.05rem; }
.contact-benefits { list-style: none; }
.contact-benefits li {
  padding: 8px 0; font-size: 1rem;
  display: flex; align-items: center; gap: 10px;
}
.contact-benefits li i { color: var(--success); }
.contact-form-box {
  background: white; border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%; padding: 12px 16px;
  border: 2px solid rgba(67,97,238,0.12);
  border-radius: var(--radius-sm); font-size: 0.95rem;
  transition: border-color 0.3s;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note {
  text-align: center; margin-top: 20px;
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.8;
}
.form-note a { color: var(--primary); font-weight: 600; }

/* ===== SOCIAL LINKS ===== */
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; color: rgba(255,255,255,0.7);
}
.social-links a:hover { background: var(--primary); color: white; }

/* ===== FOOTER ENHANCED ===== */
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { transition: color 0.3s; }
.footer-legal a:hover { color: white; }
.contact-info-list li {
  display: flex; align-items: center; gap: 8px;
}
.contact-info-list li i { width: 16px; text-align: center; }
.contact-info-list li small { opacity: 0.6; }

/* ===== SUCCESS MODAL ===== */
.success-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.success-modal-content {
  background: white; border-radius: var(--radius-lg);
  padding: 40px; text-align: center; max-width: 420px;
  box-shadow: var(--shadow-xl);
}
.success-icon-wrap {
  font-size: 3rem; color: var(--success); margin-bottom: 16px;
}
.success-modal-content h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.success-modal-content p { color: var(--text-secondary); margin-bottom: 20px; }
.success-contact { margin-bottom: 20px; font-size: 0.9rem; }
.success-contact a { color: var(--primary); font-weight: 600; margin-left: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-content p { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-features-list { align-items: center; }
  .hero-visual { margin-top: 40px; }
  .phone-mockup { transform: none !important; }
  .phone-float { display: none; }
  .user-cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .demo-section { grid-template-columns: 1fr; }
  .demo-section.reverse { direction: ltr; }
  .testimonials { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.4rem; }
  .section-header h2 { font-size: 1.8rem; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 70px; left: 0; right: 0;
    background: white; padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .pain-grid { grid-template-columns: 1fr; }
  .free-card-header { flex-direction: column; text-align: center; }
  .free-features-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-text { text-align: center; }
  .contact-text h2 { font-size: 1.8rem; }
  .contact-benefits { display: inline-block; text-align: left; }
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-results { flex-direction: column; }
  .calc-arrow { transform: rotate(90deg); }
  /* Cleanup rule cũ — class .features-grid-5 đã chuyển sang grid auto-fit ở
     breakpoint mặc định, không còn dùng flex calc nữa. */
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .features-grid-5 { grid-template-columns: 1fr; }
  .grade-features { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
  .comparison-table-v2 th, .comparison-table-v2 td { padding: 10px 14px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
}
