/* ===== Blog =====
   Herda tokens, nav e footer de /styles.css. Aqui só o que é específico
   do índice (/blog/) e das páginas de post (/blog/<slug>/). */

.blog-body { background: var(--bg); }
.nav-links a.is-active { color: var(--navy); font-weight: 600; }

/* ===== Faixa de topo (índice e post) ===== */
.blog-hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  padding: clamp(48px, 8svh, 84px) 0 clamp(40px, 6svh, 64px);
}
.blog-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 80% 10%, rgba(212, 175, 55, 0.18), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(212, 175, 55, 0.10), transparent 60%),
    linear-gradient(180deg, #0f1c2a 0%, #1a2a3a 100%);
}
.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}
.blog-hero .eyebrow { margin-bottom: 18px; }
.blog-hero .eyebrow a { color: inherit; }
.blog-hero .eyebrow a:hover { color: var(--gold-soft); }
.blog-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
}
.blog-hero-sub {
  max-width: 620px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
}
.post-meta strong { color: var(--gold-soft); font-weight: 600; }
.post-meta > * + *::before {
  content: "·";
  margin: 0 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Corpo do post ===== */
.post-main { padding: clamp(40px, 6svh, 72px) 0 clamp(48px, 8svh, 88px); }
.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink);
}
.post-content > :first-child { margin-top: 0; }
.post-content p { margin: 0 0 20px; }
.post-content strong { color: var(--navy); }
.post-content a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.post-content a:hover { color: var(--gold); }

.post-content h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin: 48px 0 16px;
}
.post-content h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 14px;
}
.post-content h3 {
  font-size: 1.3rem;
  margin: 36px 0 12px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.post-content li { margin-bottom: 8px; }
.post-content li::marker { color: var(--gold); }

.post-content figure { margin: 32px 0; }
.post-content figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfcfb;
  box-shadow: var(--shadow-sm);
}
.post-content figcaption {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

/* Fórmulas e blocos de código: destaque discreto, na paleta do site */
.post-content pre {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--bg-soft);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  white-space: pre-wrap;
  overflow-x: auto;
}
.post-content pre code { font: inherit; background: none; padding: 0; }
.post-content code {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--gold);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums lining-nums;
}
.post-content th,
.post-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.post-content th {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Referências */
.post-content h2.post-refs-title {
  font-size: 1.2rem;
  margin-top: 40px;
}
.post-content ul.post-refs {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-content ul.post-refs li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-content ul.post-refs li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.35em;
  font-size: 0.65rem;
  color: var(--gold);
}

/* Aviso fixo em todo post */
.post-disclaimer {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-disclaimer .eyebrow { margin-bottom: 6px; font-size: 0.66rem; }
.post-disclaimer p { margin: 0; }

.post-nav {
  max-width: 720px;
  margin: 36px auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.post-nav a,
.post-item-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.post-nav a:hover,
.post-item-more:hover { color: var(--gold); }

/* ===== Índice ===== */
.post-list-section { padding: clamp(24px, 4svh, 40px) 0 clamp(48px, 8svh, 88px); }
.post-list { max-width: 760px; margin: 0 auto; }
.post-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.post-item-meta {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-item-title {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  margin: 0 0 10px;
}
.post-item-title a { color: var(--navy); transition: color 0.2s ease; }
.post-item-title a:hover { color: var(--gold); }
.post-item-desc {
  max-width: 640px;
  margin: 0 0 14px;
  font-size: 1.02rem;
  color: var(--ink-soft);
}
.post-list-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .blog-hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .blog-hero-sub { font-size: 0.98rem; }
  .post-content { font-size: 1rem; line-height: 1.7; }
  .post-content h2 { margin-top: 38px; }
  .post-content figure { margin: 26px 0; }
  .post-content figcaption { font-size: 1rem; }
  .post-content pre { padding: 14px 16px; font-size: 0.92rem; }
  .post-item { padding: 24px 0; }
}
