/* ============================================================
   JUXTALUX — Blog
   Estende css/style.css. Nao redefine tokens: usa as variaveis
   ja declaradas em :root (--green, --bg-card, --font-display...).
   Carregar SEMPRE depois de style.css.
   ============================================================ */

/* ── LAYOUT BASE ───────────────────────────────────────────── */
.blog-wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.blog-hero {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 140px 24px 48px;
}
.blog-hero .blog-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
  background: var(--green-muted);
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: 0.01em;
}
.blog-hero p {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── FILTRO DE TAGS ────────────────────────────────────────── */
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 8px;
}
.tag-chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.tag-chip:hover { color: var(--green); border-color: var(--border-bright); }
.tag-chip.is-active {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 18px var(--green-glow);
}

/* ── DESTAQUE ──────────────────────────────────────────────── */
.post-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  margin: 40px 0 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-card));
  transition: var(--transition);
}
.post-featured:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 42px rgba(57, 255, 20, 0.12);
  transform: translateY(-3px);
}
.post-featured-body { padding: 44px 40px; display: flex; flex-direction: column; }
.post-featured-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--white);
  margin: 14px 0 14px;
}
.post-featured-body p { color: var(--text-muted); font-size: 1rem; }
.post-featured-art {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(57, 255, 20, 0.16), transparent 62%),
    var(--bg-card2);
  border-left: 1px solid var(--border);
}
.post-featured-art img { width: 130px; height: 130px; border-radius: 28px; }
.post-featured-art .art-mark {
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 900;
  color: var(--green);
  opacity: 0.5;
  text-shadow: 0 0 34px var(--green-glow);
}

/* ── GRADE DE POSTS ────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 30px 28px;
  transition: var(--transition);
}
.post-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card2);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  margin: 12px 0 10px;
}
.post-card p { color: var(--text-muted); font-size: 0.94rem; flex: 1; }
.post-card .post-more {
  margin-top: 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
}
.post-card:hover .post-more { text-shadow: 0 0 12px var(--green-glow); }
.post-card.is-hidden { display: none; }

/* ── META (data · leitura · tags) ──────────────────────────── */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.post-meta .dot { opacity: 0.45; }
.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.post-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--green-muted);
}

/* ── ARTIGO ────────────────────────────────────────────────── */
.article-hero {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 130px 24px 0;
}
.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.13;
  color: var(--white);
  margin: 18px 0 20px;
}
.article-hero .article-lead {
  font-size: 1.14rem;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.86;
  max-width: 62ch;
}
.article-rule {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.article-rule hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright), transparent);
}

.article-body {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 72px;
  font-size: 1.06rem;
  line-height: 1.82;
}
.article-body p { margin-bottom: 1.35em; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 700;
  color: var(--white);
  margin: 2.4em 0 0.7em;
  padding-left: 16px;
  border-left: 3px solid var(--green);
  line-height: 1.25;
}
.article-body h3 {
  font-family: var(--font-body);
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--green);
  margin: 2em 0 0.55em;
  letter-spacing: 0.02em;
}
.article-body ul, .article-body ol { margin: 0 0 1.35em 1.2em; }
.article-body li { margin-bottom: 0.6em; }
.article-body ul li::marker { color: var(--green); }
.article-body ol li::marker { color: var(--green); font-weight: 700; }
.article-body strong { color: var(--white); font-weight: 700; }
.article-body a {
  color: var(--green);
  border-bottom: 1px solid var(--border-bright);
  transition: var(--transition);
}
.article-body a:hover { text-shadow: 0 0 12px var(--green-glow); border-bottom-color: var(--green); }
.article-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--green);
  background: var(--green-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}
.article-body pre {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 0 0 1.6em;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.article-body pre code {
  background: none; border: 0; padding: 0; color: var(--text);
}
.article-body blockquote {
  margin: 1.9em 0;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(200, 168, 75, 0.05);
  color: var(--text);
  font-size: 1.02rem;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* ── RODAPE DO ARTIGO ──────────────────────────────────────── */
.article-foot {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}
.article-cta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-card));
  padding: 32px 30px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.article-cta img { width: 68px; height: 68px; border-radius: 18px; }
.article-cta-text { flex: 1; min-width: 220px; }
.article-cta-text h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 5px;
}
.article-cta-text p { color: var(--text-muted); font-size: 0.92rem; }

