/* ================================================================
   SINAESTA — Design System & Complete Stylesheet
   Medical Education Platform — Premium, Clean, Trustworthy
   ================================================================ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  /* Colors — Brand */
  --navy:        #163B75;
  --navy-dark:   #0E2A54;
  --navy-light:  #1E4D8F;
  --teal:        #0F8B8D;
  --teal-dark:   #0A6E70;
  --teal-light:  #14A8AA;
  --amber:       #F5B301;
  --amber-dark:  #D99E01;
  --amber-light: #FFD54F;

  /* Colors — Semantic */
  --success:     #16A34A;
  --success-bg:  #DCFCE7;
  --danger:      #DC2626;
  --danger-bg:   #FEE2E2;
  --warning:     #F59E0B;
  --warning-bg:  #FEF3C7;
  --info:        #0284C7;
  --info-bg:     #E0F2FE;

  /* Colors — Neutral */
  --gray-50:     #F7F9FC;
  --gray-100:    #F1F5F9;
  --gray-200:    #E2E8F0;
  --gray-300:    #CBD5E1;
  --gray-400:    #94A3B8;
  --gray-500:    #64748B;
  --gray-600:    #475569;
  --gray-700:    #334155;
  --gray-800:    #1E293B;
  --gray-900:    #0F172A;
  --white:       #FFFFFF;

  /* Typography */
  --font:        'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-primary:    #172B4D;
  --text-secondary:  #64748B;
  --text-muted:      #94A3B8;
  --text-inverse:    #FFFFFF;

  /* Spacing */
  --sp-1:  4px;   --sp-2:  8px;   --sp-3:  12px;  --sp-4:  16px;
  --sp-5:  20px;  --sp-6:  24px;  --sp-8:  32px;  --sp-10: 40px;
  --sp-12: 48px;  --sp-16: 64px;  --sp-20: 80px;  --sp-24: 96px;

  /* Radius */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm:   0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:      0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-md:   0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -4px rgba(15,23,42,0.04);
  --shadow-lg:   0 20px 25px -5px rgba(15,23,42,0.10), 0 8px 10px -6px rgba(15,23,42,0.04);

  /* Layout */
  --container:   1200px;
  --sidebar-w:   260px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: 200ms;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 80px; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--teal); }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { color: var(--text-primary); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { color: var(--text-secondary); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── Layout ────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-20) 0; }
.section-alt { background: var(--gray-50); }
.text-center { text-align: center; }

