/* Blog: usa as variáveis de style.css e a base de texto de legal.css. */

.brand-sub {
  margin-left: 2px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.blog-nav { display: flex; align-items: center; gap: 18px; }
.blog-nav a:not(.back) { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.blog-nav a:not(.back):hover { color: var(--text); }

.blog-main { max-width: 1040px; }
.blog-main > h1 { font-size: 36px; }

/* ---------- Lista ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--col);
  border: 1px solid var(--col-border);
  border-radius: 16px;
  transition: transform .15s, box-shadow .15s !important;
}
.post-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.post-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; }
.post-card-body { padding: 18px 20px 22px; }
.post-card h2 { margin: 6px 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.post-card p { margin: 0; font-size: 15px; color: var(--muted); }
.post-card .post-meta { font-size: 13px; }
.empty { color: var(--muted); }

/* ---------- Artigo ---------- */
.post { max-width: 720px; margin: 0 auto; }
.post-back { margin: 0 0 18px; font-size: 14px; }
.post-back a { color: var(--muted); text-decoration: none; }
.post-back a:hover { color: var(--text); }
.post h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.03em; }
.post-meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tags li {
  margin: 0;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.post-cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 28px 0 8px;
  border-radius: 16px;
  border: 1px solid var(--col-border);
}

.toc {
  margin: 24px 0 8px;
  padding: 16px 20px;
  background: var(--col);
  border: 1px solid var(--col-border);
  border-radius: 12px;
  font-size: 15px;
}
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.post-body { font-size: 17px; line-height: 1.75; }
.post-body h2 { margin: 44px 0 12px; font-size: 25px; scroll-margin-top: 80px; }
.post-body h3 { margin: 30px 0 8px; font-size: 20px; scroll-margin-top: 80px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; }
.post-body blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
}
.post-body blockquote p { margin: 0; }
.post-body figure { margin: 28px 0; }
.post-body figure img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--col-border); }
.post-body figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.post-body img { max-width: 100%; height: auto; }
.post-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  background: var(--col);
  border: 1px solid var(--col-border);
  border-radius: 10px;
}
.post-body pre code { padding: 0; background: none; border: none; font-size: inherit; }
.post-body hr { margin: 36px 0; border: none; border-top: 1px solid var(--col-border); }

.post-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 44px 0 0;
  padding: 20px 22px;
  background: var(--col);
  border: 1px solid var(--col-border);
  border-radius: 16px;
}
.post-cta img { flex: none; border-radius: 11px; }
.post-cta div { flex: 1; }
.post-cta strong { display: block; font-size: 16px; }
.post-cta p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.post-cta .cta-btn {
  flex: none;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 15px;
  color: #0d0f13;
  background: var(--accent);
  border-radius: 10px;
  text-decoration: none;
}
[data-theme="light"] .post-cta .cta-btn { color: #fff; background: #3d55e0; }
.post-cta .cta-btn:hover { filter: brightness(1.08); }
.post-cta .cta-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; margin: 40px auto 0; }
.post-nav a {
  display: block;
  padding: 16px 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--col-border);
  border-radius: 12px;
}
.post-nav a:hover { background: var(--col); }
.post-nav span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.post-nav .older { text-align: right; }

@media (max-width: 700px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-nav a:not(.back) { display: none; }
  .post-cta { flex-direction: column; align-items: flex-start; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .older { text-align: left; }
}

/* Ajustes sobre legal.css */
.legal-main .tags { padding-left: 0; }
.blog .legal-footer { max-width: 1040px; }
