/* ============================================================
   BLOG — "Editorial Clínico"
   Revista médica editorial + precisão clínica.
   Display: Bricolage Grotesque · Corpo: Hanken Grotesk
   Verde-floresta (dominante) · Dourado (acento) · Papel creme
   Todos os estilos escopados sob .blog-root (não vazam).
   ============================================================ */

/* Tokens no <body> (blog-body) para que o próprio body use --paper
   e o .blog-root (descendente) herde tudo. */
body.blog-body {
  --paper: #FBF9F4;
  --paper-2: #F4F0E6;
  --ink: #172520;
  --ink-soft: #4B5C53;
  --ink-faint: #8A968E;
  --green-900: #0E3A28;
  --green-800: #14563A;
  --green-700: #1C7C54;
  --green-050: #EAF3ED;
  --gold: #B0862F;
  --gold-bright: #C79A3D;
  --gold-soft: #E8D6A9;
  --rule: #E6DECF;

  /* Papel creme + grão sutil (background, não overlay — zero risco de paint) */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

.blog-root {
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
}

.blog-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.blog-read { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Kicker: régua dourada + letra caixa-alta ---------- */
.blog-kicker {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
}
.blog-kicker::before {
  content: ""; width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

/* ============================================================
   ÍNDICE (revista)
   ============================================================ */
.blog-masthead { padding: 4.5rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.blog-masthead h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; letter-spacing: -.02em; line-height: .95;
  font-size: clamp(3rem, 9vw, 6rem); color: var(--green-900);
  margin: 1.1rem 0 0;
}
.blog-masthead .lead {
  margin-top: 1.4rem; max-width: 40ch;
  font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft);
}

/* Artigo em destaque (o mais recente) */
.blog-featured {
  display: block; padding: 3rem 0 3.5rem; border-bottom: 1px solid var(--rule);
}
.blog-featured .media {
  position: relative; border-radius: 10px; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule);
}
/* Capa é um banner completo (título embutido) → mostrar inteiro, sem corte */
.blog-featured .media img { width: 100%; height: auto; display: block;
  transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.blog-featured:hover .media img { transform: scale(1.02); }
.blog-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.blog-featured .media .tag {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--green-900); color: #fff; font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 2px;
}
.blog-featured .body { margin-top: 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1.25rem 2rem; flex-wrap: wrap; }
.blog-featured .body .lead { margin: 0; color: var(--ink-soft); line-height: 1.6;
  font-size: 1.08rem; max-width: 62ch; }
.blog-featured .go {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; color: var(--green-800); text-decoration: none; font-size: 1rem;
}
.blog-featured .go .arrow { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.blog-featured:hover .go .arrow { transform: translateX(6px); }
a.blog-featured-link { text-decoration: none; color: inherit; display: contents; }

/* Grade de cards */
.blog-grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 3rem 0 1.5rem; gap: 1rem;
}
.blog-grid-head h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: 1.5rem; color: var(--green-900); letter-spacing: -.01em;
}
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem 2rem; padding-bottom: 5rem; }
.blog-card { display: flex; flex-direction: column; }
.blog-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.blog-card .media { position: relative; aspect-ratio: 16/9; border-radius: 3px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); }
.blog-card .media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.blog-card:hover .media img { transform: scale(1.05); }
.blog-card .num {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: .82rem; color: var(--gold); letter-spacing: .05em; margin: 1rem 0 .35rem;
}
.blog-card h4 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.28rem;
  line-height: 1.18; letter-spacing: -.01em; color: var(--ink);
  display: inline; background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .4s cubic-bezier(.2,.7,.2,1);
}
.blog-card:hover h4 { background-size: 100% 2px; }
.blog-card .excerpt { margin: .6rem 0 0; color: var(--ink-soft); font-size: .96rem; line-height: 1.55; }
.blog-card .date { margin-top: auto; padding-top: .9rem; font-size: .78rem; color: var(--ink-faint); letter-spacing: .02em; }
.blog-empty { color: var(--ink-soft); font-size: 1.1rem; padding: 2rem 0 5rem; }

/* ============================================================
   ARTIGO (leitura editorial)
   ============================================================ */
.blog-article { padding: 2.75rem 0 4.5rem; }
.blog-breadcrumb { font-size: .8rem; letter-spacing: .01em; color: var(--ink-faint); margin-bottom: 1.75rem; }
.blog-breadcrumb a { color: var(--green-700); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--gold); }
.blog-breadcrumb .sep { color: var(--gold); margin: 0 .5rem; }

.blog-article h1 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em;
  color: var(--green-900); margin: 1rem 0 0;
}
.blog-byline {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: 1.4rem 0 0; font-size: .9rem; color: var(--ink-soft);
  padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule);
}
.blog-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.blog-byline b { color: var(--ink); font-weight: 700; }

