/* ============================================================
   BARRETO.eng: artigos em vídeo do blog (série Barreto Engenharia Explica)
   Arquivo próprio para não exigir nova versão de style.css e theme.css.
   ============================================================ */

/* Metadados legíveis sobre o fundo azul-marinho do topo no modo claro */
:root:not([data-theme="dark"]) .page-hero .article-meta { color: #c2c9ea; }
:root:not([data-theme="dark"]) .page-hero .article-tagchip { color: var(--gold); }

/* Player com fachada leve */
.video-embed { margin: 0 0 22px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-lg); background: #081145; box-shadow: var(--shadow); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; display: block; cursor: pointer; }
.video-facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Canto inferior esquerdo: o centro e a direita da miniatura têm o título. */
.video-play { position: absolute; left: 20px; bottom: 20px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #0d1b5e; box-shadow: 0 10px 28px rgba(8,17,45,.45); transition: transform .2s var(--ease), background .2s; }
.video-play svg { width: 32px; height: 32px; margin-left: 4px; }
.video-facade:hover .video-play { transform: scale(1.08); background: #ffd451; }
.video-facade:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.video-caption { margin-top: 10px; color: var(--muted-light); font-size: 14px; line-height: 1.5; }
.video-caption a { color: var(--gold-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Capítulos do vídeo */
.video-chapters { margin: 0 0 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.video-chapters summary { padding: 14px 18px; cursor: pointer; color: var(--heading); font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.video-chapters ul { display: grid; gap: 2px; margin: 0; padding: 0 10px 12px; list-style: none; }
.video-chapters a { display: flex; gap: 12px; align-items: baseline; padding: 7px 8px; border-radius: 8px; color: var(--text-body); font-size: 15px; line-height: 1.4; }
.video-chapters a:hover { background: rgba(128,140,175,.14); color: var(--heading); }
.video-chapters time { flex: none; min-width: 44px; color: var(--gold-600); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Blocos ao fim do artigo */
.article-related { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-related h2 { font-size: 20px; margin-bottom: 12px; }
.article-related ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.article-related a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 50px; color: var(--heading); font-size: 14.5px; font-weight: 600; transition: border-color .2s, background .2s; }
.article-related a:hover { border-color: var(--gold-600); background: var(--bg-soft); }
.article-author { margin-top: 28px; color: var(--muted-light); font-size: 14.5px; line-height: 1.6; }
.article-author strong { color: var(--heading); }
.article-cta .btn + .btn { margin-left: 10px; }
.article-cta .cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.article-cta .cta-actions .btn + .btn { margin-left: 0; }

/* Navegação entre episódios */
.episode-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.episode-nav a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--heading); font-weight: 600; font-size: 15px; line-height: 1.4; transition: border-color .2s, transform .2s; }
.episode-nav a:hover { border-color: var(--gold-600); transform: translateY(-2px); }
.episode-nav span { display: block; margin-bottom: 4px; color: var(--muted-light); font-size: 13px; font-weight: 500; }
.episode-nav .next { grid-column: 2; text-align: right; }

/* Cartões da série em blog.html */
.blog-grid--video { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blog-card--video { padding-top: 0; overflow: hidden; }
.blog-thumb { position: relative; display: block; margin: 0 -30px 20px; aspect-ratio: 16 / 9; overflow: hidden; background: #081145; }
.blog-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.blog-card--video:hover .blog-thumb img { transform: scale(1.035); }
.blog-thumb .video-play { left: 12px; bottom: 12px; width: 44px; height: 44px; }
.blog-thumb .video-play svg { width: 20px; height: 20px; margin-left: 3px; }
.blog-card--video:hover .video-play { transform: scale(1.08); }
.blog-card--video .blog-top { margin-bottom: 10px; }
.blog-card--video h3 { font-size: 18.5px; }
.blog-card--video > p { font-size: 14.5px; }

@media (max-width: 1080px) {
  .blog-grid--video { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .blog-grid--video { grid-template-columns: minmax(0, 1fr); }
  .video-play { left: 12px; bottom: 12px; width: 52px; height: 52px; }
  .video-play svg { width: 24px; height: 24px; margin-left: 3px; }
  .episode-nav { grid-template-columns: minmax(0, 1fr); }
  .episode-nav .next { grid-column: auto; }
}