/* ── Scroll Animations ─────────────────────────────────────────── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.anim-fade-up.visible { opacity: 1; transform: translateY(0); }
.anim-delay-1 { transition-delay: 0.08s; }
.anim-delay-2 { transition-delay: 0.16s; }
.anim-delay-3 { transition-delay: 0.24s; }
.anim-delay-4 { transition-delay: 0.32s; }
.anim-delay-5 { transition-delay: 0.40s; }
.anim-delay-6 { transition-delay: 0.48s; }

/* ── Section Headers ───────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--sp-16);
}
.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(22,59,117,0.08), rgba(15,139,141,0.08));
  color: var(--navy);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: var(--sp-4);
}
.section-header h2 { margin-bottom: var(--sp-4); }
.section-header .lead { font-size: 1.05rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.navbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1rem; font-weight: 900;
}
.navbar-logo { height: 36px; width: auto; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
}
.navbar-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--duration) var(--ease);
}
.navbar-nav a:hover { color: var(--navy); background: rgba(22,59,117,0.05); }
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-2);
  flex-direction: column;
  gap: 5px;
}
.hamburger-line {
  width: 22px; height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1.4;
  min-height: 44px;
}
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); color: var(--white); }
.btn-accent { background: var(--amber); color: var(--gray-900); font-weight: 700; }
.btn-accent:hover { background: var(--amber-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: rgba(22,59,117,0.04); }
.btn-ghost { background: rgba(255,255,255,0.15); color: var(--white); border: 1px solid rgba(255,255,255,0.25); }
.btn-ghost:hover { background: rgba(255,255,255,0.25); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #B91C1C; color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #15803D; color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; min-height: 36px; }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--teal-dark) 100%);
  color: var(--white);
  padding: var(--sp-24) 0 var(--sp-20);
  position: relative;
  overflow: hidden;
  min-height: min(85vh, 720px);
  display: flex;
  align-items: center;
}
.hero-mesh {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.03) 1px, transparent 1px),
                    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-shape { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.03); }
.hero-shape-1 { width: 500px; height: 500px; top: -200px; right: -100px; }
.hero-shape-2 { width: 350px; height: 350px; bottom: -150px; left: -80px; }
.hero-shape-3 { width: 180px; height: 180px; top: 40%; left: 55%; background: rgba(245,179,1,0.06); }

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--sp-6);
  backdrop-filter: blur(8px);
}
.hero-badge-dot {
  width: 8px; height: 8px;
  background: #34D399;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.hero h1 {
  color: var(--white);
  margin-bottom: var(--sp-5);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.gradient-text {
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead {
  color: rgba(255,255,255,0.82);
  font-size: 1.1rem;
  margin-bottom: var(--sp-8);
  line-height: 1.75;
  max-width: 520px;
}
.hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.hero-cta .btn-accent { padding: 16px 28px; border-radius: var(--radius); font-size: 1rem; }
.hero-cta .btn-ghost { border-radius: var(--radius); padding: 16px 28px; }

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}
.hero-trust-avatars { display: flex; }
.trust-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.75rem;
  border: 2px solid rgba(255,255,255,0.3);
  margin-left: -8px;
}
.trust-avatar:first-child { margin-left: 0; }
.trust-text { color: rgba(255,255,255,0.75); font-size: 0.88rem; }
.trust-text strong { color: var(--white); }

/* Hero visual card */
.hero-visual { display: flex; justify-content: center; }
.hero-card-preview {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  width: 360px;
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-card-header { display: flex; gap: 6px; padding: 14px 18px; background: rgba(0,0,0,0.2); }
.hero-card-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-card-dot.green { background: #22C55E; }
.hero-card-dot.yellow { background: #EAB308; }
.hero-card-dot.red { background: #EF4444; }
.hero-card-body { padding: 20px; }
.hero-card-badge {
  display: inline-block;
  background: rgba(59,130,246,0.25);
  color: #93C5FD;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.hero-card-line { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.12); margin-bottom: 8px; }
.hero-card-line.long { width: 80%; }
.hero-card-line.medium { width: 65%; }
.hero-card-line.short { width: 45%; margin-bottom: var(--sp-5); }
.hero-card-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--sp-5); }
.hero-card-option {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}
.hero-card-option.selected {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #4ADE80;
}
.hero-card-footer { display: flex; justify-content: space-between; align-items: center; }
.hero-card-score { display: flex; align-items: center; gap: 8px; }
.hero-card-score-number { font-size: 1.8rem; font-weight: 800; color: var(--amber); }
.hero-card-score-label { color: rgba(255,255,255,0.5); font-size: 0.82rem; }
.hero-card-timer { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.5); font-size: 0.88rem; }
.hero-float {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  animation: floatBadge 4s ease-in-out infinite;
}
.hero-float-1 { top: 18%; right: -10px; animation-delay: 0s; }
.hero-float-2 { bottom: 25%; left: -20px; animation-delay: 1s; }
@keyframes floatBadge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ================================================================
   TRUST BAR
   ================================================================ */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--sp-5) 0;
}
.trust-items { display: flex; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.trust-item-icon { color: var(--teal); display: flex; }

/* ================================================================
   FEATURES GRID
   ================================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.features-grid > * { min-width: 0; }
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: all 250ms var(--ease);
}
.feature-card:hover { border-color: var(--navy); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-5);
}
.feature-card h4 { margin-bottom: var(--sp-2); font-size: 1.05rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ================================================================
   STATS
   ================================================================ */
.stats-section { background: var(--gray-50); }
.stats-showcase {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.stat-item { flex: 1; padding: var(--sp-8) var(--sp-6); text-align: center; }
.stat-divider { width: 1px; background: var(--gray-200); }
.stat-icon-large { color: var(--navy); margin-bottom: var(--sp-3); display: flex; justify-content: center; }
.stat-number {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: var(--sp-2); font-weight: 500; }

/* ================================================================
   SPECIALTIES
   ================================================================ */
.search-box { position: relative; max-width: 480px; margin: 0 auto var(--sp-10); }
.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  transition: all var(--duration) var(--ease);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  font-family: var(--font);
}
.search-box input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22,59,117,0.08); }
.search-box .search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.search-empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  color: var(--text-secondary);
}
.search-empty .icon { font-size: 3rem; margin-bottom: var(--sp-4); opacity: 0.4; }

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.specialty-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--sp-5);
  transition: all 250ms var(--ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.specialty-card:hover { border-color: var(--navy); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.specialty-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  margin-bottom: var(--sp-3);
}
.specialty-card h4 { margin-bottom: var(--sp-1); font-size: 0.9rem; color: var(--text-primary); }
.specialty-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.specialty-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--gray-100);
}
.specialty-count { font-size: 0.78rem; color: var(--navy); font-weight: 600; }
.specialty-arrow { color: var(--gray-300); transition: all var(--duration) var(--ease); font-size: 0.85rem; }
.specialty-card:hover .specialty-arrow { color: var(--navy); transform: translateX(3px); }

