/* ════════════════════════════════════════════════════════════════════════
   Monju — blog (monju.app/blog)

   Arquivo compartilhado por TODAS as páginas do blog (home, categoria, post,
   nos 3 idiomas). É o único CSS externo do site: com dezenas de páginas,
   repetir o CSS em cada HTML seria peso e cache jogados no lixo.

   Os tokens são os mesmos da landing (landing.template.html). Se a landing
   mudar de cor/fonte, mude aqui também.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f4f6;
  --ink: #13231b;
  --muted: #5f6b64;
  --primary: #417454;
  --primary-dark: #2f5740;
  --accent: #6aa988;
  --dark: #15271d;
  --border: #e4e8e5;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 24px 60px -28px rgba(20, 40, 28, 0.35);
  --shadow-sm: 0 8px 24px -12px rgba(20, 40, 28, 0.22);
  --maxw: 1120px;
  --readw: 760px;
  --gold: #f0a921;
  /* respiro lateral do conteúdo — a faixa de chips usa o valor negativo dele
     pra sangrar até a borda da tela, então os dois nunca saem de sincronia */
  --wrap-pad: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--wrap-pad); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--primary); background: #e9f1ec;
  border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px;
}

/* ───────────────────────────── HEADER / NAV ───────────────────────────── */
header { position: sticky; top: 14px; z-index: 50; margin-top: 14px; }

/* Escopado em `header nav` de propósito: breadcrumb, índice e paginação também
   são <nav>, e a regra solta da landing pintava os três com a pílula do topo. */
header nav {
  position: relative; display: flex; align-items: center;
  justify-content: space-between; height: 64px; padding: 0 14px 0 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm);
}

#hd.scrolled nav { background: rgba(255, 255, 255, 0.95); border-color: #d9e0db; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 19px; letter-spacing: -0.01em;
}
.logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: block; }
.nav-left { display: flex; align-items: center; gap: 34px; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.navlinks { display: flex; align-items: center; gap: 28px; }
.navlinks a { font-size: 15px; font-weight: 500; color: var(--muted); transition: color 0.15s; }
.navlinks a:hover { color: var(--ink); }
.navlinks a.is-active { color: var(--primary); font-weight: 700; }
.navlinks .nav-dl { display: none; }
.badge svg { height: 32px; width: auto; display: block; }
.badge.badge-sm svg { height: 44px; }
.badge.badge-lg svg { height: 50px; }
.badge { display: inline-flex; transition: transform 0.12s, filter 0.2s; }
.badge:hover { transform: translateY(-2px); filter: brightness(1.06); }
.menu-toggle { display: none; }

/* ─────────────────────────── HERO DA LISTAGEM ─────────────────────────── */
.blog-hero {
  position: relative; padding: 96px 0 34px; text-align: center; overflow: hidden;
}
.blog-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 46% at 78% 0%, rgba(106, 169, 136, 0.2), transparent 70%),
    radial-gradient(42% 42% at 4% 18%, rgba(65, 116, 84, 0.11), transparent 70%);
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 52px); line-height: 1.06;
  letter-spacing: -0.03em; font-weight: 600; margin: 16px 0 14px;
}
.blog-sub {
  font-size: clamp(16px, 1.4vw, 18.5px); color: var(--muted);
  max-width: 620px; margin: 0 auto;
}
.blog-hero-cat { text-align: left; padding-top: 80px; }
.blog-hero-cat .blog-sub { margin: 0; max-width: 700px; }
/* Na página de categoria o rótulo é TEXTO, não chip: o nome da categoria já é o
   título grande logo abaixo, e a pílula verde competia com ele. */
.blog-hero-cat .crumbs { margin-bottom: 38px; }
.blog-hero-cat .eyebrow {
  display: block; background: none; border: 0; padding: 0;
  color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
}
.blog-hero-cat h1 { margin: 10px 0 14px; }

