/* ============================================================
   GUIDE24 — Main Stylesheet
   Mobile-first, lightweight, optimised for PageSpeed
   Theme values come from config.js via CSS custom properties
   ============================================================ */

/* ─── CSS Custom Properties (set via config.js at runtime) ── */
:root {
  --primary: #1a3c6e;
  --primary-light: #2b5ea7;
  --primary-dark: #0f2440;
  --accent: #3a8fd4;
  --accent-light: #63b3ed;
  --surface: #f0f6fc;
  --surface-alt: #e1edf9;
  --white: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #a0aec0;
  --success: #38a169;
  --warning: #d69e2e;
  --error: #e53e3e;
  --border: #d2dce8;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow-sm: 0 1px 3px rgba(26,60,110,0.08);
  --shadow-md: 0 4px 14px rgba(26,60,110,0.1);
  --shadow-lg: 0 10px 30px rgba(26,60,110,0.12);
  --shadow-xl: 0 20px 50px rgba(26,60,110,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1140px;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
button { cursor: pointer; border: none; font-family: var(--font-body); }
ul, ol { list-style: none; }

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
p { color: var(--text-secondary); }

.highlight { color: var(--accent); }
.text-center { text-align: center; }

/* ─── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section--alt {
  background: var(--surface);
}

/* ─── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(26,60,110,0.3);
}

.btn--primary:hover {
  background: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,60,110,0.35);
}

.btn--secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(58,143,212,0.3);
}

.btn--accent:hover {
  background: var(--accent-light);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--whatsapp {
  background: #25d366;
  color: var(--white);
}

.btn--whatsapp:hover {
  background: #20bd5a;
  color: var(--white);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn--sm { padding: 10px 22px; font-size: 0.875rem; }
.btn--lg { padding: 18px 40px; font-size: 1.1rem; }
.btn--block { display: flex; width: 100%; }

.btn:active { transform: translateY(0) scale(0.98); }

/* ─── Header / Nav ─────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--primary);
  background: var(--surface);
}

.nav__cta {
  padding: 10px 24px;
  background: var(--primary);
  color: var(--white) !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav__cta:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(160deg, var(--white) 0%, var(--surface) 50%, var(--surface-alt) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(58,143,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26,60,110,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.hero__stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Feature Cards / How It Works ─────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.step-card__number {
  width: 48px;
  height: 48px;
  background: var(--surface);
  color: var(--primary);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 12px;
}

.step-card p {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ─── FAQ / Accordion ──────────────────────────────────────── */
.faq-list {
  max-width: 740px;
  margin: 48px auto 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--white);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-primary);
  text-align: left;
  gap: 16px;
  transition: background var(--transition);
}

.faq-question:hover { background: var(--surface); }

.faq-question__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.active .faq-question__icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer__inner {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── About Section ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}

.about-visual {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.about-visual__emoji {
  font-size: 4rem;
  margin-bottom: 16px;
  display: block;
}

.about-visual__text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.about-content h2 { margin-bottom: 16px; }
.about-content p { margin-bottom: 14px; line-height: 1.75; }

/* ─── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  padding: 64px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 14px;
  position: relative;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.footer__brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__link {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.8rem;
}

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

.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--accent);
  color: var(--white);
}

/* ─── Quiz Page ────────────────────────────────────────────── */
.quiz-page {
  padding: 100px 0 60px;
  min-height: 100vh;
  background: var(--surface);
}

.quiz-container {
  max-width: 680px;
  margin: 0 auto;
}

/* Progress Bar */
.progress {
  margin-bottom: 32px;
}

.progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress__count {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.progress__bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Category Badge */
.quiz-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

/* Question Card */
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-card__text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 28px;
  line-height: 1.4;
}

/* Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

.option:hover {
  border-color: var(--accent-light);
  background: var(--white);
  transform: translateX(4px);
}

.option.selected {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,60,110,0.1);
}

.option__marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.7rem;
  color: transparent;
}

.option.selected .option__marker {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Quiz Navigation */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 16px;
}

/* ─── Results Page ─────────────────────────────────────────── */
.results-page {
  padding: 100px 0 60px;
  min-height: 100vh;
  background: var(--surface);
}

.results-container {
  max-width: 800px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header__emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.results-header h1 { margin-bottom: 12px; }
.results-header p { max-width: 500px; margin: 0 auto; }

/* Score Summary */
.score-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.score-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
}

.score-card__icon { font-size: 1.5rem; margin-bottom: 8px; }

.score-card__value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.score-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Course Recommendation Cards */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all var(--transition);
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.course-card__rank {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.course-card__rank--top {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
}

.course-card__info { flex: 1; }

.course-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.course-card__field {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.course-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.course-card__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.course-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.course-card__careers {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.course-card__careers-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.course-card__careers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.career-tag {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Match Percentage Bar */
.course-card__match {
  flex-shrink: 0;
  text-align: center;
  min-width: 60px;
}

.match-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--match-pct, 0%), var(--border) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.match-ring__inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--primary);
}

.match-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Share Section */
.share-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  border: 1px solid var(--border);
}

.share-section h3 { margin-bottom: 12px; }
.share-section p { margin-bottom: 20px; font-size: 0.9rem; }

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Legal / Contact Pages ────────────────────────────────── */
.page {
  padding: 100px 0 60px;
  min-height: 100vh;
}

.page__content {
  max-width: 740px;
  margin: 0 auto;
}

.page__content h1 {
  margin-bottom: 8px;
}

.page__content .page__updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.page__content h2 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.page__content p {
  margin-bottom: 16px;
  line-height: 1.75;
}

/* Contact Form */
.contact-form {
  max-width: 560px;
  margin: 32px auto 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,143,212,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  transform: translateY(0);
}

/* ─── Ad Placeholders ──────────────────────────────────────── */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 24px 0;
  /* Hidden until ads are enabled */
}

.ad-slot[data-ad-enabled="false"] {
  display: none;
}

/* ─── Loading / Skeleton ───────────────────────────────────── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Animations ───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.35s; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { 
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 4px;
  }

  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }

  .nav__link, .nav__cta {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  .hero { padding: 100px 0 60px; }
  .hero__stats { gap: 24px; flex-wrap: wrap; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-visual { order: -1; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }

  .question-card { padding: 28px 20px; }
  .question-card__text { font-size: 1.1rem; }

  .course-card { flex-direction: column; }
  .course-card__match { align-self: flex-start; }

  .score-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__stat-number { font-size: 1.4rem; }
  .steps { grid-template-columns: 1fr; }
  .share-buttons { flex-direction: column; }
}

/* ─── Print ────────────────────────────────────────────────── */
@media print {
  .header, .footer, .cta-banner, .share-section, .quiz-nav, .ad-slot { display: none; }
  .page, .results-page { padding-top: 20px; }
  body { color: #000; }
}
