/*
 * scientific-article.css
 * Shared stylesheet for standalone scientific HTML articles served from public/
 * Used by: harmonizacao-glutea-revisao-literatura-cientifica.html,
 *          celulite-no-bumbum-o-que-funciona.html,
 *          flacidez-glutea-causas-tratamentos.html,
 *          quanto-tempo-dura-harmonizacao-glutea.html,
 *          harmonizacao-vs-protese-vs-bbl-gluteo.html,
 *          exercicios-para-cada-formato-de-bumbum.html,
 *          formatos-de-bumbum-tipos-gluteo-harmonizacao.html
 */

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --cream: #fdf8f5;
  --cream-dark: #f5ebe6;
  --wine: #8f1d4f;
  --wine-dark: #7a1843;
  --wine-light: #fee5f0;
  --gold: #c8a96e;
  --gold-light: #fef3c7;
  --text: #2d1a1a;
  --text-muted: #6b4c4c;
  --border: rgba(45, 26, 26, 0.1);
  --border-mid: rgba(45, 26, 26, 0.15);
  --shadow-sm: 0 1px 3px rgba(45, 26, 26, 0.08);
  --shadow-md: 0 4px 20px rgba(45, 26, 26, 0.1);
}

/* ─── Reset & Base ──────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ─── Reading Progress Bar ──────────────────────── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--cream-dark);
  z-index: 1000;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  transition: width 0.1s linear;
}

/* ─── Site Header ───────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(253, 248, 245, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 1.5rem;
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--wine);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-logo span {
  color: var(--gold);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover {
  color: var(--wine);
}
.site-nav .nav-cta {
  background: var(--wine);
  color: white !important;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  transition: background 0.2s !important;
}
.site-nav .nav-cta:hover {
  background: var(--wine-dark) !important;
}

/* ─── Article Hero ──────────────────────────────── */
.article-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
/* Each page sets its own .hero-bg background-image inline */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  transform: scale(1.03);
  transition: transform 6s ease-out;
}
.hero-bg.loaded {
  transform: scale(1);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(45, 26, 26, 0.1) 0%,
    rgba(45, 26, 26, 0.4) 40%,
    rgba(45, 26, 26, 0.88) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.25rem;
}
.hero-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.hero-breadcrumb a:hover {
  color: var(--gold);
}
.hero-breadcrumb .sep {
  opacity: 0.4;
}
.hero-category {
  display: inline-block;
  background: var(--gold);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: white;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 1.5rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}
.hero-meta strong {
  color: white;
  font-weight: 500;
}
.hero-meta .meta-sep {
  opacity: 0.35;
}

/* ─── Article Layout ────────────────────────────── */
.article-wrapper {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 3.5rem;
  justify-content: center;
}

/* ─── TOC Sidebar ───────────────────────────────── */
.toc-sidebar {
  display: none;
}
.toc-inner {
  position: sticky;
  top: 80px;
}
.toc-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.toc-list {
  list-style: none;
  padding: 0;
}
.toc-list li {
  margin-bottom: 0.1rem;
}
.toc-list a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 0.3rem 0.5rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.2s;
}
.toc-list a:hover,
.toc-list a.active {
  color: var(--wine);
  border-left-color: var(--wine);
  background: var(--wine-light);
}

/* ─── Article Content ───────────────────────────── */
.article-content {
  min-width: 0;
}

/* ─── Key Findings ──────────────────────────────── */
.key-findings {
  background: var(--wine-light);
  border-left: 4px solid var(--wine);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.key-findings-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wine);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}
.key-findings ul {
  list-style: none;
  padding: 0;
}
.key-findings li {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(143, 29, 79, 0.08);
}
.key-findings li:last-child {
  border-bottom: none;
}
.key-findings li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--wine);
  font-weight: 700;
}

/* ─── Typography ────────────────────────────────── */
section {
  margin-bottom: 0.5rem;
}
h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 3.5rem 0 1.25rem;
  line-height: 1.3;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
h2 .h2-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: var(--gold);
  font-weight: 400;
  font-style: italic;
  flex-shrink: 0;
}
h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--wine);
  margin: 2.25rem 0 0.75rem;
  line-height: 1.4;
}
p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.25rem;
}
strong {
  font-weight: 600;
  color: var(--text);
}
em {
  font-style: italic;
  color: var(--text-muted);
}
ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
li {
  margin-bottom: 0.4rem;
  line-height: 1.75;
}
blockquote {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  border-left: 3px solid var(--gold);
  background: linear-gradient(
    to right,
    rgba(200, 169, 110, 0.06),
    transparent 80%
  );
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  line-height: 1.7;
}
blockquote cite {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.03em;
  margin-top: 0.75rem;
}

