:root {
  --bg: #0F1115;
  --bg-elevated: #13161C;
  --surface: rgba(30,34,43,0.7);
  --surface-solid: #1E222B;
  --primary: #2DD4BF;
  --primary-dark: #1FA895;
  --secondary: #86EFAC;
  --text: #F3F4F6;
  --text-soft: #9CA3AF;
  --border: rgba(243,244,246,0.08);
  --border-accent: rgba(45,212,191,0.15);
  --success: #86EFAC;
  --danger: #F08B72;
  --gold: #E8C170;
  --anatomy: #7DA3F5;
  --consent: #2DD4BF;
  --sti: #F08B72;
  --contraception: #86EFAC;
  --myths: #E8C170;
  --relationships: #B79CE0;
  --cycle-basics: #4FD6C4;
  --period-symptoms: #F08B72;
  --period-products: #7DA3F5;
  --fertility-basics: #E8C170;
  --body-image: #E0A3C8;
  --self-esteem: #F0C27E;
  --emotional-intimacy: #8FCBAE;
  --story-series: #D4A574;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 0%, rgba(45,212,191,0.06), transparent 40%), radial-gradient(circle at 90% 30%, rgba(134,239,172,0.05), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; letter-spacing: 0.2px; }

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

/* ---------- Header / Nav ---------- */
header {
  background: rgba(15,17,21,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45,212,191,0.08);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  width: 38px;
  height: 38px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.nav-toggle:hover { background: rgba(45,212,191,0.15); transform: scale(1.05); }
.logo { font-size: 18px; font-weight: 800; color: var(--primary); cursor: pointer; font-family: 'Playfair Display', serif; letter-spacing: 0.5px; }

nav#navLinks {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: rgba(19,22,28,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-accent);
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 80px 16px 20px;
  z-index: 200;
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
nav#navLinks.nav-open { display: flex; opacity: 1; transform: translateX(0); }
nav#navLinks a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  padding: 13px 14px;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease;
}
nav#navLinks a:hover, nav#navLinks a.active { background: rgba(45,212,191,0.1); color: var(--primary); }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 150;
}
.nav-backdrop.nav-open { display: block; }

.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-solid);
  cursor: pointer;
}
.lang-switcher option {
  background: var(--surface-solid);
  color: var(--text);
}

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 28px 20px 70px; min-height: 70vh; }
.page-fade { animation: pageFadeIn 0.4s cubic-bezier(0.4,0,0.2,1); }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 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; }

/* ---------- Top Picks carousel ---------- */
.tp-carousel { margin: 18px 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-accent); background: var(--surface); backdrop-filter: blur(12px); }
.tp-header { padding: 12px 18px 0; font-size: 12px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.4px; }
.tp-track { display: flex; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.tp-slide { flex: 0 0 100%; padding: 18px 22px 22px; text-decoration: none; color: var(--text); }
.tp-rank { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--gold); opacity: 0.6; }
.tp-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; margin-left: 8px; }
.tp-slide h3 { font-size: 17px; margin: 6px 0 4px; }
.tp-slide p { font-size: 13px; color: var(--text-soft); }
.tp-dots { display: flex; gap: 6px; justify-content: center; padding: 4px 0 14px; }
.tp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-accent); cursor: pointer; transition: all 0.3s ease; }
.tp-dot.active { width: 18px; border-radius: 3px; background: var(--primary); }

/* ---------- Affiliate box ---------- */
.affiliate-box { background: var(--surface); border: 1px solid var(--border-accent); border-radius: 14px; padding: 16px 18px; margin: 20px 0; }
.affiliate-label { font-size: 11px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.affiliate-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--primary); background: rgba(45,212,191,0.06); border: 1px solid var(--border-accent); padding: 8px 12px; border-radius: 10px; margin: 0 8px 8px 0; text-decoration: none; }
.affiliate-tag { font-size: 10px; color: var(--text-soft); }
.affiliate-disclosure { font-size: 10px; color: var(--text-soft); margin-top: 8px; }

/* ---------- 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: #0F1115;
  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: #0F1115; 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: #0F1115;
  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: rgba(255,255,255,0.02);
  border: 1px solid 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);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}
.card:hover { transform: scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,0.35); border-color: rgba(45,212,191,0.35); }
.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; font-family: 'Inter', sans-serif; }
.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: #0F1115; border-color: var(--primary); font-weight: 800; }

/* ---------- 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: #0F1115; width: 100%; margin-bottom: 10px; font-weight: 800; }
.btn-secondary { background: var(--secondary); color: #0F1115; width: 100%; font-weight: 800; }
.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 8px 32px rgba(0,0,0,0.3);
}
.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: rgba(134,239,172,0.12); border-color: var(--success); }
.option.correct .radio { background: var(--success); border-color: var(--success); color: #0F1115; }
.option.wrong { background: rgba(240,139,114,0.12); border-color: var(--danger); }
.option.wrong .radio { background: var(--danger); border-color: var(--danger); color: #0F1115; }
.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: var(--danger); }
.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#navLinks .lang-switcher { margin: 8px 6px 4px; }
}

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