/* chips de categoria */
.chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px;
}
.blog-hero-cat .chips { justify-content: flex-start; }
.chip-link {
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  background: var(--bg-soft); border: 1px solid transparent;
  padding: 9px 18px; border-radius: 999px; transition: all 0.15s;
}
.chip-link:hover { color: var(--ink); border-color: var(--border); background: #fff; }
.chip-link.is-active { background: var(--primary); color: #fff; }

/* ───────────────────────────── GRID DE CARDS ──────────────────────────── */
.blog-list { padding: 30px 0 80px; }
.list-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 26px;
}
.list-head h2 {
  font-size: clamp(21px, 2.4vw, 27px); font-weight: 600; letter-spacing: -0.02em;
}
.list-head .count { color: var(--muted); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }

.card { display: flex; flex-direction: column; }
.card-media {
  display: block; border-radius: 16px; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border);
  aspect-ratio: 1200 / 630;
}
.card-media img, .card-media svg {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s ease;
}
.card:hover .card-media img, .card:hover .card-media svg { transform: scale(1.03); }
.card-body { padding: 14px 2px 0; }
.card-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.card-title {
  font-size: 18px; line-height: 1.32; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.card-title a:hover { color: var(--primary); }
.card-excerpt {
  font-size: 14.5px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.empty { color: var(--muted); font-size: 16px; padding: 20px 0; }

/* chip de categoria (card e post) */
.chip {
  display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; letter-spacing: 0.01em;
  background: #e9f1ec; color: var(--primary-dark);
}
.chip-side-effects { background: #fdeee9; color: #a24a26; }
.chip-nutrition { background: #eaf3ec; color: #2f5740; }
.chip-results { background: #eef0fb; color: #3f4a92; }
.chip-lifestyle { background: #fdf3e3; color: #8a5c07; }
.chip-medication { background: #e8f1f6; color: #245c73; }

/* ─────────────────────────────── PAGINAÇÃO ────────────────────────────── */
.pager { margin-top: 48px; }
.pager ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.pager a, .pager span {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 11px; font-size: 15px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); background: #fff;
}
.pager a:hover { color: var(--ink); border-color: var(--muted); }
.pager .is-current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .pager-arrow { font-size: 20px; line-height: 1; }

/* ─────────────────────────────── BREADCRUMB ───────────────────────────── */
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; font-size: 13px; color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #b9c2bc; }
.crumbs a:hover { color: var(--primary); }
.crumbs li[aria-current] {
  max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ══════════════════════════════ POST ══════════════════════════════════ */
.post { padding: 84px 0 80px; }
.post-head { max-width: var(--readw); }
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted); margin: 22px 0 16px;
}
.post-meta .dot { color: #b9c2bc; }
.post h1 {
  font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12;
  letter-spacing: -0.03em; font-weight: 600;
}
.post-deck {
  font-size: clamp(17px, 1.6vw, 20px); color: var(--muted);
  line-height: 1.55; margin-top: 16px;
}
/* assinatura (E-E-A-T): quem escreveu, quem revisou, quando foi atualizado */
.post-byline {
  display: flex; align-items: flex-start; gap: 11px; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.author-dot {
  width: 34px; height: 34px; border-radius: 50%; flex: none; margin-top: 1px;
  background: linear-gradient(150deg, var(--accent), var(--primary));
}
.byline-main { font-size: 15px; color: var(--muted); line-height: 1.4; }
.byline-main strong { color: var(--ink); font-weight: 700; }
.byline-sub {
  font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px;
}
.byline-sub strong { color: var(--ink); font-weight: 600; }
.byline-sub a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.post-updated { font-size: 13px; color: var(--muted); margin-top: 14px; }
.blog-page .prose { margin-top: 32px; }

/* Mesma largura da coluna de leitura: a capa tinha 900px contra 760px do texto e
   sobrava dos dois lados. `--readw` mantém as bordas alinhadas com o título e
   com o corpo do artigo. */
.post-cover { max-width: var(--readw); margin: 32px auto 0; }
.post-cover img, .post-cover svg {
  width: 100%; height: auto; display: block; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-soft);
}

.post-wrap { max-width: var(--readw); }

.box-title {
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--primary); margin-bottom: 14px;
  font-weight: 600;
}

/* resumo rápido */
.takeaways {
  margin: 40px 0 0; padding: 24px 26px; background: #f4f8f5;
  border: 1px solid #dfe9e2; border-radius: var(--radius);
}
.takeaways ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.takeaways li {
  position: relative; padding-left: 24px; font-size: 15.5px;
  line-height: 1.55; color: var(--ink);
}
.takeaways li::before {
  content: ""; position: absolute; left: 3px; top: 8px; width: 8px; height: 8px;
  border-radius: 3px; background: var(--accent);
}

/* índice */
.toc { margin: 28px 0 0; padding: 22px 26px; border: 1px solid var(--border); border-radius: var(--radius); }
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 9px; }
.toc li { counter-increment: toc; font-size: 15px; line-height: 1.45; }
.toc li::before { content: counter(toc) ". "; color: var(--muted); font-weight: 700; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--primary); text-decoration: underline; }

/* ───────────────────────────── TEXTO DO POST ──────────────────────────── */
.prose { margin-top: 42px; font-size: 17.5px; line-height: 1.75; color: #24352c; }
.prose > * + * { margin-top: 22px; }
.prose h2 {
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.22; letter-spacing: -0.022em;
  font-weight: 600; color: var(--ink); margin-top: 52px; scroll-margin-top: 96px;
}
.prose h3 {
  font-size: clamp(18px, 2vw, 21px); line-height: 1.3; letter-spacing: -0.015em;
  font-weight: 600; color: var(--ink); margin-top: 34px; scroll-margin-top: 96px;
}
.prose h4 { font-size: 17px; font-weight: 600; margin-top: 26px; }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--primary-dark); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--bg-soft); padding: 2px 6px; border-radius: 6px;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.prose-list { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.prose ul.prose-list li { position: relative; padding-left: 25px; }
.prose ul.prose-list li::before {
  content: ""; position: absolute; left: 4px; top: 12px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.prose ol.prose-list { counter-reset: li; }
.prose ol.prose-list li { position: relative; padding-left: 34px; counter-increment: li; }
.prose ol.prose-list li::before {
  content: counter(li); position: absolute; left: 0; top: 3px;
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  background: #e9f1ec; color: var(--primary-dark); font-size: 13px; font-weight: 700;
}

/* caixa de alerta (blockquote no Markdown) */
.callout {
  border-left: 4px solid var(--gold); background: #fdf7e9;
  padding: 18px 22px; border-radius: 0 14px 14px 0;
}
.callout p { font-size: 16px; line-height: 1.6; color: #4a3c1a; margin: 0; }

/* tabela */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table {
  width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.prose thead { background: var(--bg-soft); }
.prose th, .prose td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.5;
}
.prose th { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.prose tbody tr:last-child td { border-bottom: 0; }

.post-figure { margin: 30px 0; }
.post-figure img { width: 100%; height: auto; border-radius: 16px; display: block; }

/* FAQ */
.post-faq { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--border); }
.post-faq h3 { margin-top: 30px; }

/* fontes */
.sources { margin-top: 52px; padding: 24px 26px; background: var(--bg-soft); border-radius: var(--radius); }
.sources ol { padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.sources li { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.sources a { color: var(--primary); font-weight: 600; }

.disclaimer {
  margin-top: 26px; font-size: 13.5px; line-height: 1.6; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 14px; padding: 16px 18px;
}

/* ─────────────────────────── BANNER DO APP ────────────────────────────── */
.app-banner {
  margin: 44px 0; padding: 26px 28px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; gap: 26px; justify-content: space-between;
  position: relative; overflow: hidden;
}
.app-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 78% at 92% 8%, rgba(255, 255, 255, 0.17), transparent);
}
.prose .app-banner { margin: 48px 0; }
.banner-body { position: relative; }
.banner-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72); margin-bottom: 9px;
}
.banner-h { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.banner-p {
  font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.9);
  margin-top: 9px; max-width: 46ch;
}
.banner-rating {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.92);
}
.banner-rating .stars { color: var(--gold); letter-spacing: 1px; }
.banner-badges { display: flex; gap: 10px; flex: none; position: relative; flex-wrap: wrap; }
.app-banner-end { margin-top: 40px; padding: 34px 32px; }
.app-banner-end .banner-h { font-size: clamp(21px, 2.4vw, 26px); }
.app-banner-end .banner-p { font-size: 16px; }

/* ──────────────────────────── RELACIONADOS ────────────────────────────── */
.related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.related h2 {
  font-size: clamp(21px, 2.4vw, 27px); font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.related .grid { grid-template-columns: repeat(2, 1fr); gap: 26px 22px; }
.related .card-title { font-size: 16.5px; }
.related .card-excerpt { -webkit-line-clamp: 2; font-size: 14px; }

/* ─────────────────────────────── RODAPÉ ───────────────────────────────── */
.site-footer {
  background: var(--bg); color: var(--muted); padding: 56px 0 30px;
  border-top: 1px solid var(--border);
}
.foot-top {
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px;
  padding-bottom: 34px; border-bottom: 1px solid var(--border);
}
.foot-brand .brand { color: var(--ink); margin-bottom: 14px; }
.foot-brand .ftag { font-size: 14.5px; max-width: 320px; color: var(--muted); line-height: 1.55; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cols h3 {
  color: var(--ink); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 14px; font-weight: 600;
}
.foot-cols a { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 10px; transition: color 0.15s; }
.foot-cols a:hover { color: var(--primary); }
.foot-bottom { font-size: 13px; color: var(--muted); padding-top: 24px; }

/* ───────────────────────────── RESPONSIVO ─────────────────────────────── */
@media (max-width: 1000px) {
  .nav-right { display: none; }
  .navlinks { display: none; }
  .navlinks.open {
    display: flex; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 16px 20px; gap: 14px;
    border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); z-index: 60;
  }
  .navlinks.open .nav-dl {
    display: block; color: var(--primary); font-weight: 700;
    border-top: 1px solid var(--border); padding-top: 14px;
  }
  .menu-toggle {
    display: inline-grid; place-items: center; width: 42px; height: 42px;
    border: 1px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer;
  }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .blog-hero { padding-top: 82px; }
  .post { padding-top: 74px; }
  .app-banner { flex-direction: column; align-items: flex-start; }
  .foot-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 820px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
  /* Abaixo de 820px os 6 chips não cabem numa linha: em vez de quebrar (4 linhas
     no celular, 2 desequilibradas no tablet), viram faixa que rola na
     horizontal, sangrando até a borda — o chip cortado no canto avisa que há
     mais. */
  .chips {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    margin: 22px calc(var(--wrap-pad) * -1) 0;
    padding: 0 var(--wrap-pad) 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip-link { flex: none; }
}

@media (max-width: 680px) {
  :root { --wrap-pad: 18px; }
  .grid, .related .grid { grid-template-columns: 1fr; gap: 26px; }
  .blog-hero { padding: 74px 0 26px; }
  .blog-hero h1 { font-size: clamp(27px, 8.4vw, 36px); }
  .post { padding: 68px 0 60px; }
  .prose { font-size: 17px; }
  .takeaways, .toc, .sources { padding: 20px 18px; }
  .app-banner { padding: 22px 20px; }
  .banner-badges { width: 100%; }
  .post-cover img, .post-cover svg { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-media img, .card-media svg { transition: none; }
}

/* Ações da página 404 (build_404) — mesmo par de botões da landing:
   um sólido pro caminho recomendado, um discreto pro alternativo. */
.nf-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }
.nf-cta {
  display: inline-block; background: var(--primary); color: #ffffff;
  padding: 13px 26px; border-radius: var(--radius); font-size: 15.5px;
  font-weight: 600; text-decoration: none; transition: opacity 0.15s;
}
.nf-cta:hover { opacity: 0.9; }
.nf-link {
  display: inline-block; padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--ink); font-size: 15.5px;
  font-weight: 600; text-decoration: none; transition: border-color 0.15s;
}
.nf-link:hover { border-color: var(--primary); color: var(--primary); }
