/* ============================================================
   Fertility Awareness — Blog stylesheet
   Shared by /blog/index.html and all /blog/<slug>.html articles.
   Reuses the homepage brand tokens + nav/footer/store-badge
   components so blog pages render identically to index.html.
   ============================================================ */

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

:root {
  --forest: #173028;
  --forest-mid: #244a3a;
  --sage: #7fa98e;
  --sage-light: #a8c5b4;
  --cream: #f8f2e8;
  --cream-warm: #f2e8d8;
  --terra: #c2614a;
  --terra-light: #d98672;
  --gold: #c9a84c;
  --gold-light: #e0c47a;
  --dark: #161b17;
  --mid: #3d5045;
  --text: #2c3a30;
  --muted: #6b7d6f;
  --white: #ffffff;
  --border: rgba(23,48,40,0.12);
  --blush: #e7c0bc;
  --blush-soft: #f6e4e0;
  --rose: #d98a86;
  --shadow-soft: 0 8px 32px rgba(0,0,0,0.06);
  --shadow-lift: 0 18px 50px rgba(23,48,40,0.10);
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 16px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body.blog-page {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }

/* ─── NAV (copied from index.html) ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(248,242,232,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img { width: 34px; height: 34px; object-fit: contain; display: block; filter: drop-shadow(0 1px 3px rgba(23,48,40,0.28)); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--forest); }
.nav-links a[aria-current="page"] { color: var(--forest); font-weight: 600; }

.btn-nav {
  background: var(--forest);
  color: var(--cream) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 500 !important;
  transition: background 0.2s, transform 0.15s !important;
}

.btn-nav:hover { background: var(--terra) !important; transform: translateY(-1px); }

.nav-toggle,
.nav-menu-button { display: none; }

@media (max-width: 900px) {
  nav { padding: 14px 22px; }
  .nav-logo { font-size: 1.28rem; white-space: nowrap; }
  .nav-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--forest);
    color: var(--cream);
    border-radius: 100px;
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    user-select: none;
  }
  .nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 22px 18px;
    background: rgba(248,242,232,0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(23,48,40,0.14);
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 13px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(23,48,40,0.08);
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .btn-nav {
    justify-content: center !important;
    margin-top: 8px;
    padding: 13px 18px !important;
    background: var(--terra) !important;
    color: var(--white) !important;
  }
}

@media (max-width: 600px) {
  nav { padding: 12px 18px; }
  .nav-logo { font-size: 1.16rem; gap: 8px; }
  .nav-menu-button { padding: 8px 14px; font-size: 0.78rem; }
}

/* ─── BLOG INDEX: header band ─── */
.blog-hero {
  padding: 132px 24px 56px;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(224,196,122,0.20), transparent 60%),
    linear-gradient(170deg, var(--cream-warm) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--border);
}

.blog-hero .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 14px;
}

.blog-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--forest);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.blog-hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--mid);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ─── Card grid ─── */
.post-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 24px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.post-card-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  background-image: var(--thumb, none), linear-gradient(135deg, var(--sage) 0%, var(--forest-mid) 100%);
  background-size: cover;
  background-position: center;
}

.post-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.post-card-tag,
.article-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terra);
  background: rgba(194,97,74,0.10);
  padding: 4px 12px;
  border-radius: 100px;
}

.post-card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--forest);
}

.post-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-more {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--terra);
}

/* ─── ARTICLE ─── */
.article { max-width: 720px; margin: 0 auto; padding: 116px 24px 40px; }

.article-header { text-align: center; margin-bottom: 26px; }

.article-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 18px;
  transition: color 0.2s;
}
.article-back:hover { color: var(--forest); }

.article-header .article-tag { display: inline-block; }

.article-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--forest);
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 14px 0 12px;
}

.article-meta { font-size: 0.9rem; color: var(--muted); }

.article-hero {
  max-width: 960px;
  margin: 8px auto 40px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background-image: var(--hero, none), linear-gradient(135deg, var(--cream-warm) 0%, var(--sage) 55%, var(--forest-mid) 100%);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}

.article-body { font-size: 1.06rem; line-height: 1.75; color: var(--text); }

.article-body > p:first-of-type { font-size: 1.16rem; color: var(--mid); line-height: 1.7; }

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.2;
  margin: 1.9em 0 0.5em;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--forest-mid);
  margin: 1.6em 0 0.4em;
}

.article-body p { margin: 0 0 1.1em; }

.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: 0.5em; }
.article-body li::marker { color: var(--sage); }

.article-body strong { color: var(--forest); font-weight: 600; }

.article-body a {
  color: var(--terra);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.article-body a:hover { color: var(--terra-light); }

.article-body blockquote.callout, .callout {
  background: rgba(127,169,142,0.12);
  border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 1.6em 0;
  color: var(--forest);
  font-size: 1rem;
}
.callout strong { color: var(--forest); }

.article-body figure { margin: 1.6em 0; }
.article-body figure img { width: 100%; border-radius: var(--radius-sm); display: block; }
.article-body figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Medical disclaimer */
.medical-disclaimer {
  max-width: 720px;
  margin: 40px auto 0;
  background: var(--cream-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mid);
}
.medical-disclaimer strong { color: var(--forest); }

/* End-of-article CTA (terracotta, matches homepage final CTA so store badges contrast) */
.article-cta {
  max-width: 820px;
  margin: 52px auto 0;
  background: var(--terra);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 52px 32px;
  text-align: center;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.article-cta h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 12px;
}
.article-cta p { color: rgba(255,255,255,0.85); max-width: 48ch; margin: 0 auto 24px; line-height: 1.6; }

.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--terra);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 34px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-app:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(0,0,0,0.2); }

/* Store badges (copied from index.html) */
.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 216px;
  padding: 11px 22px;
  background: var(--dark);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 15px;
  text-decoration: none;
  color: var(--white);
  box-shadow: 0 10px 30px rgba(23,27,23,0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.store-badge:hover {
  transform: translateY(-3px);
  background: #1f2721;
  box-shadow: 0 18px 42px rgba(23,27,23,0.38);
}
.store-badge svg { flex-shrink: 0; }
.store-badge-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.08; }
.store-badge-top { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.store-badge-bottom { font-size: 1.16rem; font-weight: 600; letter-spacing: -0.01em; color: var(--white); }

/* Related posts */
.related-posts { max-width: 1160px; margin: 64px auto 0; padding: 0 0; }
.related-posts h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--forest);
  text-align: center;
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* ─── FOOTER (copied from index.html + responsive) ─── */
footer {
  background: var(--dark);
  padding: 60px 48px 40px;
  margin-top: 72px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 14px;
}
.footer-tagline { font-size: 0.85rem; color: rgba(248,242,232,0.45); line-height: 1.65; max-width: 260px; }
.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248,242,232,0.45);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(248,242,232,0.6); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(248,242,232,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  color: rgba(248,242,232,0.35);
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  footer { padding: 48px 22px 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .article-cta { padding: 40px 22px; }
  .store-badges { flex-direction: column; gap: 12px; }
  .store-badge { width: 100%; min-width: 0; max-width: 340px; }
  .post-grid { padding: 40px 20px 56px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