/* ─── Tables ────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 12px;
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", sans-serif;
  font-size: 0.84rem;
  line-height: 1.55;
}
thead th {
  background: var(--wine);
  color: white;
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
thead th:first-child {
  border-radius: 11px 0 0 0;
}
thead th:last-child {
  border-radius: 0 11px 0 0;
}
tbody td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:nth-child(even) {
  background: var(--cream-dark);
}
tbody tr:hover {
  background: var(--wine-light);
  transition: background 0.15s;
}
td:first-child {
  font-weight: 600;
  color: var(--wine);
  white-space: nowrap;
  background: rgba(143, 29, 79, 0.03);
  min-width: 120px;
}
tbody tr:nth-child(even) td:first-child {
  background: rgba(143, 29, 79, 0.05);
}
.table-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  font-style: italic;
}

/* ─── Evidence Badges ───────────────────────────── */
.evidence-badge {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.evidence-high {
  background: var(--gold-light);
  color: #92400e;
  border: 1px solid var(--gold);
}
.evidence-moderate {
  background: var(--wine-light);
  color: var(--wine);
  border: 1px solid rgba(143, 29, 79, 0.25);
}
.evidence-low {
  background: var(--cream-dark);
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
}

/* ─── Data Cards & Stats ────────────────────────── */
.data-card {
  background: white;
  border: 1px solid var(--border-mid);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.data-card-header {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.stat-item {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--cream);
  border-radius: 8px;
}
.stat-value {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--wine);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.data-card-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ─── Alert Boxes ───────────────────────────────── */
.alert-box {
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.92rem;
  line-height: 1.7;
}
.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
}
.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #10b981;
}
.alert-warning {
  background: var(--gold-light);
  border: 1px solid rgba(200, 169, 110, 0.4);
  border-left: 4px solid var(--gold);
}
.alert-box strong {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.35rem;
}

/* ─── Mobile TOC (details/summary) ─────────────── */
.toc-mobile {
  background: white;
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}
.toc-mobile summary {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}
.toc-mobile[open] summary {
  margin-bottom: 1rem;
}
.toc-mobile ol {
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.7;
  margin-top: 0.5rem;
}
.toc-mobile li {
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}
.toc-mobile a {
  color: var(--wine);
  text-decoration: none;
}
.toc-mobile a:hover {
  text-decoration: underline;
}

/* ─── Section Divider ───────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 2rem;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.section-divider-icon {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ─── CTA Section ───────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--wine) 0%, #6b1438 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  margin: 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.75rem;
  position: relative;
}
.cta-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  position: relative;
}
.cta-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  position: relative;
}
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  color: var(--wine);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 1.75rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-wa:hover {
  background: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.btn-wa svg {
  width: 18px;
  height: 18px;
  fill: #25d366;
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.9rem 1.75rem;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ─── Related Articles ──────────────────────────── */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.related-list {
  list-style: none;
  padding: 0;
}
.related-list li {
  border-bottom: 1px solid var(--border);
}
.related-list li:last-child {
  border-bottom: none;
}
.related-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.related-list a::before {
  content: "→";
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}
.related-list a:hover {
  color: var(--wine);
}