/* ================================================================
   TESTIMONIALS
   ================================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}
.testimonial-stars { color: var(--amber); font-size: 0.95rem; margin-bottom: var(--sp-4); letter-spacing: 2px; }
.testimonial-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-5); font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: var(--sp-3); }
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.8rem;
}
.author-info strong { display: block; font-size: 0.9rem; color: var(--text-primary); }
.author-info span { font-size: 0.8rem; color: var(--text-muted); }

/* ================================================================
   STEPS
   ================================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  text-align: center;
}
.step-card { position: relative; }
.step-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
  margin: 0 auto var(--sp-5);
  box-shadow: 0 4px 12px rgba(22,59,117,0.25);
}
.step-icon { color: var(--teal); margin-bottom: var(--sp-4); display: flex; justify-content: center; }
.step-card h4 { margin-bottom: var(--sp-2); }
.step-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ================================================================
   PRICING
   ================================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  max-width: 800px;
  margin: 0 auto;
  align-items: start;
}
.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  transition: all 250ms var(--ease);
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-featured {
  border-color: var(--navy);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--navy);
  position: relative;
}
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  color: var(--gray-900);
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}
.pricing-header { text-align: center; margin-bottom: var(--sp-6); }
.pricing-icon { font-size: 2.2rem; margin-bottom: var(--sp-3); }
.pricing-header h3 { margin-bottom: var(--sp-3); }
.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.price-currency { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.pricing-desc { color: var(--text-secondary); font-size: 0.88rem; margin-top: var(--sp-2); }
.pricing-features { margin: var(--sp-6) 0; }
.pricing-features li {
  padding: 10px 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gray-100);
}
.pricing-features .check { color: var(--success); font-weight: 700; font-size: 1rem; }
.pricing-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: var(--sp-3); }

/* ================================================================
   FAQ
   ================================================================ */
.faq-container { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: var(--sp-3);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);
}
.faq-item:hover { box-shadow: var(--shadow-xs); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-5) var(--sp-6);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--duration) var(--ease);
  font-family: var(--font);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.faq-question .arrow {
  transition: transform 250ms var(--ease);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: var(--sp-4);
}
.faq-item.active .faq-question .arrow { transform: rotate(180deg); color: var(--navy); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms var(--ease), padding 300ms var(--ease);
  padding: 0 var(--sp-6);
}
.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 var(--sp-6) var(--sp-5);
}
.faq-answer p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75; }

