:root {
  --bg: #FDF6F0;
  --surface: #FFFFFF;
  --primary: #B4436C;
  --primary-dark: #8C2F53;
  --secondary: #5C7AEA;
  --text: #2B2333;
  --text-soft: #6B6270;
  --border: #EDE1DA;
  --success: #4C9A6A;
  --gold: #C9942C;
  --anatomy: #5C7AEA;
  --consent: #B4436C;
  --sti: #D9634D;
  --contraception: #4C9A6A;
  --myths: #C9942C;
  --relationships: #8C6FB0;
  --cycle-basics: #2E9E8F;
  --period-symptoms: #D9634D;
  --period-products: #5C7AEA;
  --fertility-basics: #C9942C;
  --body-image: #B87FA3;
  --self-esteem: #E0A458;
  --emotional-intimacy: #6E9887;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* ---------- Header / Nav ---------- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
}
.logo { font-size: 18px; font-weight: 800; color: var(--primary); cursor: pointer; }
nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
nav a { font-size: 13px; font-weight: 700; color: var(--text-soft); cursor: pointer; }
nav a.active { color: var(--primary); }
.lang-switcher {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
}

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 28px 20px 70px; min-height: 70vh; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 34px; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--text-soft); font-size: 16px; max-width: 560px; }
.hub-hero-icons { display: flex; gap: 8px; margin-bottom: 14px; }
.hub-hero-icons > div { width: 56px; height: 34px; }
.hub-hero-icons svg { width: 100%; height: 100%; }
.hero-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: 18px; display: block; }

/* ---------- Stats bar ---------- */
.stats-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.stat-pill {
  flex: 1;
  min-width: 90px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.stat-pill strong { display: block; font-size: 20px; font-weight: 900; color: var(--primary); }
.stat-pill span { font-size: 11px; color: var(--text-soft); font-weight: 700; }

/* ---------- Daily tip card ---------- */
.daily-tip-card {
  background: linear-gradient(135deg, var(--primary)10, var(--secondary)10);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 8px;
}
.daily-tip-label { font-size: 12px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.daily-tip-card p { font-size: 14px; line-height: 1.6; margin-bottom: 10px; color: var(--text); }

/* ---------- Category tile icon (home page) ---------- */
.category-tile { text-align: center; padding: 26px 18px; }
.category-tile-icon { width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.category-tile-icon svg { width: 90px; height: 54px; }
.category-tile-img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }

.hub-tile { padding: 26px 22px; border-width: 2px; }
.hub-tile h3 { font-size: 19px; margin-bottom: 8px; }
.hub-tile p { font-size: 14px; margin-bottom: 10px; }

/* ---------- Streak badge ---------- */
.streak-badge {
  background: var(--gold);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Quick search box (home) ---------- */
.quick-search-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 8px;
}
.quick-search-label { font-size: 13px; font-weight: 700; color: var(--text-soft); margin-bottom: 8px; }

/* ---------- Bookmark button ---------- */
.bookmark-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.bookmark-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---------- Video library ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-locked {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-soft);
}
.video-locked .icon { font-size: 28px; margin-bottom: 6px; }
.video-card h3 { font-size: 15px; font-weight: 700; margin: 10px 0 4px; }
.video-source { font-size: 11.5px; color: var(--text-soft); font-weight: 700; margin-bottom: 6px; }
.video-card p { font-size: 13px; color: var(--text-soft); }

/* ---------- Contraception finder ---------- */
.finder-result-card {
  background: var(--surface);
  border: 2px solid var(--success);
  border-radius: 18px;
  padding: 26px;
  position: relative;
}
.finder-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--success);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
}
.finder-result-card h2 { font-size: 22px; font-weight: 800; margin: 6px 0 8px; }
.finder-stats { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.finder-stats div { background: var(--bg); border-radius: 12px; padding: 12px 16px; text-align: center; flex: 1; min-width: 100px; }
.finder-stats strong { display: block; font-size: 15px; color: var(--primary); }
.finder-stats span { font-size: 11px; color: var(--text-soft); }
.finder-detail { font-size: 14px; line-height: 1.7; margin-top: 14px; }

/* ---------- Cycle calculator ---------- */
.cycle-results-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 16px;
}
.cycle-result-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cycle-result-row:last-child { border-bottom: none; }

/* ---------- Category landing page hero ---------- */
.category-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 10px;
}
.category-hero-icon { flex-shrink: 0; width: 110px; height: 70px; }
.category-hero-icon svg { width: 100%; height: 100%; }
.category-hero-img { width: 140px; height: 140px; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
.category-hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.category-hero p { font-size: 15px; color: var(--text-soft); max-width: 480px; }

/* ---------- Article header icon ---------- */
.article-header-icon { width: 70px; height: 44px; margin-bottom: 10px; }
.article-header-icon svg { width: 100%; height: 100%; }
.article-header-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; margin-bottom: 14px; }

