/* ==========================================================================
   Blog Fortal Executivo — Sessao 2 (conteudo editorial principal)

   Artigo em destaque + fileira de artigos + sidebar (outras leituras,
   categorias). SEM faixa de CTA: a home tem um unico CTA grande, na Sessao 4.

   Tema claro. Herda os tokens de home-v2.css.
   ========================================================================== */

.editorial {
  position: relative;
  background: var(--surface-page);
  padding: 64px 0 88px;
}

/* uma coluna so: a sidebar saiu no gate (sem dado real para "mais lidos"),
   e coluna reservada sem conteudo virava faixa vazia ao lado do destaque */
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* --------------------------------------------------------------------------
   cabecalho de bloco
   -------------------------------------------------------------------------- */

.bloco-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

/* os eyebrows desta secao sao <h2> (hierarquia real de titulos), entao zeram
   a margem do agente de usuario — o espacamento vem do .bloco-head */
.bloco-head .eyebrow {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.link-todos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  transition: gap 0.25s ease, color 0.25s ease;
}

.link-todos:hover { gap: 12px; color: var(--accent-strong); }
.link-todos svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   slot de imagem — sustenta a proporcao enquanto a foto definitiva nao entrou
   -------------------------------------------------------------------------- */

.slot {
  position: relative;
  overflow: hidden;
  background: var(--surface-sunken);
  flex-shrink: 0;
}

.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  /* enquanto a foto nao existe, o slot le como superficie em vez de despejar
     o texto do alt na tela. O atributo continua no HTML, para leitor de tela
     e para o Google — so o desenho do alt fica invisivel. */
  color: transparent;
}

.slot-card { aspect-ratio: 16 / 10; }

/* --------------------------------------------------------------------------
   rotulo de categoria
   -------------------------------------------------------------------------- */

/* pilula cheia, dentro do card em destaque */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 13px;
  border-radius: 6px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.2s ease;
}

.badge:hover { background: var(--accent-hover); }

/* rotulo em texto, nos cards menores */
.rotulo {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  transition: color 0.2s ease;
}

.rotulo:hover { color: var(--accent-strong); }

/* --------------------------------------------------------------------------
   meta (tempo de leitura)
   -------------------------------------------------------------------------- */

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta svg {
  width: 15px; height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   botao "Ler artigo" — preenchido
   -------------------------------------------------------------------------- */

.btn-ler {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 20px -12px rgba(229, 35, 40, 0.9);
  transition: background 0.25s ease, gap 0.25s ease, transform 0.25s ease;
}

.btn-ler svg { width: 17px; height: 17px; }

.btn-ler:hover {
  background: var(--accent-hover);
  gap: 14px;
  transform: translateY(-1px);
}

.btn-ler:active { background: var(--accent-strong); transform: none; }

/* seta circular, no rodape dos cards menores */
.seta-circulo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--surface-card);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.seta-circulo svg { width: 17px; height: 17px; }

.artigo:hover .seta-circulo {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   ARTIGO EM DESTAQUE
   -------------------------------------------------------------------------- */

.destaque {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.destaque:hover {
  border-color: rgba(229, 35, 40, 0.28);
  box-shadow: 0 18px 40px -28px rgba(26, 29, 34, 0.45);
}

.destaque:hover .slot img { transform: scale(1.03); }

.destaque-texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 40px 38px;
}

.destaque-texto h3 {
  margin: 0;
  font-size: clamp(28px, 2.9vw, 40px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
}

/* o vermelho deste titulo e grande (>=24px), entao pode usar o tom aberto da
   marca: acima de 24px o minimo cai para 3:1 e o #EA2B2E entrega 4,3:1 */
.destaque-texto h3 .em { color: var(--accent-display); }

.destaque-texto h3 a { color: inherit; }
.destaque-texto h3 a:hover .em { color: var(--accent-strong); }

.destaque-texto p {
  margin: 0;
  max-width: 44ch;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--text-secondary);
}

.destaque .slot { height: 100%; }

/* foto panoramica: o recorte guarda o executivo, o motorista e a porta aberta */
.destaque .slot img { object-position: 30% 50%; }

/* --------------------------------------------------------------------------
   FILEIRA DE ARTIGOS
   -------------------------------------------------------------------------- */

.ultimos { margin-top: 24px; }

/* auto-fit: a fileira acompanha quantos artigos existirem, sem redesenho */
.artigos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.artigo {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.artigo:hover {
  border-color: rgba(229, 35, 40, 0.28);
  box-shadow: 0 18px 40px -28px rgba(26, 29, 34, 0.45);
  transform: translateY(-3px);
}

.artigo:hover .slot img { transform: scale(1.05); }

.artigo-texto {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px 22px;
  flex-grow: 1;
}

.artigo-texto h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.012em;
  color: var(--text-primary);
}

.artigo-texto h3 a { color: inherit; }

/* o titulo estica o clique para o card inteiro; o rotulo e a seta ficam
   acima dele no empilhamento para continuarem clicaveis por conta propria */
.artigo-texto h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.artigo-texto .rotulo,
.artigo .rodape { position: relative; z-index: 1; }

.artigo .rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--divisor);
}

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.painel {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px 22px;
}

