/* ===== Layout geral do post/listagem ===== */
.post-page, .blog-home { max-width: 860px; margin: 24px auto; }
.post-card, .post-card-mini {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-card { padding: 24px; }
.post-card-mini { padding: 16px; display: flex; align-items: center; gap: 10px; }

/* ===== Cabeçalho do post ===== */
.breadcrumbs { font-size: .92rem; color: var(--muted); margin: 4px 0 12px; display:flex; flex-wrap:wrap; gap:6px }
.breadcrumbs a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent }
.breadcrumbs a:hover { border-color: var(--fg) }

.post-header h1 { margin: 0 0 8px; line-height: 1.18; letter-spacing: .2px }
.post-meta { color: var(--muted); font-size: .92rem; display:flex; gap:12px; flex-wrap:wrap; align-items:center }
.badge { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .82rem }

/* ===== Sumário (TOC) ===== */
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 14px 0 18px;
  background: color-mix(in oklab, var(--card) 92%, var(--fg) 8%) }
.toc-title { font-weight: 700; margin: 0 0 8px }
.toc a { display:block; padding:6px 0; color:inherit; text-decoration:none; border-bottom:1px dashed transparent }
.toc a:hover { border-color: var(--line) }

/* ===== Tipografia ===== */
.prose h2 { margin: 20px 0 8px; line-height: 1.22 }
.prose h3 { margin: 16px 0 6px; line-height: 1.28 }
.prose p { margin: 10px 0 }
.prose ul, .prose ol { padding-left: 20px; margin: 8px 0 12px }
.prose li + li { margin-top: 6px }
.prose a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor }
.prose a:hover { opacity: .9 }
.prose img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display:block; margin: 12px auto }
.prose blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--fg);
  background: color-mix(in oklab, var(--card) 94%, var(--fg) 6%); border-radius: 8px }

/* Tabelas e código */
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px; text-align: left }
.prose thead th { background: color-mix(in oklab, var(--card) 90%, var(--fg) 10%) }
.prose code { background: color-mix(in oklab, var(--card) 85%, var(--fg) 15%); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em }
.prose pre { background: color-mix(in oklab, var(--card) 85%, var(--fg) 15%); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; overflow: auto }
.prose pre code { background: transparent; border: 0; padding: 0 }

/* Callout */
.callout { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 12px 0; display:grid; gap:6px }
.callout.info { background: color-mix(in oklab, var(--card) 92%, var(--fg) 8%) }

/* CTA e relacionados */
.post-cta { display:flex; gap:10px; flex-wrap:wrap; margin: 14px 0 6px }
.post-cta .btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Botão principal */
.post-cta .btn {
  background: #0072f5; /* azul padrão */
  color: #fff;
  border: 1px solid #0072f5;
}
.post-cta .btn:hover {
  opacity: .9;
}

/* Botão secundário (ghost) */
.post-cta .btn.ghost {
  background: transparent;
  color: #0072f5;
  border: 1px solid #0072f5;
}
.post-cta .btn.ghost:hover {
  background: rgba(0,114,245,0.08);
}

/* Relacionados */
.related { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line) }
.related h3 { margin: 0 0 10px }
.related-list { display:grid; gap:10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.related a { display:flex; align-items:center; gap:8px; text-decoration:none; color:inherit; padding:10px;
  border:1px solid var(--line); border-radius:12px; background: var(--card) }
.related a:hover { transform: translateY(-2px); transition: transform .15s ease }

/* Rodapé do post */
.post-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); color:var(--muted); font-size: .92rem }
.tags { margin-top: 6px; font-size: .9rem; color: var(--muted) }

/* Paginação */
.post-pager { display:flex; justify-content: space-between; gap:12px; margin: 18px 0 0 }
.post-pager a { flex:1; text-decoration:none; color:inherit; border:1px solid var(--line); border-radius:12px; padding:12px; background: var(--card) }
.post-pager a:hover { transform: translateY(-2px); transition: transform .15s ease }

/* ===== Listagem do blog (cards) ===== */
.blog-grid { display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); margin-top: 14px }
.blog-card { text-decoration:none; color:inherit }
.blog-card .title { font-weight: 800; }
.blog-card .desc { color: var(--muted); font-size: .95rem }

/* Responsivo */
@media (max-width: 720px) {
  .post-card { padding: 18px }
  .related-list { grid-template-columns: 1fr }
}

/* Foco acessível */
.post-card a:focus-visible, .related a:focus-visible, .post-pager a:focus-visible, .blog-card:focus-visible {
  outline: 2px dashed var(--fg); outline-offset: 2px; border-radius: 14px;
}
