/* ─────────────────────────────────────────────────────────────────
   ZdravaFakta — article page styles.
   Tokens, body chrome, scroll-bar, logo, footer all live in
   public-base.css. This file covers prog-nav, article hero, hero
   art, TOC + body, all in-body block types, and the related strip.
   ───────────────────────────────────────────────────────────────── */

/* prog-nav: fixed back pill, top-center */
.prog-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(44, 44, 44, 0.05);
}
.prog-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.3s var(--ease-out);
}
.prog-nav a:hover { color: var(--brand-blue); background: var(--brand-blue-soft); }
.prog-nav a .arrow { transition: transform 0.3s var(--ease-out); }
.prog-nav a:hover .arrow { transform: translateX(-4px); }

/* ARTICLE HERO */
.article-hero {
  position: relative;
  padding: 140px var(--side-pad) 60px;
  overflow: hidden;
  max-width: var(--max-w);
  margin: 0 auto;
}
.article-hero-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) 0.1s forwards;
}
.article-hero-meta .crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.article-hero-meta .crumb a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.3s;
}
.article-hero-meta .crumb a:hover { color: var(--brand-blue); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  font-weight: 600;
}
.badge.verified {
  color: var(--brand-blue);
  background: var(--brand-gold-soft);
  border: 1px solid var(--brand-gold);
}
.badge.myth {
  color: var(--villain);
  background: var(--villain-soft);
  border: 1px solid rgba(192, 57, 43, 0.28);
}
a.badge.reel {
  color: #C13584;
  background: rgba(225, 48, 108, 0.08);
  border: 1px solid rgba(225, 48, 108, 0.32);
  text-decoration: none;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
a.badge.reel:hover {
  background: rgba(225, 48, 108, 0.14);
  border-color: rgba(225, 48, 108, 0.55);
  transform: translateY(-1px);
}
a.badge.reel .play { font-size: 8px; transform: translateY(0.5px); }

.article-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  max-width: 18ch;
  color: var(--fg);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}
.article-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand-blue), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-lede {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--fg-soft);
  max-width: 720px;
  margin-bottom: 36px;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.35s forwards;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}
.author-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(27, 58, 107, 0.18);
}
.article-byline .who {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
  letter-spacing: 0.05em;
}
.article-byline .who b { color: var(--brand-blue); font-weight: 700; }
.article-byline .sep { width: 1px; height: 16px; background: var(--line-strong); }
.article-byline .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* HERO ART (21:9 wide image) */
.article-art-wrap {
  max-width: var(--max-w);
  margin: 0 auto 60px;
  padding: 0 var(--side-pad);
}
.article-art {
  aspect-ratio: 21 / 9;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-art .art-inner {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(245, 200, 66, 0.45) 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(27, 58, 107, 0.22) 0%, transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(212, 168, 43, 0.30) 0%, transparent 55%),
    var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-art .art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.article-art .label {
  position: absolute;
  bottom: 24px;
  left: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brand-blue);
  text-transform: uppercase;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 100px;
  z-index: 2;
}

/* TOC + body grid */
.article-body-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad) 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
}
@media (max-width: 960px) {
  .article-body-wrap { grid-template-columns: 1fr; gap: 32px; }
  .toc { display: none; }
}

.toc {
  position: sticky;
  top: 100px;
  align-self: start;
  height: max-content;
  padding-left: 0;
}
.toc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toc-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-blue), transparent);
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
}
.toc-list a {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.toc-list a:hover { color: var(--fg-soft); }
.toc-list a.active {
  color: var(--brand-blue);
  border-left-color: var(--brand-gold);
  font-weight: 600;
}

/* ARTICLE BODY */
.article-body {
  max-width: 760px;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--fg-soft);
}
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 64px 0 20px;
  scroll-margin-top: 80px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h2 .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.article-body p {
  margin-bottom: 20px;
}
/* Reveal-on-scroll initial state is set inline by public-article.js so that
   no-JS environments (and the admin preview iframe) still see the content. */
