/*
Theme Name: OVR Blog
Theme URI: https://ovrcamisetas.com.br
Author: OVR
Description: Tema do blog da OVR. Usa os mesmos tokens do site principal, sem comentário e sem plugin de layout. Feito para ser magro: quanto menos código roda, menos porta existe.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: Uso próprio da marca OVR
Text Domain: ovr-blog
Tags: blog, editorial, streetwear
*/

/* Os tokens e os componentes vêm de ovr.css.
   Aqui fica só o que é específico do blog. */

/* ------------------------- post em destaque ------------------- */
.destaque {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--e-48);
  align-items: center; margin-bottom: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--fio);
}
.destaque__media { display: block; overflow: hidden; background: var(--bg-surface); aspect-ratio: 4/3; }
.destaque__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.6,.2,1); }
.destaque:hover .destaque__media img { transform: scale(1.03); }
.destaque__texto { display: flex; flex-direction: column; gap: var(--e-16); align-items: flex-start; }
.destaque__texto h2 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
@media (max-width: 900px) { .destaque { grid-template-columns: 1fr; gap: var(--e-24); } }

/* ---------------------------- a lista ------------------------- */
.lista-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-32) var(--e-16); }
@media (max-width: 1000px) { .lista-posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .lista-posts { grid-template-columns: 1fr; } }

/* Sem imagem de capa o cartão virava um bloco de texto solto, sem nada
   dizendo que dá para clicar. Ganha superfície e borda — a mesma
   gramática do cartão de produto do site, que sinaliza clique pela
   borda do poço escurecendo no hover.                                */
.cartao-post {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper-0); border: 1px solid var(--fio);
  padding: 22px 22px 18px; transition: border-color .18s;
}
.cartao-post:hover { border-color: var(--ink-950); }
/* A chamada desce para a base para os três cartões alinharem, mesmo com
   título e resumo de alturas diferentes.                              */
.cartao-post__ler {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fonte-titulo); font-weight: 700;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-950);
}
.cartao-post__ler svg { width: 13px; height: 13px; flex: none; transition: transform .18s; }
.cartao-post:hover .cartao-post__ler svg { transform: translate(3px, -3px); }
.cartao-post:hover .cartao-post__ler span { box-shadow: inset 0 -6px 0 var(--acento); }
.cartao-post__media { display: block; overflow: hidden; background: var(--bg-surface); aspect-ratio: 3/2; margin-bottom: 8px; }
.cartao-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.6,.2,1); }
.cartao-post:hover .cartao-post__media img { transform: scale(1.04); }
.cartao-post__titulo {
  font-family: var(--fonte-titulo); font-weight: 700;
  font-size: 20px; line-height: 1.15; letter-spacing: -0.01em;
}
.cartao-post__titulo a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------- a capa -------------------------- */
.capa-post { background: var(--bg-surface); }
.capa-post img { width: 100%; max-height: 62vh; object-fit: cover; }

/* --------------------------- o texto -------------------------- */
/* Medida de leitura curta de propósito: 66 caracteres por linha. */
.texto-post { max-width: 68ch; margin-inline: auto; font-size: 18px; line-height: 1.75; color: #2c2b28; }

/* ---- o post em duas colunas: leitura à esquerda, contexto à direita ----
   A coluna de leitura centralizada num envelope de 1300px deixava ~265px
   mortos de cada lado e o texto parecia flutuar. Ancorada à esquerda com
   um trilho de contexto à direita, a largura vira composição.          */
.post-corpo {
  display: grid; grid-template-columns: minmax(0, 68ch) 240px;
  justify-content: space-between; gap: var(--e-48); align-items: start;
}
.post-corpo .texto-post { margin-inline: 0; max-width: none; }
.trilho { position: sticky; top: calc(var(--nav-altura) + 24px); display: flex; flex-direction: column; gap: 18px; }
.trilho__voltar {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.trilho__voltar svg { flex: none; }
.trilho__voltar:hover span { box-shadow: inset 0 -6px 0 var(--acento); }
.trilho dl { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--fio); margin: 0; }
.trilho dt {
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--texto-fraco);
}
.trilho dd { margin: 0; font-size: 14px; color: var(--ink-950); }
@media (max-width: 1080px) {
  .post-corpo { grid-template-columns: 1fr; gap: var(--e-32); }
  /* sem o trilho ao lado o texto tomaria o envelope inteiro e a linha
     passaria de 900px. A medida volta, ancorada à esquerda.           */
  .post-corpo .texto-post { max-width: 68ch; }
  /* order:-1 é obrigatório: no HTML o trilho vem depois do texto, para o
     leitor de tela receber o artigo primeiro. Empilhado, sem isso, data
     e tempo de leitura cairiam no fim da página.                       */
  .trilho {
    order: -1; position: static; flex-direction: row; flex-wrap: wrap;
    gap: 24px; align-items: center;
    padding-bottom: 20px; border-bottom: 1px solid var(--fio);
  }
  .trilho dl { grid-auto-flow: column; gap: 24px; border-top: 0; padding-top: 0; }
}
/* O cabeçalho perde o cap de 900px centralizado e passa a nascer no mesmo
   eixo do texto, para o título e o corpo compartilharem a mesma espinha. */