/* ================================================================
   CTA BANNER
   ================================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  padding: var(--sp-16) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.cta-content { position: relative; z-index: 1; }
.cta-content h2 { color: var(--white); margin-bottom: var(--sp-4); }
.cta-content p { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-bottom: var(--sp-8); max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-guarantee { display: block; margin-top: var(--sp-4); font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: var(--sp-10);
}
.footer-brand { margin-bottom: var(--sp-5); }
.footer-brand .footer-logo { height: 36px; width: auto; margin-bottom: var(--sp-4); }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; color: var(--gray-400); }
.footer-email { margin-top: var(--sp-3); font-size: 0.85rem; }
.footer-col h4 { color: var(--white); margin-bottom: var(--sp-5); font-size: 0.95rem; }
.footer-links li { margin-bottom: var(--sp-3); }
.footer-links a { color: var(--gray-400); font-size: 0.88rem; }
.footer-links a:hover { color: var(--white); }
.footer-disclaimer { font-size: 0.82rem; line-height: 1.7; color: var(--gray-500); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--sp-10);
  padding-top: var(--sp-5);
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-500);
}

/* ================================================================
   MOBILE BOTTOM CTA
   ================================================================ */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  z-index: 999;
  transform: translateY(100%);
  transition: transform 300ms var(--ease);
}
.mobile-cta.show { transform: translateY(0); }

/* ================================================================
   FORMS & AUTH
   ================================================================ */
.form-group { margin-bottom: var(--sp-4); }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--gray-700); font-size: 0.88rem; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all var(--duration) var(--ease);
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font);
}
.form-control:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22,59,117,0.08); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
textarea.form-control { min-height: 100px; resize: vertical; }

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--teal-dark) 100%);
  padding: var(--sp-10) var(--sp-5);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: var(--sp-10);
}
.auth-card .brand { text-align: center; margin-bottom: var(--sp-8); }
.auth-card .brand h3 { margin-top: var(--sp-3); margin-bottom: var(--sp-2); }
.auth-card .brand p { color: var(--text-secondary); font-size: 0.9rem; }
.auth-links { text-align: center; margin-top: var(--sp-5); font-size: 0.88rem; color: var(--text-secondary); }

/* ================================================================
   BADGES & ALERTS
   ================================================================ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: #DBEAFE; color: var(--navy); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-secondary { background: var(--gray-200); color: var(--gray-600); }

.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: var(--sp-4); font-weight: 500; font-size: 0.92rem; }
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: var(--danger-bg); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--info-bg); color: #075985; border: 1px solid #BAE6FD; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); }
th { background: var(--gray-50); font-weight: 600; color: var(--gray-700); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover td { background: var(--gray-50); }

/* ================================================================
   CARDS (Dashboard/Admin)
   ================================================================ */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); overflow: hidden; transition: box-shadow 250ms var(--ease); }
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: var(--sp-6); }
.card-header { padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--gray-200); font-weight: 600; font-size: 0.95rem; }

/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--gray-900);
  color: var(--white);
  padding: var(--sp-6) 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-brand {
  padding: 0 var(--sp-6);
  margin-bottom: var(--sp-8);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 900;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px var(--sp-6);
  color: var(--gray-400);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--duration) var(--ease);
  border-left: 3px solid transparent;
}
.sidebar-nav li a:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.sidebar-nav li a.active { background: rgba(255,255,255,0.08); color: var(--white); border-left-color: var(--teal); }
.sidebar-nav .nav-divider { border-top: 1px solid var(--gray-700); margin: var(--sp-4) var(--sp-6); }
.main-content { flex: 1; margin-left: var(--sidebar-w); padding: var(--sp-8); min-height: 100vh; background: var(--gray-50); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-8); }
.page-header h1 { font-size: 1.5rem; }

/* ================================================================
   STATS CARDS (Dashboard)
   ================================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-5); margin-bottom: var(--sp-8); }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-card .stat-icon.blue { background: #DBEAFE; color: var(--navy); }
.stat-card .stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.teal { background: #CCFBF1; color: var(--teal); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-secondary); }

/* ================================================================
   QUIZ
   ================================================================ */