.share-row { display: flex; align-items: center; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.share-row span { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.share-btn {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  transition: var(--transition);
}
.share-btn:hover { color: var(--green); border-color: var(--border-bright); }

/* ── RELACIONADOS ──────────────────────────────────────────── */
.related {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 96px;
  position: relative;
  z-index: 1;
}
.related h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ── VAZIO ─────────────────────────────────────────────────── */
.blog-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 30px;
  text-align: center;
  color: var(--text-muted);
}
.blog-empty.is-hidden { display: none; }

/* ── RESPONSIVO ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-art { min-height: 190px; border-left: 0; border-bottom: 1px solid var(--border); order: -1; }
  .post-featured-body { padding: 32px 26px; }
}
@media (max-width: 560px) {
  .blog-hero { padding: 116px 20px 36px; }
  .blog-wrap, .article-body, .article-foot, .related { padding-left: 20px; padding-right: 20px; }
  .article-hero { padding: 110px 20px 0; }
  .post-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 1.01rem; }
  .article-cta { flex-direction: column; align-items: flex-start; }
}

/* ── ACESSIBILIDADE ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .post-card, .post-featured { transition: none; }
  .post-card:hover, .post-featured:hover { transform: none; }
}

/* ============================================================================
   Blog v2 — sumario, series, tags indexaveis, tabela, medidor, anuncio.
   Tudo aditivo: nao redefine nada de style.css nem as 22 classes acima.
   ========================================================================== */

/* identidade por trilha: troca o acento, nao cria paleta nova */
[data-trilha="guias"]      { --acento: var(--gold, #d4af37); }
[data-trilha="bastidores"] { --acento: var(--green, #00d67a); }
body:not([data-trilha])    { --acento: var(--green, #00d67a); }

/* barra de progresso de leitura */
.progresso {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--acento); z-index: 999; transition: width .12s linear;
}

/* selo da trilha dentro do bloco de meta */
.selo-trilha {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--acento); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--acento) 38%, transparent);
  background: color-mix(in srgb, var(--acento) 10%, transparent);
}
.selo-trilha:hover { background: color-mix(in srgb, var(--acento) 20%, transparent); }
.post-meta .atual { opacity: .75; font-style: italic; }

/* cartoes de trilha na capa */
.trilha-cartoes { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 26px; }
.trilha-cartao {
  display: block; padding: 18px 20px; border-radius: 14px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02);
  transition: border-color .2s, transform .2s;
}
.trilha-cartao:hover { transform: translateY(-2px); }
.trilha-cartao.t-guias:hover      { border-color: rgba(212,175,55,.5); }
.trilha-cartao.t-bastidores:hover { border-color: rgba(0,214,122,.5); }
.trilha-cartao b { display: block; font-size: 1.05rem; margin-bottom: 6px; color: #e9f0ec; }
.trilha-cartao span { font-size: .9rem; color: #8a9b93; line-height: 1.5; }
@media (max-width: 700px) { .trilha-cartoes { grid-template-columns: 1fr; } }

/* busca */
.busca { position: relative; margin: 26px 0 6px; max-width: 520px; }
.busca input {
  width: 100%; padding: 12px 16px; border-radius: 12px; font: inherit;
  color: #e9f0ec; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
}
.busca input:focus { outline: none; border-color: var(--acento); }
.busca-res {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: #071009; border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  max-height: 340px; overflow-y: auto; box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.busca-res a { display: block; padding: 11px 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.06); }
.busca-res a:last-child { border-bottom: 0; }
.busca-res a:hover, .busca-res a.sel { background: rgba(255,255,255,.05); }
.busca-res b { display: block; color: #e9f0ec; font-size: .95rem; }
.busca-res span { display: block; color: #8a9b93; font-size: .82rem; margin-top: 2px; }
.busca-res .vazio { padding: 14px; color: #8a9b93; font-size: .9rem; }

/* sumario */
.article-shell { display: block; }
.toc {
  margin: 0 0 30px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.02);
}
.toc > summary { cursor: pointer; font-weight: 700; color: #e9f0ec; letter-spacing: .02em; }
.toc ol { list-style: none; margin: 12px 0 2px; padding: 0; }
.toc li { margin: 5px 0; }
.toc li.n3 { padding-left: 18px; font-size: .92em; }
.toc a { color: #8a9b93; text-decoration: none; }
.toc a:hover, .toc a.ativo { color: var(--acento); }
.article-side { display: none; }
.toc-fixo ol { list-style: none; margin: 0; padding: 0; }
.toc-fixo li { margin: 7px 0; line-height: 1.4; }
.toc-fixo li.n3 { padding-left: 14px; font-size: .88em; }
.toc-fixo a { color: #7d8d86; text-decoration: none; font-size: .88rem; border-left: 2px solid transparent; padding-left: 10px; display: block; }
.toc-fixo a:hover { color: #e9f0ec; }
.toc-fixo a.ativo { color: var(--acento); border-left-color: var(--acento); }
.toc-fixo b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #5d6b64; margin-bottom: 12px; padding-left: 12px; }

@media (min-width: 1160px) {
  .article-shell {
    display: grid; grid-template-columns: minmax(0, 820px) 240px;
    gap: 48px; justify-content: center; align-items: start;
  }
  .article-shell .article-body { margin: 0; }
  .article-side { display: block; position: sticky; top: 96px; }
  .toc { display: none; }
}

/* tabela */
.tabela-rol { overflow-x: auto; margin: 26px 0; -webkit-overflow-scrolling: touch; }
.tabela-rol table { border-collapse: collapse; width: 100%; font-size: .94rem; min-width: 460px; }
.tabela-rol th, .tabela-rol td { padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.tabela-rol th { color: var(--acento); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.tabela-rol td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela-rol tbody tr:hover { background: rgba(255,255,255,.02); }

/* medidor */
.medidor { margin: 16px 0; }
.medidor .cab { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 6px; }
.medidor .cab b { color: #e9f0ec; font-weight: 600; }
.medidor .cab span { color: #8a9b93; font-variant-numeric: tabular-nums; }
.medidor .trilho { height: 7px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.medidor .barra { display: block; height: 100%; border-radius: 999px; }

/* nota de alerta */
.nota {
  margin: 26px 0; padding: 16px 20px; border-radius: 12px;
  border-left: 3px solid var(--acento); background: rgba(255,255,255,.03);
}
.nota p { margin: 0; color: #cfdad4; }
.nota.risco { border-left-color: #ff6b57; background: rgba(255,107,87,.07); }

/* codigo */
.article-body pre {
  margin: 26px 0; padding: 16px 18px; border-radius: 12px; overflow-x: auto;
  background: #050d08; border: 1px solid rgba(255,255,255,.08);
}
.article-body pre code { font-size: .88rem; line-height: 1.6; color: #b9c8c1; background: none; padding: 0; }
.article-body hr.sep { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: 34px 0; }

/* FAQ */
.faq { margin: 44px 0 0; }
.faq h2 { margin-bottom: 16px; }
.faq-item {
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px; background: rgba(255,255,255,.02);
}
.faq-item > summary { cursor: pointer; font-weight: 600; color: #e9f0ec; }
.faq-item[open] > summary { color: var(--acento); margin-bottom: 8px; }
.faq-item p { margin: 0; color: #b9c8c1; }

/* serie */
.serie-banner {
  max-width: 820px; margin: 0 auto 30px; padding: 16px 20px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--acento) 30%, transparent);
  background: color-mix(in srgb, var(--acento) 7%, transparent);
}
.serie-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.serie-cab .selo { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--acento); font-weight: 700; }
.serie-cab a { color: #e9f0ec; font-weight: 600; text-decoration: none; }
.serie-cab .serie-pos { margin-left: auto; font-size: .82rem; color: #8a9b93; }
.serie-lista { list-style: none; margin: 0; padding: 0; }
.serie-lista li { font-size: .9rem; color: #8a9b93; margin: 4px 0; }
.serie-lista li b { color: var(--acento); margin-right: 4px; }
.serie-lista li a { color: #b9c8c1; text-decoration: none; }
.serie-lista li a:hover { color: #e9f0ec; }
.serie-lista li.atual { color: #e9f0ec; font-weight: 600; }
.serie-navs { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; max-width: 820px; margin: 30px auto 0; }
.serie-nav { display: block; padding: 14px 18px; border-radius: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.08); }
.serie-nav:hover { border-color: var(--acento); }
.serie-nav span { display: block; font-size: .76rem; color: #8a9b93; margin-bottom: 4px; }
.serie-nav b { color: #e9f0ec; font-size: .95rem; font-weight: 600; }
.serie-nav.prox { text-align: right; }
@media (max-width: 700px) { .serie-navs { grid-template-columns: 1fr; } }
.serie-indice { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.serie-item { display: flex; gap: 18px; padding: 18px 20px; border-radius: 14px; text-decoration: none; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
.serie-item:hover { border-color: var(--acento); }
.serie-item .num { font-size: 1.6rem; font-weight: 700; color: var(--acento); line-height: 1; min-width: 34px; }
.serie-item .txt b { display: block; color: #e9f0ec; margin-bottom: 5px; }
.serie-item .txt i { font-style: normal; color: #8a9b93; font-size: .9rem; line-height: 1.5; }

/* nuvem e indice de tags */
.nuvem-tags { margin: 56px auto 0; max-width: 1100px; }
.nuvem-tags h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: #5d6b64; margin-bottom: 14px; }
.tag-lista { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-width: 1100px; margin: 0 auto; }
.tag-linha { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-radius: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.08); }
.tag-linha:hover { border-color: var(--acento); }
.tag-linha b { color: #e9f0ec; font-weight: 600; }
.tag-linha span { color: #8a9b93; font-size: .85rem; font-variant-numeric: tabular-nums; }
a.tag-chip { text-decoration: none; display: inline-block; }
a.post-tag { text-decoration: none; }

/* paginacao */
.paginacao { display: flex; gap: 8px; justify-content: center; margin: 44px 0 0; }
.paginacao .pag { min-width: 40px; text-align: center; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: #8a9b93; border: 1px solid rgba(255,255,255,.09); font-variant-numeric: tabular-nums; }
.paginacao a.pag:hover { color: #e9f0ec; border-color: var(--acento); }
.paginacao .pag.atual { color: #030805; background: var(--acento); border-color: var(--acento); font-weight: 700; }

/* anuncio */
.ad-slot { margin: 34px auto; max-width: 820px; min-height: 90px; }
.ad-slot ins { display: block; }

/* pagina de leitura: sem cursor customizado, sem particulas */
body.leitura { cursor: auto; }
body.leitura a, body.leitura button { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .progresso { transition: none; }
  .trilha-cartao, .serie-nav, .tag-linha { transition: none; }
}