.post-cabecalho { max-width: 1000px; margin-inline: 0; }
.texto-post > * + * { margin-top: 1.35em; }
.texto-post h2 {
  font-family: var(--fonte-titulo); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.05; letter-spacing: -0.02em;
  margin-top: 2em; color: var(--ink-950);
}
.texto-post h3 {
  font-family: var(--fonte-titulo); font-weight: 700;
  font-size: 20px; line-height: 1.2; letter-spacing: -0.01em;
  margin-top: 1.8em; color: var(--ink-950);
}
.texto-post a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.texto-post a:hover { background: var(--acento); text-decoration: none; }
.texto-post strong { color: var(--ink-950); font-weight: 600; }
.texto-post ul, .texto-post ol { padding-left: 1.2em; }
.texto-post ul li { list-style: none; position: relative; padding-left: 20px; margin-top: .5em; }
.texto-post ul li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 9px; height: 2px; background: var(--ink-950);
}
.texto-post ol { list-style: decimal; }
.texto-post ol li { margin-top: .5em; padding-left: 6px; }
.texto-post img, .texto-post figure { max-width: 100%; height: auto; }
.texto-post figure { margin-block: 2em; }
.texto-post figcaption { font-size: 13px; color: var(--texto-fraco); margin-top: 10px; }
.texto-post blockquote {
  border-left: 3px solid var(--acento); padding-left: 24px; margin-block: 2em;
  font-family: var(--fonte-titulo); font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ink-950);
}
.texto-post blockquote p { margin: 0; }
.texto-post code {
  font-size: .88em; background: var(--bg-surface);
  padding: 2px 6px; border: 1px solid var(--fio);
}
.texto-post hr { border: 0; border-top: 1px solid var(--fio); margin-block: 2.5em; }
.texto-post table { width: 100%; border-collapse: collapse; font-size: 15px; }
.texto-post th, .texto-post td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--fio); }
.texto-post th { font-family: var(--fonte-titulo); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* imagem larga estoura a medida de leitura de propósito */
.texto-post .alignwide, .texto-post .alignfull {
  max-width: min(1100px, 92vw); margin-inline: calc(50% - min(550px, 46vw));
}

/* --------------------------- etiquetas ------------------------ */
.etiquetas { display: flex; flex-wrap: wrap; gap: 8px; max-width: 68ch; margin: 48px auto 0; }

/* -------------------------- paginação ------------------------- */
.paginacao { margin-top: clamp(48px, 6vw, 72px); }
.paginacao .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.paginacao .page-numbers {
  min-width: 44px; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--fio); background: #fff;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 13px;
}
.paginacao .page-numbers:hover { border-color: var(--ink-950); }
.paginacao .page-numbers.current { background: var(--acento); border-color: var(--acento); }

/* ------------------- ajustes do editor no site ---------------- */
.has-volt-color { color: var(--volt-500); }
.has-ink-color { color: var(--ink-950); }
.has-volt-background-color { background-color: var(--volt-500); }
.has-ink-background-color { background-color: var(--ink-950); color: var(--paper-0); }
.has-stone-background-color { background-color: var(--stone-100); }
.wp-block-group.has-background { padding: 28px; }

/* ------------------- post sem imagem destacada ---------------- */
/* O espaço da mídia fica reservado mesmo sem foto e vira um retângulo
   cinza vazio. Enquanto os posts não tiverem capa, ele some e o
   destaque ocupa a largura inteira.                                */
.destaque__media:not(:has(img)),
.cartao-post__media:not(:has(img)) { display: none; }
.destaque:not(:has(.destaque__media img)) { grid-template-columns: 1fr; max-width: 68ch; }