.article-body p strong { color: var(--fg); font-weight: 700; }
.article-body p em { color: var(--brand-blue); font-style: italic; font-weight: 500; }
.article-body a.inline {
  color: var(--brand-blue);
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--brand-blue), var(--gold-deep));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: background-size 0.3s;
  font-weight: 500;
}
.article-body a.inline:hover { background-size: 100% 2px; }

/* PULLQUOTE */
.pullquote {
  margin: 48px 0;
  padding: 32px 0 32px 28px;
  border-left: 3px solid var(--brand-gold);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--brand-blue);
}
.pullquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 20px;
  font-weight: 500;
}

/* FAST FACT / STAT CALLOUT */
.stat-callout {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(44, 44, 44, 0.04);
}
.stat-callout .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--brand-blue);
}
.stat-callout .copy {
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.55;
}
.stat-callout .copy strong {
  color: var(--gold-deep);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* SOURCES */
.sources {
  margin: 16px 0 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.sources ol {
  list-style: none;
  counter-reset: src;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sources li {
  counter-increment: src;
  padding-left: 32px;
  position: relative;
  font-size: 13px;
  color: var(--fg-soft);
  line-height: 1.5;
}
.sources li::before {
  content: "[" counter(src) "]";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 600;
}
.sources a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s;
}
.sources a:hover { text-decoration-color: var(--brand-blue); }

/* REEL LINK card */
.reel-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  margin: 24px 0 8px;
  background: var(--brand-blue-soft);
  border: 1px solid rgba(27, 58, 107, 0.18);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.reel-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(27, 58, 107, 0.16);
  border-color: rgba(27, 58, 107, 0.34);
}
.reel-link-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #E1306C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(225, 48, 108, 0.35);
}
.reel-link-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.reel-link-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.reel-link-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--zf-text-dark);
}
.reel-link-arrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--brand-blue);
  transition: transform 0.3s var(--ease-out);
}
.reel-link:hover .reel-link-arrow { transform: translateX(5px); }

/* IN-BODY FIGURE (not present in POC; added for Phase 1 schema completeness) */
.article-figure {
  margin: 40px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
}
.article-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.article-figure figcaption {
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

/* IN-BODY CALLOUT (not present in POC; added for schema completeness) */
.callout {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--brand-gold);
  background: var(--bg-elev);
  border-radius: 0 12px 12px 0;
}
.callout-tip     { border-left-color: var(--brand-gold); }
.callout-warning { border-left-color: var(--villain); }
.callout-note    { border-left-color: var(--brand-blue); }
.callout-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.callout-warning .callout-title { color: var(--villain); }
.callout-note    .callout-title { color: var(--brand-blue); }
.callout-body { font-size: 15px; color: var(--fg-soft); line-height: 1.55; }

/* IN-BODY LIST */
.article-list {
  margin: 12px 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-list li {
  line-height: 1.6;
}
.article-list-bullet { list-style: disc; }
.article-list-numbered { list-style: decimal; }

/* RELATED — horizontal scroll */
.related {
  padding: 80px 0 100px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg) 0%, #F4F0E5 100%);
}
.related-head {
  max-width: var(--max-w);
  margin: 0 auto 32px;
  padding: 0 var(--side-pad);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}
.related-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.related-head h3 em { font-style: normal; color: var(--brand-blue); }
.related-head a.all {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s var(--ease-out);
}
.related-head a.all::after { content: "→"; }
.related-head a.all:hover { gap: 14px; color: var(--brand-blue-deep); }

.related-scroll {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 16px;
}
.related-scroll::-webkit-scrollbar { display: none; }
.related-track {
  display: flex;
  gap: 20px;
  padding: 0 var(--side-pad);
}
.related-card {
  flex-shrink: 0;
  width: min(78vw, 360px);
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.related-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--g-color, rgba(27, 58, 107, 0.06)) 0%, transparent 60%);
  pointer-events: none;
}
.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px rgba(44, 44, 44, 0.08);
}
.related-card .r-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
.related-card .r-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.related-card .r-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  color: var(--fg);
}
.related-card .r-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.related-card .r-foot .arrow {
  color: var(--brand-blue);
  font-weight: 700;
  transition: transform 0.3s var(--ease-out);
}
.related-card:hover .r-foot .arrow { transform: translateX(4px); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