.quiz-container { max-width: 800px; margin: 0 auto; }
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) var(--sp-6);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--sp-6);
  position: sticky;
  top: 72px;
  z-index: 50;
}
.quiz-timer { font-size: 1.3rem; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.quiz-progress { display: flex; align-items: center; gap: var(--sp-3); }
.quiz-progress-bar { width: 180px; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.quiz-progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--teal)); border-radius: 3px; transition: width 300ms var(--ease); }
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--sp-5);
}
.question-number { font-size: 0.82rem; color: var(--navy); font-weight: 600; margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: 0.5px; }
.question-text { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-6); line-height: 1.7; }
.options-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 44px;
}
.option-item:hover { border-color: var(--navy); background: rgba(22,59,117,0.02); }
.option-item.selected { border-color: var(--navy); background: #EFF6FF; }
.option-item.correct { border-color: var(--success); background: var(--success-bg); }
.option-item.wrong { border-color: var(--danger); background: var(--danger-bg); }
.option-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
  transition: all var(--duration) var(--ease);
}
.option-item.selected .option-letter { background: var(--navy); color: var(--white); }
.option-item.correct .option-letter { background: var(--success); color: var(--white); }
.option-item.wrong .option-letter { background: var(--danger); color: var(--white); }
.option-text { padding-top: 4px; line-height: 1.55; font-size: 0.95rem; color: var(--text-primary); }
.explanation-box { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: var(--radius); padding: var(--sp-5); margin-top: var(--sp-4); }
.explanation-box h5 { color: var(--navy); margin-bottom: var(--sp-2); font-size: 0.95rem; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-6); }
.quiz-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.quiz-dot.answered { border-color: var(--success); background: var(--success-bg); color: var(--success); }
.quiz-dot.bookmarked { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }

/* Bookmark Button */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.bookmark-btn:hover { border-color: var(--danger); color: var(--danger); background: #FFF5F5; }
.bookmark-btn.bookmarked { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.bookmark-btn .bookmark-text { display: inline; }
@media (max-width: 480px) { .bookmark-btn .bookmark-text { display: none; } }

/* ================================================================
   QUIZ LOADING SPINNER
   ================================================================ */
.quiz-loading {
  display: none;
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}
.quiz-loading.show { display: flex; }
.quiz-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-loading p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}

/* Keyboard shortcut hint */
.keyboard-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: var(--sp-2);
  padding: 6px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.keyboard-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: monospace;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--gray-300);
  margin: 0 2px;
}

/* ================================================================
   RESULT
   ================================================================ */
.result-card { text-align: center; padding: var(--sp-12) var(--sp-8); background: var(--white); border-radius: var(--radius-xl); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.result-score { font-size: 4rem; font-weight: 900; margin: var(--sp-5) 0; line-height: 1; }
.result-score.excellent { color: var(--success); }
.result-score.good { color: var(--navy); }
.result-score.average { color: var(--warning); }
.result-score.poor { color: var(--danger); }

/* ================================================================
   PAYMENT
   ================================================================ */
.payment-info { background: #EFF6FF; border: 2px solid #BFDBFE; border-radius: var(--radius-lg); padding: var(--sp-6); margin-bottom: var(--sp-6); }
.payment-info h3 { color: var(--navy); margin-bottom: var(--sp-4); }
.proof-preview { max-width: 280px; margin-top: var(--sp-3); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: var(--sp-16) var(--sp-6); color: var(--text-secondary); }
.empty-state .icon { font-size: 3.5rem; margin-bottom: var(--sp-4); opacity: 0.4; }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); max-width: 600px; width: 90%;
  max-height: 80vh; overflow-y: auto; padding: var(--sp-8);
  transform: translateY(16px); transition: transform 250ms var(--ease);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); padding: var(--sp-2); }

/* ================================================================
   PROBLEM CARDS (if used)
   ================================================================ */