/* ---------- Key takeaways box ---------- */
.takeaways-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 20px 0 26px;
}
.takeaways-title { font-weight: 800; font-size: 14px; color: var(--primary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.takeaways-box ul { padding-left: 20px; }
.takeaways-box li { font-size: 14px; margin-bottom: 8px; line-height: 1.5; }

/* ---------- Ad slot ---------- */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
  margin: 20px 0;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43,35,51,0.10); }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-bottom: 12px; }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 7px; line-height: 1.3; }
.card p { font-size: 13.5px; color: var(--text-soft); }
.card .meta { font-size: 11.5px; color: var(--text-soft); font-weight: 700; margin-top: 12px; }
.lock-icon { float: right; font-size: 15px; }
.card-icon { width: 100%; height: 50px; margin-bottom: 10px; }
.card-icon svg { width: 70px; height: 44px; }
.card-icon-img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }

/* ---------- Category filter pills ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--text-soft);
}
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Search ---------- */
.search-box {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 6px;
}

/* ---------- Article page ---------- */
.article-title { font-size: 30px; font-weight: 800; margin: 10px 0 8px; line-height: 1.25; }
.article-meta { color: var(--text-soft); font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.article-body { font-size: 17px; line-height: 1.85; }
.article-body .body-para { margin-bottom: 20px; }
.article-body .body-heading { font-size: 21px; font-weight: 800; margin: 30px 0 14px; color: var(--text); }
.article-body .body-heading:first-child { margin-top: 0; }
.article-body .body-list { margin: 0 0 20px 20px; }
.article-body .body-list li { margin-bottom: 10px; }

.locked-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
}
.locked-box .icon { font-size: 34px; margin-bottom: 10px; }
.locked-box h3 { font-size: 18px; margin-bottom: 8px; }
.locked-box p { color: var(--text-soft); font-size: 14px; margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; margin-bottom: 10px; }
.btn-secondary { background: var(--secondary); color: #fff; width: 100%; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }

/* ---------- Quiz ---------- */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(43,35,51,0.05);
}
.quiz-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  margin-bottom: 16px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 0.35s ease;
}
.quiz-progress-label { font-size: 12px; font-weight: 700; color: var(--text-soft); margin-bottom: 18px; letter-spacing: 0.3px; text-transform: uppercase; }
.quiz-question { font-size: 21px; font-weight: 800; margin-bottom: 22px; line-height: 1.35; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--primary); transform: translateX(2px); }
.option .radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.option.correct { background: #4C9A6A14; border-color: var(--success); }
.option.correct .radio { background: var(--success); border-color: var(--success); color: #fff; }
.option.wrong { background: #D9634D14; border-color: #D9634D; }
.option.wrong .radio { background: #D9634D; border-color: #D9634D; color: #fff; }
.option.disabled-option { cursor: default; }
.option.disabled-option:hover { transform: none; border-color: inherit; }

.quiz-explanation {
  background: var(--bg);
  border-left: 4px solid var(--secondary);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0 6px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  animation: fadeIn 0.3s ease;
}
.quiz-explanation .label { font-weight: 800; color: var(--secondary); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 6px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.score-ring-wrap { display: flex; justify-content: center; margin: 10px 0 20px; }
.score-ring-label { font-size: 26px; font-weight: 900; fill: var(--primary); }
.review-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  text-align: left;
}
.review-item .q-text { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.review-item .answer-row { font-size: 13px; margin-bottom: 4px; }
.review-item .answer-row.was-wrong { color: #D9634D; }
.review-item .answer-row.was-right { color: var(--success); }

/* ---------- Premium ---------- */
.plan-card {
  display: flex; justify-content: space-between; align-items: center;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.plan-card.selected { border-color: var(--primary); background: #B4436C10; }
.benefits { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 20px; }
.benefits div { display: flex; align-items: center; margin-bottom: 10px; font-size: 14px; }
.benefits div:before { content: "✓"; color: var(--success); font-weight: 900; margin-right: 10px; }

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-soft);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--primary); font-weight: 700; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  nav#navLinks {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    left: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(43,35,51,0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    z-index: 200;
  }
  nav#navLinks.nav-open { display: flex; }
  nav#navLinks a {
    padding: 12px 14px;
    border-radius: 10px;
  }
  nav#navLinks a:hover { background: var(--bg); }
  nav#navLinks .lang-switcher { margin: 8px 6px 4px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
}