.blog-hero { margin: 2rem 0 2.5rem; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.blog-hero img { width: 100%; height: auto; display: block; }

/* Corpo — ritmo tipográfico */
.blog-content { font-size: 1.14rem; line-height: 1.78; color: #23322B; }
.blog-content > p:first-of-type::first-letter {
  float: left; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 4.3rem; line-height: .72; padding: .35rem .6rem 0 0; color: var(--gold);
}
.blog-content p { margin: 0 0 1.35rem; }
.blog-content h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 1.95rem); line-height: 1.15; letter-spacing: -.015em;
  color: var(--green-800); margin: 2.8rem 0 1rem; padding-top: .4rem;
}
.blog-content h2::before {
  content: ""; display: block; width: 42px; height: 3px; margin-bottom: .9rem;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}
.blog-content h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.32rem; color: var(--ink); margin: 1.9rem 0 .6rem; }
.blog-content a { color: var(--green-700); text-decoration: none; box-shadow: inset 0 -2px 0 var(--gold-soft); transition: box-shadow .25s; }
.blog-content a:hover { box-shadow: inset 0 -1.4em 0 var(--gold-soft); }
.blog-content strong { color: var(--green-900); font-weight: 700; }
.blog-content ul, .blog-content ol { margin: 0 0 1.35rem; padding-left: 1.3rem; }
.blog-content li { margin-bottom: .55rem; padding-left: .3rem; }
.blog-content ul li::marker { color: var(--gold); }
.blog-content ol li::marker { color: var(--gold); font-weight: 700; }
.blog-content blockquote {
  margin: 1.8rem 0; padding: .3rem 0 .3rem 1.4rem; border-left: 3px solid var(--gold);
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; line-height: 1.4;
  color: var(--green-800); font-weight: 500;
}
.blog-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.6rem; font-size: 1rem; }
.blog-content th, .blog-content td { border-bottom: 1px solid var(--rule); padding: .7rem .8rem; text-align: left; }
.blog-content thead th { background: var(--green-050); color: var(--green-900); font-weight: 700; border-bottom: 2px solid var(--gold-soft); }
.blog-content hr { border: 0; height: 1px; background: var(--rule); margin: 2.5rem 0; }

/* FAQ — acordeão editorial */
.blog-faq { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.blog-faq > h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 1.7rem; color: var(--green-900); margin-bottom: 1.4rem;
}
.blog-faq details { border-bottom: 1px solid var(--rule); }
.blog-faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.2rem 1.15rem 0; position: relative;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 1.12rem;
  color: var(--ink); transition: color .2s;
}
.blog-faq summary:hover { color: var(--green-700); }
.blog-faq summary::-webkit-details-marker { display: none; }
.blog-faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px;
  background:
    linear-gradient(var(--gold),var(--gold)) center/12px 2px no-repeat,
    linear-gradient(var(--gold),var(--gold)) center/2px 12px no-repeat;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.blog-faq details[open] summary::after { transform: rotate(135deg); }
.blog-faq details p { margin: 0 0 1.2rem; color: var(--ink-soft); line-height: 1.7; font-size: 1.03rem; }

/* CTA */
.blog-cta {
  margin-top: 3.5rem; padding: 2.5rem; border-radius: 6px; text-align: center;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(199,154,61,.16), transparent 55%),
    var(--green-900);
  color: #EAF3ED;
}
.blog-cta .k { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-bright); }
.blog-cta strong { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.5rem; margin: .6rem 0 1.3rem; color: #fff; letter-spacing: -.01em; }
.blog-cta a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .9rem 1.7rem; border-radius: 4px;
  background: var(--gold); color: var(--green-900); font-weight: 800; text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.blog-cta a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(176,134,47,.35); }

.blog-preview-banner {
  background: #FBE7C6; border: 1px solid var(--gold); color: #7A5A16;
  padding: .65rem 1rem; border-radius: 4px; margin-bottom: 1.5rem;
  font-size: .88rem; text-align: center; font-weight: 600;
}

/* Reveal on scroll (respeita prefers-reduced-motion) */
.blog-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.blog-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .blog-reveal { opacity: 1; transform: none; transition: none; }
  .blog-featured .media img, .blog-card .media img { transition: none; }
}

/* Responsivo */
@media (max-width: 780px) {
  .blog-featured { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0; }
  .blog-featured .media { aspect-ratio: 16/10; }
  .blog-content > p:first-of-type::first-letter { font-size: 3.4rem; }
  .blog-masthead { padding: 3rem 0 2rem; }
}