.problem-card { background: var(--white); border-radius: var(--radius-lg); padding: var(--sp-8); text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.problem-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.problem-icon { font-size: 2.2rem; margin-bottom: var(--sp-4); }

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.mb-1{margin-bottom:var(--sp-2)} .mb-2{margin-bottom:var(--sp-4)} .mb-3{margin-bottom:var(--sp-6)} .mb-4{margin-bottom:var(--sp-8)}
.mt-1{margin-top:var(--sp-2)} .mt-2{margin-top:var(--sp-4)} .mt-3{margin-top:var(--sp-6)} .mt-4{margin-top:var(--sp-8)}

/* ================================================================
   RESPONSIVE — TABLET (≤1024px)
   ================================================================ */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .specialty-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   RESPONSIVE — MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
  .section { padding: var(--sp-12) 0; }
  .section-header { margin-bottom: var(--sp-10); }

  .navbar-toggle { display: flex; }
  .navbar-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--sp-4);
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .navbar-nav.show { display: flex; }
  .navbar-nav li { width: 100%; }
  .navbar-nav a { display: block; padding: 12px var(--sp-4); width: 100%; }
  .navbar-nav .btn { width: 100%; text-align: center; }

  .hero { padding: var(--sp-16) 0 var(--sp-12); min-height: auto; }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  .trust-items { gap: var(--sp-5); }
  .trust-item { font-size: 0.8rem; }

  .features-grid { grid-template-columns: 1fr; }
  .specialty-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .pricing-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }

  .stats-showcase { flex-direction: column; }
  .stat-item { padding: var(--sp-5); }

  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }

  .mobile-cta { display: block; }

  .sidebar { display: none; }
  .sidebar.show { display: block; }
  .sidebar-toggle { display: flex !important; }
  .main-content { margin-left: 0; }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .sidebar-backdrop.show { display: block; }

  .quiz-header { flex-direction: column; gap: var(--sp-3); }
  .quiz-progress-bar { width: 100%; }
}

/* ================================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .hero { padding: var(--sp-12) 0 var(--sp-10); }
  .hero h1 { font-size: 1.6rem; }
  .section { padding: var(--sp-10) 0; }
  .specialty-grid { grid-template-columns: 1fr; }
  .auth-card { padding: var(--sp-8) var(--sp-5); }
  .pricing-card { padding: var(--sp-6); }
  .price-amount { font-size: 2rem; }
  .result-score { font-size: 3rem; }
}

/* ================================================================
   DARK MODE — html[data-theme='dark']
   Toggle: .theme-toggle (di-inject otomatis oleh app.js ke sidebar/navbar)
   Persist: localStorage 'sinaesta-theme'; fallback: prefers-color-scheme
   ================================================================ */
html[data-theme='dark'] {
  /* Surface & neutral remap */
  --white:        #0F1B2D;
  --gray-50:      #14243B;
  --gray-100:     #1B2E4A;
  --gray-200:     #2A3F5F;
  --gray-300:     #3B527A;
  --gray-400:     #5B7295;
  --gray-500:     #8FA3BF;
  --gray-600:     #A9BAD2;
  --gray-700:     #C7D3E3;
  --gray-800:     #E0E8F2;
  --gray-900:     #F2F6FB;
  --text-primary:   #E7EEF8;
  --text-secondary: #A9BAD2;
  --text-muted:     #7B90AE;

  /* Shadows lebih pekat di dark mode */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.40);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.50);
  --shadow:    0 4px 6px -1px rgba(0,0,0,0.50);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.50);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.55);

  color-scheme: dark;
}

html[data-theme='dark'] img { background: transparent; }

/* Link & logo agar kontras di dark mode */
html[data-theme='dark'] a { color: #7EB3FF; }
html[data-theme='dark'] a:hover { color: var(--teal-light); }
html[data-theme='dark'] .logo-icon {
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
  color: #FFFFFF;
}

/* Navbar & footer adaptif dark mode */
html[data-theme='dark'] .navbar {
  background: #0F1B2D;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: #1B2E4A;
}
html[data-theme='dark'] .footer {
  background: #0A1220;
  border-top: 1px solid #1B2E4A;
}

/* Theme toggle button (theme-aware otomatis via token) */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--gray-200); border-radius: var(--radius-full);
  padding: 8px 14px; min-height: 44px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all var(--duration) var(--ease);
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Sidebar tetap gelap di kedua tema (identitas visual aplikasi) */
html[data-theme='dark'] .sidebar {
  background: linear-gradient(180deg, #0A1220, #0D1B33) !important;
  border-right: 1px solid #1B2E4A;
}
html[data-theme='dark'] .sidebar .sidebar-toggle { color: var(--gray-300); }

/* ================================================================
   SKELETON LOADING — placeholder shimmer
   Pakai: <div class="skeleton skeleton-text"></div> dst.
   ================================================================ */
.skeleton {
  position: relative; overflow: hidden; display: block;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  min-height: 1em;
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: skeleton-shimmer 1.4s infinite var(--ease);
}
html[data-theme='dark'] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.skeleton.skeleton-text   { height: 0.8em; margin: 0.4em 0; }
.skeleton.skeleton-title  { height: 1.4em; width: 55%; margin: 0.4em 0; }
.skeleton.skeleton-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.skeleton.skeleton-card   { height: 120px; border-radius: var(--radius-lg); }
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }

/* Image loading state — dipasang otomatis oleh app.js sampai <img> selesai load */
.img-loading {
  min-height: 120px;
  background: var(--gray-100) linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent) no-repeat;
  background-size: 200% 100%;
  animation: img-shimmer 1.4s infinite var(--ease);
  border-radius: var(--radius-sm);
}
html[data-theme='dark'] .img-loading {
  background: var(--gray-100) linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent) no-repeat;
  background-size: 200% 100%;
}
@keyframes img-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .skeleton::after, .img-loading { animation: none; }
}

/* ================================================================
   TOPIC PERFORMANCE ANALYTICS — Dashboard weakest-topics cards
   ================================================================ */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.perf-card {
  display: block;
  padding: var(--sp-4);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.perf-card:hover, .perf-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-light);
}
.perf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.perf-topic { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; line-height: 1.3; }
.perf-spec { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.perf-score {
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}
.perf-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  border-radius: var(--radius-full);
}
.perf-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.perf-trend { font-weight: 700; white-space: nowrap; }
.perf-up .perf-trend { color: var(--success); }
.perf-down .perf-trend { color: var(--danger); }
.perf-flat .perf-trend { color: var(--text-secondary); }
.perf-spark {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: var(--sp-2);
}
.perf-spark polyline { stroke: var(--teal); stroke-linecap: round; stroke-linejoin: round; }
.perf-down .perf-spark polyline { stroke: var(--danger); }
.perf-up .perf-spark polyline { stroke: var(--success); }

@media print {
  .perf-grid { display: none !important; }
}

/* ================================================================
   PRINT — dioptimalkan untuk halaman hasil kuis (quiz-result.php)
   dan aman untuk seluruh halaman lain.
   ================================================================ */
@media print {
  /* Sembunyikan chrome aplikasi & elemen interaktif */
  .sidebar, .sidebar-toggle, .sidebar-backdrop, .navbar, .navbar-toggle,
  .btn, .mobile-cta, .footer, .theme-toggle, .quiz-loading, .quiz-timer,
  .bookmark-btn, .quiz-dots, .hero-float, .hero-cta, .trust-bar,
  .alert { display: none !important; }

  /* Layout flat satu kolom */
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  .dashboard-layout { display: block !important; }
  .container { max-width: 100% !important; padding: 0 !important; }

  /* Paksa light & hemat tinta, apapun tema aktif */
  html[data-theme='dark'], html[data-theme='dark'] body,
  body { background: #FFFFFF !important; color: #172B4D !important; }

  /* Tipografi cetak */
  body { font-size: 12.5pt; }
  .result-score { font-size: 32pt !important; }

  /* Kartu: tanpa shadow, border tipis, tidak terpotong antar halaman */
  .card, .result-card, .question-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  .question-card { margin-bottom: 14mm; }
  .explanation-box {
    break-inside: avoid; page-break-inside: avoid;
    background: #F1F5F9 !important;
  }

  /* Koreksi jawaban harus terbaca meski dicetak grayscale */
  .option-item.correct { outline: 2px solid #16A34A; }
  .option-item.correct .option-letter {
    background: #16A34A !important; color: #FFFFFF !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .option-item.wrong { outline: 2px solid #DC2626; }
  .option-item.wrong .option-letter {
    background: #DC2626 !important; color: #FFFFFF !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