/* ─── References ────────────────────────────────── */
.references-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.references-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.references-list {
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.references-list li {
  margin-bottom: 0.6rem;
}
.references-list a {
  color: var(--wine);
  text-decoration: none;
  word-break: break-word;
}
.references-list a:hover {
  text-decoration: underline;
}

/* ─── Disclaimer ────────────────────────────────── */
.disclaimer {
  background: var(--gold-light);
  border: 1px solid rgba(200, 169, 110, 0.4);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.disclaimer strong {
  color: var(--text);
}

/* ─── Author Box ────────────────────────────────── */
.author-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: white;
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
}
.author-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.author-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.author-cred {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 500;
}

/* ─── Before/After Grid ─────────────────────────── */
.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.ba-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.ba-label {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ─── Footer ────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.7;
}
.site-footer a {
  color: var(--gold);
  text-decoration: none;
}
.site-footer strong {
  color: rgba(255, 255, 255, 0.8);
}

/* ─── Animations ────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ────────────────────────────────── */
@media (min-width: 900px) {
  .toc-sidebar {
    display: block;
  }
  .toc-mobile {
    display: none;
  }
}
@media (max-width: 899px) {
  .article-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 4rem;
  }
  .site-nav .nav-hide-mobile {
    display: none;
  }
}
@media (max-width: 540px) {
  .hero-title {
    font-size: 1.7rem;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .before-after-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── PDF Download Button ───────────────────────── */
.pdf-download-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.75rem;
}
.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--wine);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55rem 1.2rem;
  border: 1.5px solid var(--wine);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pdf-download-btn:hover {
  background: var(--wine);
  color: white;
}
.pdf-download-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.pdf-download-bar-bottom {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.pdf-download-bar-bottom .pdf-download-btn {
  font-size: 0.88rem;
  padding: 0.65rem 1.5rem;
}

/* ─── Print / PDF styles ────────────────────────── */
@media print {
  /* Hide non-content UI */
  .progress-bar,
  .site-header,
  .toc-sidebar,
  .toc-mobile,
  .cta-section,
  .related-section,
  .site-footer,
  .btn-wa,
  .btn-outline,
  .pdf-download-bar,
  .pdf-download-bar-bottom,
  .hero-bg,
  .hero-overlay,
  .fade-in {
    display: none !important;
  }

  /* Base */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    background: white !important;
    color: #1a1a1a !important;
    font-size: 10.5pt;
    line-height: 1.7;
  }

  /* Hero: plain text block */
  .article-hero {
    min-height: auto !important;
    background: none !important;
    padding: 0.5cm 0 0.5cm;
  }
  .hero-content {
    padding: 0 !important;
  }
  .hero-breadcrumb {
    color: #555 !important;
  }
  .hero-category {
    background: #eee !important;
    color: #333 !important;
    -webkit-print-color-adjust: exact;
  }
  .hero-title {
    color: #1a1a1a !important;
    font-size: 20pt !important;
  }
  .hero-subtitle {
    color: #444 !important;
  }
  .hero-meta {
    color: #555 !important;
  }
  .hero-meta strong {
    color: #1a1a1a !important;
  }

  /* Layout: single column */
  .article-wrapper {
    display: block !important;
    max-width: 100% !important;
    padding: 0.5cm 0 !important;
    margin: 0 !important;
  }
  .article-content {
    min-width: 0 !important;
  }

  /* Headings */
  h2 {
    page-break-after: avoid;
    color: #1a1a1a !important;
  }
  h3 {
    page-break-after: avoid;
    color: #6b0f33 !important;
  }
  p,
  li {
    orphans: 3;
    widows: 3;
  }

  /* Tables */
  .table-wrapper {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
  }
  thead th {
    background: #6b0f33 !important;
    color: white !important;
  }
  tr {
    page-break-inside: avoid;
  }

  /* Cards */
  .data-card,
  .key-findings,
  .alert-box,
  .author-box,
  .disclaimer {
    page-break-inside: avoid;
  }
  .key-findings {
    background: #fdf0f6 !important;
    border-left-color: #6b0f33 !important;
  }
  .data-card {
    background: white !important;
    border-left-color: #c8a96e !important;
  }

  /* References */
  .references-section {
    page-break-before: auto;
  }
  .references-list a {
    color: #6b0f33 !important;
  }
}

/* ─── Shared JS helper ──────────────────────────── */
/*
  Pages should include this script block:

  <script>
    // Hero parallax
    const heroBg = document.getElementById('heroBg');
    if (heroBg) heroBg.classList.add('loaded');
    window.addEventListener('scroll', () => {
      if (heroBg) heroBg.style.transform = `scale(1) translateY(${window.scrollY * 0.15}px)`;
    }, { passive: true });

    // Reading progress bar
    const fill = document.getElementById('progressFill');
    window.addEventListener('scroll', () => {
      const el = document.documentElement;
      const pct = (el.scrollTop / (el.scrollHeight - el.clientHeight)) * 100;
      if (fill) fill.style.width = Math.min(pct, 100) + '%';
    }, { passive: true });

    // TOC active highlight
    const sections = document.querySelectorAll('section[id]');
    const links = document.querySelectorAll('.toc-list a');
    const observer = new IntersectionObserver(entries => {
      entries.forEach(e => {
        if (e.isIntersecting) {
          links.forEach(l => l.classList.remove('active'));
          const a = document.querySelector(`.toc-list a[href="#${e.target.id}"]`);
          if (a) a.classList.add('active');
        }
      });
    }, { rootMargin: '-20% 0px -70% 0px' });
    sections.forEach(s => observer.observe(s));

    // Fade-in
    const fades = document.querySelectorAll('.fade-in');
    const fadeObs = new IntersectionObserver(entries => {
      entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('visible'); fadeObs.unobserve(e.target); } });
    }, { threshold: 0.1 });
    fades.forEach(f => fadeObs.observe(f));
  </script>
*/
