@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-light: #dbeafe;
  --primary-dark: #1d4ed8;
  --secondary: #0891b2;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 10px 40px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

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

.nav-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; color: var(--primary-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.45rem 1rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  transition: background 0.15s !important;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--primary-dark) !important; color: var(--white) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 40%, #0891b2 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content { max-width: 760px; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 580px;
}

.answer-block {
  background: rgba(255,255,255,0.12);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(4px);
  margin-bottom: 2rem;
}
.answer-block-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.answer-block p {
  color: var(--white);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.6;
}

/* Answer block on white pages */
.answer-block-page {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.answer-block-page .answer-block-label { color: var(--primary); }
.answer-block-page p { color: var(--text); margin: 0; }

/* ===== STAT GRID ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 3px solid var(--primary);
}

.stat-number {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ===== CONTENT GRID ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.article-body {
  max-width: 720px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 0.75rem; line-height: 1.5; }
.card-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); }

/* Topic cluster cards */
.topic-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.topic-card a { text-decoration: none; }
.topic-card a:hover { text-decoration: none; }

/* ===== AFFILIATE BOX ===== */
.affiliate-box {
  background: var(--accent-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
}
.affiliate-box h3 { color: #92400e; margin-bottom: 0.5rem; }
.affiliate-box p { color: #78350f; font-size: 0.95rem; margin-bottom: 1rem; }
.affiliate-box .affiliate-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.affiliate-box a {
  display: inline-block;
  background: #d97706;
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
  text-decoration: none;
}
.affiliate-box a:hover { background: #b45309; text-decoration: none; }

/* ===== FAQ ===== */
.faq-section { margin: 3rem 0; }
.faq-section h2 { margin-bottom: 1.5rem; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  font-weight: 400;
}

details[open] .faq-question::after { content: '-'; }

.faq-answer {
  padding-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-answer p:last-child { margin: 0; }

/* ===== TAG / PILL ===== */
.tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-green { background: #d1fae5; color: #065f46; }
.tag-amber { background: var(--accent-light); color: #92400e; }
.tag-teal { background: #cffafe; color: #164e63; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { opacity: 0.5; }

/* ===== AUTHOR BOX ===== */
.author-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 2.5rem 0;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.author-info { flex: 1; }
.author-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.author-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.author-bio { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ===== MEDICAL DISCLAIMER ===== */
.medical-disclaimer {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: #7f1d1d;
  line-height: 1.6;
  margin: 2rem 0;
}
.medical-disclaimer strong { display: block; margin-bottom: 0.25rem; }

/* ===== TOC ===== */
.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}
.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 0; }
.toc a {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: block;
  padding: 0.3rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.toc a:hover { color: var(--primary); border-left-color: var(--primary); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.btn-primary:hover { background: var(--primary-dark); color: var(--white); text-decoration: none; transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--primary);
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--primary-light); text-decoration: none; }

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.comparison-table th {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.comparison-table th:first-child { border-radius: 8px 0 0 0; }
.comparison-table th:last-child { border-radius: 0 8px 0 0; }
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.comparison-table tr:nth-child(even) td { background: var(--bg); }
.comparison-table tr:last-child td:first-child { border-radius: 0 0 0 8px; }
.comparison-table tr:last-child td:last-child { border-radius: 0 0 8px 0; }

/* ===== INFO BOX ===== */
.info-box {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.info-box h4 { color: var(--primary-dark); margin-bottom: 0.5rem; font-size: 0.95rem; }
.info-box p, .info-box li { color: #1e40af; font-size: 0.9rem; }
.info-box ul { margin: 0; }

.warning-box {
  background: #fff7ed;
  border-left: 3px solid #f97316;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.warning-box p { color: #9a3412; font-size: 0.9rem; margin: 0; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
}
.page-header h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin: 0; max-width: 620px; }

/* ===== SECTION SPACING ===== */
.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.section-lg { padding: 5rem 0; }

section h2 { margin-bottom: 1.25rem; }

/* ===== LAST UPDATED ===== */
.last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

/* ===== BLOG POST META ===== */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.post-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* ===== BLOG CARD ===== */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.blog-card .tag { margin-bottom: 0.75rem; }
.blog-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; }
.blog-card-meta { font-size: 0.8rem; color: var(--text-muted); }

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border-top: 4px solid var(--success);
  margin: 2rem 0;
}
.highlight-box h3 { color: var(--success); margin-bottom: 0.75rem; }

/* ===== FOOTER ===== */
.footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 3.5rem 0 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.footer-blurb { font-size: 0.875rem; line-height: 1.6; margin-bottom: 1rem; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--white); }

.footer-disclaimer {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  line-height: 1.6;
  color: #64748b;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p { font-size: 0.8rem; margin: 0; }
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { font-size: 0.8rem; color: #64748b; }
.footer-bottom-links a:hover { color: var(--white); }

/* ===== NEWSLETTER ===== */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.85rem;
  font-family: inherit;
}
.newsletter-form input::placeholder { color: #64748b; }
.newsletter-form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* ===== SOCIAL LINKS ===== */
.social-links { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social-link {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.social-link:hover { background: var(--primary); color: var(--white); }

/* ===== RESOURCE CARD ===== */
.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.resource-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  width: fit-content;
}

/* ===== PROSE STYLES ===== */
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin-bottom: 1.1rem; }
.prose a { color: var(--primary); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.08); gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 1rem; border-radius: var(--radius-sm); }
  .nav-hamburger { display: flex; }
  .nav-cta { display: none !important; }
  .nav { position: relative; }

  .hero { padding: 2.5rem 0 2rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table td, .comparison-table th { padding: 0.5rem 0.6rem; }
  .content-grid { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  .author-box { flex-direction: column; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.65rem; }
  .hero h1 { font-size: 1.75rem; }
  .affiliate-box .affiliate-links { flex-direction: column; }
}
