/* Self-hosted Poppins (eliminates Google Fonts round-trip) */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: optional; src: url("../fonts/poppins-300-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700-latin.woff2") format("woff2"); }

/* ============================================
   FETALMED — Design System v2.0
   "Clean Medical" — fundo branco, teal vibrante
   ============================================ */

:root {
  /* Brand */
  --color-primary:     #0e7490;
  --color-navy:        #1e293b;
  --color-gestantes:   #e11d48;

  /* Text — all WCAG AA on white */
  --color-text-strong: #0f172a;  /* 17.5:1 */
  --color-text-mid:    #334155;  /* 9.6:1 */
  --color-text-light:  #64748b;  /* 4.6:1 */

  /* Backgrounds */
  --color-bg:          #ffffff;
  --color-white:       #ffffff;
  --color-border:      #e2e8f0;

  /* Teal scale */
  --teal-50:  #ecfeff;
  --teal-100: #cffafe;
  --teal-300: #22d3ee;
  --teal-600: #0e7490;
  --teal-800: #155e75;

  /* Rose scale */
  --rosa-50:  #fff1f2;
  --rosa-100: #ffe4e6;
  --rosa-600: #e11d48;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);

  /* Typography */
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-body:    "Poppins", system-ui, sans-serif;
}

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

html, body { overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text-mid);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── GLOBAL BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-sm); padding: 12px 24px;
  font-size: 14px; font-weight: 600; transition: all .2s;
  text-decoration: none; cursor: pointer; border: none;
  font-family: var(--font-body);
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--teal-600); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14,116,144,.3); }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline-white:hover { border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); }
.btn-rose { background: var(--color-gestantes); color: #fff; }
.btn-rose:hover { background: #be123c; transform: translateY(-2px); }

/* ─── GLOBAL SECTION HELPERS ────────────────────── */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 99px;
}
.section-tag.teal  { background: var(--teal-50); color: var(--teal-800); }
.section-tag.rose  { background: var(--rosa-50); color: #be123c; }
.section-tag.slate { background: #f1f5f9; color: var(--color-navy); }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--color-text-mid);
  margin-bottom: 24px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-text-mid); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-border); font-size: 14px; }
.breadcrumb-current { color: var(--color-text-strong); font-weight: 500; }

/* ─── Autor Card v2 (global) ─── */
.autor-card-v2 {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: #f8fafc;
  border: 0.5px solid #e2e8f0;
  border-radius: 12px;
  margin: 32px 0;
}
.autor-card-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}
.autor-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.autor-card-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.autor-card-creds { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.autor-card-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.autor-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 99px;
  font-size: 10px; font-weight: 600; letter-spacing: .03em;
}
.autor-badge.teal { background: #ecfeff; color: #0e7490; }
.autor-badge.slate { background: #f1f5f9; color: #475569; }
.autor-card-disclaimer { font-size: 12px; color: #64748b; line-height: 1.5; margin: 0; }
@media (max-width: 600px) {
  .autor-card-v2 { flex-direction: column; }
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed; bottom: 92px; right: 28px; z-index: 9991;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(14,116,144,.35);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--teal-800); transform: translateY(-2px); }
@media (max-width: 480px) { .back-to-top { bottom: 88px; right: 24px; width: 40px; height: 40px; } }

/* Reference external link icon */
.ref-link{display:inline-flex;align-items:center;vertical-align:baseline;margin-left:4px;color:var(--teal-600);opacity:.7;transition:opacity .2s}
.ref-link:hover{opacity:1}
.ref-link svg{vertical-align:-1px}

/* ─── CATEGORY BADGES (5 cores) ─────────────── */
.badge-gestantes { background: #fff1f2; color: #e11d48; }
.badge-medico    { background: #ecfeff; color: #0e7490; }
.badge-artigos   { background: #f1f5f9; color: #334155; }
.badge-duvidas   { background: #fffbeb; color: #b45309; }
.badge-dicas     { background: #f5f3ff; color: #7c3aed; }

/* Adjust floating buttons when lead form compact bar is visible */
body.fm-has-compact .back-to-top { bottom: 124px; }
body.fm-has-compact .fm-whatsapp-float { bottom: 56px; }
body.fm-has-expanded .back-to-top { display: none !important; }
body.fm-has-expanded .fm-whatsapp-float { display: none !important; }
@media (max-width: 480px) { body.fm-has-compact .back-to-top { bottom: 120px; } }

/* ── AdSense fix: prevent availableWidth=0 ── */
.ad-slot[data-ad-tipo="adsense"] { display: block !important; width: 100% !important; text-align: center; }
.ad-slot[data-ad-tipo="adsense"] .adsbygoogle { display: block; width: 100%; }
