/* ============================================================
   RWM Engenharia — Blog público
   Reaproveita os design tokens de /css/style.css (carregado antes).
   ============================================================ */

/* ---------- Cabeçalho de seção do blog ---------- */
.blog-hero { padding-top: clamp(9rem, 14vw, 11rem); padding-bottom: clamp(3rem, 6vw, 5rem); background: var(--ink); color: var(--on-dark); }
.blog-hero .eyebrow { color: #fff; }
.blog-hero .eyebrow::before { background: var(--red); }
.blog-hero h1 { color: #fff; margin-top: 1rem; max-width: 20ch; }
.blog-hero p { color: var(--on-dark-soft); margin-top: 1.2rem; max-width: 52ch; font-size: clamp(1.02rem, 1.4vw, 1.18rem); }

/* ---------- Filtro de categorias ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.blog-filters a {
  font-family: var(--font-display); font-size: .84rem; font-weight: 600; color: var(--on-dark-soft);
  border: 1.5px solid var(--border-dark); padding: .5em 1.1em; border-radius: 999px; transition: .25s var(--ease);
}
.blog-filters a:hover, .blog-filters a.active { color: #fff; border-color: var(--red); background: rgba(246,20,25,.12); }

/* ---------- Grid de artigos ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 2.4vw, 2.2rem); margin-top: clamp(2.4rem, 4vw, 3.4rem); }
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--ink); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-cat { position: absolute; top: .9rem; left: .9rem; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .7rem; letter-spacing: .04em; padding: .35em .8em; border-radius: 999px; text-transform: uppercase; }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-card-meta { font-size: .76rem; color: var(--text-mute); letter-spacing: .02em; margin-bottom: .6rem; }
.post-card h3 { font-size: 1.18rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.post-card p { font-size: .92rem; color: var(--text-soft); margin-top: .6rem; line-height: 1.55; flex: 1; }
.post-card-link { margin-top: 1.1rem; font-family: var(--font-display); font-size: .86rem; font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: .4em; }
.post-card-link svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.post-card:hover .post-card-link svg { transform: translateX(3px); }
a.post-card-cover-link { display: block; }

.blog-empty { text-align: center; padding: 5rem 1rem; color: var(--text-soft); }

/* ---------- Paginação ---------- */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: clamp(2.6rem, 4vw, 3.8rem); }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.pagination a { color: var(--text); border: 1.5px solid var(--border); transition: .25s var(--ease); }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination span.current { background: var(--blue); color: #fff; }

/* ---------- Artigo (single) ---------- */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101; background: transparent; }
.reading-progress-bar { height: 100%; width: 0%; background: var(--red); transition: width .1s linear; }

.article-hero { padding-top: clamp(8.5rem, 13vw, 10.5rem); padding-bottom: 0; }
.article-breadcrumb { font-size: .82rem; color: var(--text-mute); display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }
.article-breadcrumb a { color: var(--text-soft); }
.article-breadcrumb a:hover { color: var(--blue); }
.article-cat-tag { display: inline-block; background: rgba(2,68,155,.1); color: var(--blue); font-family: var(--font-display); font-weight: 600; font-size: .74rem; letter-spacing: .04em; padding: .35em .9em; border-radius: 999px; text-transform: uppercase; margin-top: 1.2rem; }
.article-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-top: 1rem; max-width: 22ch; letter-spacing: -.03em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.6rem; color: var(--text-soft); font-size: .88rem; }
.article-meta span { display: flex; align-items: center; gap: .5em; }
.article-meta svg { width: 16px; height: 16px; color: var(--blue); }

.article-cover { margin-top: clamp(2rem, 4vw, 3rem); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 21/9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; padding-top: clamp(2.4rem, 4vw, 3.4rem); }

.article-content { font-size: 1.08rem; line-height: 1.78; color: var(--text); }
.article-content > * + * { margin-top: 1.4em; }
.article-content h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 2em; letter-spacing: -.02em; }
.article-content h3 { font-size: 1.25rem; margin-top: 1.8em; }
.article-content p { }
.article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--red); }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content li + li { margin-top: .5em; }
.article-content img { border-radius: var(--r-md); box-shadow: var(--shadow-sm); width: 100%; height: auto; }
.article-content blockquote { border-left: 3px solid var(--red); padding-left: 1.2em; font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--text-soft); }

/* embed de vídeo responsivo — mesma regra usada no editor admin */
.article-content .video-embed { margin: 1.6em 0; }
.article-content .video-embed-inner { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; background: #000; box-shadow: var(--shadow-sm); }
.article-content .video-embed-inner iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-content .video-embed.embed-social { display: flex; justify-content: center; }

.article-share { display: flex; align-items: center; gap: .8rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-share span { font-family: var(--font-display); font-size: .82rem; font-weight: 600; color: var(--text-soft); }
.article-share a { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); display: grid; place-items: center; color: var(--text-soft); transition: .25s var(--ease); }
.article-share a:hover { border-color: var(--blue); color: var(--blue); }
.article-share svg { width: 17px; height: 17px; }

/* ---------- CTA dentro do artigo ---------- */
.article-cta { margin-top: 3rem; background: var(--ink); border-radius: var(--r-lg); padding: clamp(1.8rem, 3vw, 2.6rem); text-align: center; }
.article-cta h3 { color: #fff; font-size: 1.4rem; }
.article-cta p { color: var(--on-dark-soft); margin-top: .6rem; max-width: 46ch; margin-inline: auto; }
.article-cta .btn { margin-top: 1.4rem; }

/* ---------- Navegação entre artigos (anterior/próximo) ---------- */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: clamp(2.6rem, 4vw, 3.6rem); max-width: 900px; margin-inline: auto; }
@media (max-width: 700px) { .article-nav { grid-template-columns: 1fr; } }
.article-nav a { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 1.5rem; border-radius: var(--r-md); border: 1.5px solid var(--border); transition: .3s var(--ease); background: #fff; }
.article-nav a:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.article-nav .dir { font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); display: flex; align-items: center; gap: .4em; }
.article-nav .dir svg { width: 14px; height: 14px; color: var(--red); }
.article-nav .next { text-align: right; align-items: flex-end; }
.article-nav .next .dir { flex-direction: row-reverse; }
.article-nav .ttl { font-weight: 650; font-size: .98rem; line-height: 1.35; }

/* ---------- Relacionados ---------- */
.related-head { max-width: 900px; margin: clamp(3.4rem, 5vw, 4.6rem) auto 0; }
.related-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.related-grid { max-width: 900px; margin: 1.8rem auto 0; }