.painel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.painel-head > svg {
  width: 21px; height: 21px;
  color: var(--accent);
  flex-shrink: 0;
}

.painel-head h2 {
  margin: 0;
  flex-grow: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.painel-head .chevron {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.painel-head .chevron svg { width: 17px; height: 17px; }
.painel-head .chevron:hover { background: var(--surface-sunken); color: var(--text-primary); }

/* o desenho fica em 30px, como na referencia, mas a area de toque sobe para
   44px sem mudar o visual — 30px e alvo pequeno demais no celular */
.painel-head .chevron { position: relative; }
.painel-head .chevron::after {
  content: "";
  position: absolute;
  inset: -7px;
}

/* --- outras leituras --- */

.mais-lidos {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: lidos;
}

.mais-lidos li {
  counter-increment: lidos;
  border-top: 1px solid var(--divisor);
}

.mais-lidos li:first-child { border-top: 0; }

.mais-lidos a {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 15px 0;
}

.mais-lidos a::before {
  content: counter(lidos, decimal-leading-zero);
  flex-shrink: 0;
  min-width: 26px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.mais-lidos a span {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.mais-lidos a:hover span { color: var(--text-primary); }

/* --- categorias --- */

.lista-categorias {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lista-categorias li { border-top: 1px solid var(--divisor); }
.lista-categorias li:first-child { border-top: 0; }

.lista-categorias a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.lista-categorias a:hover { color: var(--text-primary); }

.lista-categorias .nome { flex-grow: 1; }

.lista-categorias .qtd {
  flex-shrink: 0;
  min-width: 30px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-sunken);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  /* --text-muted sobre --surface-sunken da 4,06:1 e reprova; o badge tem
     fundo proprio, entao precisa de um passo a mais de contraste */
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  transition: background 0.2s ease, color 0.2s ease;
}

.lista-categorias a:hover .qtd {
  background: rgba(229, 35, 40, 0.10);
  color: var(--accent-text);
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 1200px) {
  .destaque-texto { padding: 32px 28px; }
}

/* tablet: sidebar desce e vira 2 colunas; destaque empilha com a foto no topo */
@media (max-width: 1024px) {
  .editorial { padding: 52px 0 68px; }

  .editorial-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
  }

  .destaque { grid-template-columns: minmax(0, 1fr); }
  .destaque .slot { aspect-ratio: 16 / 9; height: auto; order: -1; }
  .destaque-texto { padding: 28px 26px 32px; }

  .artigos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* mobile */
@media (max-width: 720px) {
  .editorial { padding: 40px 0 56px; }

  .bloco-head { flex-wrap: wrap; gap: 12px 20px; }

  .destaque { border-radius: 14px; }
  .destaque .slot { aspect-ratio: 4 / 3; }
  .destaque-texto { padding: 24px 20px 28px; gap: 16px; }
  .destaque-texto p { font-size: 15.5px; }

  .ultimos { margin-top: 20px; }
  .artigos { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .artigo { border-radius: 14px; }

  .sidebar { grid-template-columns: minmax(0, 1fr); }

  .btn-ler { padding: 14px 22px; }
}
