/* ==========================================================================
   Blog — carregado só em blog.html e post.html.
   Usa apenas os tokens de style.css; não redefine nada global.
   ========================================================================== */

.blog-head { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 6vw, 64px) var(--gutter) 8px; display: flex; flex-direction: column; gap: 14px; }
.blog-head .lede { max-width: 60ch; }

.blog-filters { max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 8px; }
.blog-chip {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font-size: 13px; font-weight: 500; transition: border-color .2s, color .2s, background .2s;
}
.blog-chip:hover { border-color: var(--red); color: var(--red); }
.blog-chip.active { background: var(--red); border-color: var(--red); color: var(--surface); }

.blog-list { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) clamp(40px, 6vw, 72px); }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--red); }
.blog-card-media { aspect-ratio: 16 / 9; background: var(--bg-warm); overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-media-empty { display: flex; align-items: center; justify-content: center; color: var(--rose); }
.blog-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-cat { font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); }
.blog-card-title { font-size: 20px; line-height: 1.3; margin: 0; color: var(--ink); }
.blog-card-excerpt { font-size: 15px; line-height: 1.6; color: var(--ink-mute); margin: 0; }
.blog-card-meta { margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--ink-faint); }

.blog-more-wrap { display: flex; justify-content: center; margin-top: 32px; }
.blog-more-wrap [hidden] { display: none; } /* .btn define display e anularia o atributo hidden */
.blog-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-mute); font-size: 15px; padding: 40px 0; }
.blog-notfound { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: clamp(48px, 8vw, 96px) var(--gutter); }
.blog-notfound h1 { font-size: clamp(26px, 4vw, 36px); margin: 0; color: var(--ink); }
.blog-notfound p { margin: 0; }

/* Esqueleto enquanto os artigos carregam */
.blog-skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--bg-warm), var(--line-soft), var(--bg-warm)); background-size: 200% 100%; min-height: 320px; animation: blog-shimmer 1.4s linear infinite; }
@keyframes blog-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .blog-skeleton { animation: none; } }

/* Artigo ------------------------------------------------------------------ */
.post { max-width: 76ch; margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(32px, 5vw, 48px); }
.post-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-mute); margin-bottom: 20px; }
.post-back:hover { color: var(--red); }
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.post-cats:empty { display: none; }
.post-title { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; margin: 0; color: var(--ink); }
.post-title:empty { min-height: 1.2em; background: var(--bg-warm); border-radius: var(--r-sm); }
.post-meta { margin-top: 12px; font-size: 14px; color: var(--ink-faint); }
.post-cover { margin: 28px 0 0; border-radius: var(--r-lg); overflow: hidden; }
.post-cover img { width: 100%; display: block; }

.post-body { margin-top: 28px; }
.post-body p, .post-body li { font-size: 17px; line-height: 1.75; color: var(--ink-soft); }
.post-body p { margin: 0 0 18px; }
.post-body h2 { font-size: clamp(22px, 2.6vw, 26px); line-height: 1.25; margin: 36px 0 12px; color: var(--ink); }
.post-body h3, .post-body h4 { font-size: 19px; margin: 28px 0 10px; color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 18px; }
.post-body li p { margin: 0 0 6px; }
.post-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--red); }
.post-body blockquote p { font-family: "Fraunces", Georgia, serif; font-size: 19px; color: var(--ink); }
.post-body figure { margin: 28px 0; }
.post-body figure img { width: 100%; height: auto; border-radius: var(--r-md); display: block; }
.post-body figcaption { font-size: 13px; color: var(--ink-faint); margin-top: 8px; text-align: center; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.post-disclaimer {
  margin-top: 36px; padding: 18px 20px; border-radius: var(--r-md); background: var(--bg-warm);
  border: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink-mute);
}
.post-disclaimer a { color: var(--red); text-decoration: underline; }
