/*
Theme Name: Livro Zero
Theme URI: https://livrozero.com.br/
Author: Felippe De Pin
Description: Tema minimalista e leve para a Revista Livro Zero. Edições são categorias de posts (com capa via ACF) e artigos são posts (com capa, autor e bio). Totalmente responsivo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: revista
*/

/* ============================================================
   RESET MÍNIMO
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: #ffffff;
  color: #000000;
  /* Uma única família tipográfica, sem serifa, sem fontes externas (leve) */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
	border-radius: 3px;
}

/* Container: respiro nas laterais via MARGIN (não usamos padding) */
.container {
  width: calc(100% - 48px);   /* 24px de cada lado */
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   LINKS E BOTÕES — pretos, negrito e maiúsculo
   ============================================================ */
a {
  color: #000000;
  text-decoration: none;
  font-weight: 700;
}
a:hover { text-decoration: underline; }

button,
input[type="submit"] {
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  color: #000000;
  font-weight: 700;
  text-transform: uppercase;
}
button:hover,
input[type="submit"]:hover { text-decoration: underline; }

/* ============================================================
   CABEÇALHO — logo à esquerda, menu à direita
   ============================================================ */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
  margin-bottom: 84px;
}
.site-logo { font-weight: 700; text-transform: uppercase; }
.site-logo img { width: auto; height: auto; max-height: 44px; }
img.custom-logo { width: auto; height: auto; max-height: 44px; }

.main-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   RÓTULOS E TÍTULOS DE PÁGINA
   ============================================================ */
.section-label {
  margin: 0 0 24px 0;
  font-weight: 400;
}
.page-title {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
}

/* ============================================================
   GRADE DE REVISTAS / ARTIGOS — 3 por linha, espaço de 24px
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;          /* 24px para o lado e para baixo */
}

/* Grade de artigos na edição: 4 por linha (imagens menores) */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .grid-4 { grid-template-columns: 1fr; } }

/* Grade de artigos na edição: 5 por linha (imagens menores) */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
@media (max-width: 1000px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .grid-5 { grid-template-columns: repeat(2, 1fr); } }

/* Barra superior com o botão "voltar" alinhado à direita */
.content-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.back-top { white-space: nowrap; text-transform:lowercase; }

/* Cabeçalho da edição: capa (thumb) + nome em negrito + data abaixo */
.edition-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.edition-cover img { width: 120px; height: auto; display: block; }
.edition-title { margin: 0; font-size: 1.5rem; font-weight: 700; }
.edition-date { margin: 8px 0 0 0; font-weight: 400; }

.card { display: block; }
.card-img { width: 100%; height: auto; display: block; }
.card-img--empty {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f2f2f2;   /* placeholder neutro quando não há capa */
}
.card-title {
  display: block;
  margin-top: 8px;       /* pequeno respiro entre capa e título (margin, não padding) */
}
.card-author {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  text-transform: none;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination {
  margin: 48px 0 24px 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
	justify-content: flex-end;
}
.pagination a,
.pagination .page-numbers {
  font-weight: 700;
  text-transform: uppercase;
	padding: 3px 12px;
}
.pagination .current { text-decoration: underline; }

/* ============================================================
   ARTIGO (LEITURA)
   ============================================================ */
.article {
  /* largura total, como as demais páginas do site */
}
.back-link { display: inline-block; margin-bottom: 24px; }

/* Layout do artigo: conteúdo à esquerda, capa à direita (máx. 300px) */
.article-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
/* Linha divisória entre o post e os autores */
.article-layout--divided {
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.article-main { flex: 1 1 auto; min-width: 0; }
.article-aside { flex: 0 0 300px; max-width: 300px; }
.article-aside img { width: 100%; height: auto; display: block; }

/* Autores */
.author { margin-bottom: 24px; }
.author:last-child { margin-bottom: 0; }
.author-name { margin: 0; font-weight: 700; text-transform:lowercase; }
.author-desc { margin: 4px 0; font-weight: 400; }
.author-email { margin: 0; }
.author-email a { text-transform: none; }

/* Navegação anterior / próximo */
.post-nav { margin-top: 48px; padding-bottom: 24px; border-bottom: 1px solid #000; }
.post-nav-links { display: flex; justify-content: space-between; gap: 24px; }
.post-nav-titles { display: flex; justify-content: space-between; gap: 24px; margin-top: 8px; }
.post-nav-next { margin-left: auto; text-align: right; }
.post-nav-next-title { margin-left: auto; text-align: right; }
.post-nav-prev-title,
.post-nav-next-title { font-weight: 400; text-transform: none; }

.article-title {
  margin: 0 0 16px 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
 text-transform: lowercase;
}
/* Nome do autor: maior e em negrito (mais destaque) */
.article-author {
  margin: 0 0 24px 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.article-cover { margin: 0 0 24px 0; }

.article-content { font-weight: 400; }
.article-content p { margin: 0 0 1.2em 0; }
.article-content img { margin: 24px 0; }
.article-content h2,
.article-content h3 { margin: 1.6em 0 0.6em 0; font-weight: 700; }
.article-content blockquote { margin: 1.5em 0; font-style: italic; }
/* Links dentro do texto do artigo: mantêm negrito mas em caixa normal e sublinhados,
   para preservar a legibilidade da leitura corrida. */
.article-content a { text-transform: none; text-decoration: underline; }

/* Bio do autor */
.article-bio { margin-top: 48px; font-weight: 400; }
.article-bio .bio-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}
.article-bio p { margin: 0 0 1em 0; }

/* Compartilhamento */
.share {
  margin-top: 48px;
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.share-label { font-weight: 400; }
.share-feedback { font-weight: 400; text-transform: none; }
.share-feedback[hidden] { display: none; }

/* ============================================================
   RODAPÉ — logo+endereço à esquerda, menu+newsletter à direita
   ============================================================ */
.site-footer { margin-top: 120px; }
.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
  margin-bottom: 24px;
}
.footer-left,
.footer-right { display: flex; flex-direction: column; gap: 24px; }
.footer-right { align-items: flex-end; text-align: right; }

.footer-logo img, .footer-menu { height: 44px; width: auto; }
.footer-address {
  margin: 0;
  font-weight: 400;
  /*max-width: 280px;*/
  line-height: 1.5;
}
.footer-address a { text-transform: none; font-weight: 400; }

.footer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.newsletter, .footer-address { padding-top:24px; /*border-top: 1px solid #000;*/ }


.newsletter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.newsletter-label { font-weight: 400; }
.newsletter-row { display: flex; gap: 8px; align-items: stretch; }
.newsletter input[type="email"] {
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  padding: 3px;
  background: #f2f2f2;       /* fundo leve só para indicar o campo (não há borda) */
  color: #000;
  font: inherit;
  height: 36px;
  width: 220px;
  text-indent: 8px;          /* respiro do texto sem usar padding */
}
.newsletter-feedback { font-weight: 400; text-transform: none; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {

  /* No mobile a capa vai para cima do conteúdo */
  .article-layout { flex-direction: column; }
  .article-aside { order: -1; flex-basis: auto; }
}
@media (max-width: 600px) {
  .grid-5 { gap: 12px; }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner { flex-direction: column; }
  .footer-right { align-items: flex-start; text-align: left; }
  .footer-menu ul { justify-content: flex-start; }
  .newsletter { align-items: flex-start; }
  .newsletter input[type="email"] { width: 100%; }
  .newsletter-row { width: 100%; }
}

@media (max-width: 480px) {
  .post-nav-links,
  .post-nav-titles { flex-direction: column; gap: 4px; }
  .post-nav-next,
  .post-nav-next-title { margin-left: 0; text-align: left; }
}
/* Topo da edição: cabeçalho à esquerda, botão "voltar" à direita, na mesma linha */
.edition-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
/* O espaçamento agora é do wrapper; zera o das partes para alinhar pelo topo */
.edition-top-row .edition-header { margin-bottom: 0; }
.edition-top-row .content-top    { margin-bottom: 0; }

/* Mobile: empilha; botão acima do cabeçalho e alinhado à esquerda */
@media (max-width: 600px) {
  .edition-top-row { flex-direction: column; }
  .edition-top-row .content-top { justify-content: flex-start; order: -1; }
}
/* ---------- Topo: agrupar menu + lupa ---------- */
.header-right { display: flex; align-items: center; gap: 24px; }
.search-toggle { background: none; border: 0; padding: 0; display: inline-flex; align-items: center; color: #000; }
.search-toggle svg { display: block; }

/* ---------- Modal de busca (exceção proposital: cantos arredondados + fundo claro) ---------- */
.search-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.search-modal[hidden] { display: none; }
.search-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.search-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 36px 48px;
  width: calc(100% - 48px);
  max-width: 480px;
}
.search-modal-close {
  position: absolute; top: 6px; right: 12px;
  background: none; border: 0; padding: 0;
  font-size: 26px; line-height: 1; color: #000; text-transform: none;
}
.search-modal form { display: flex; gap: 8px; margin: 0; }
.search-modal-input {
  flex: 1; height: 42px; font: inherit;
  background: #fff; color: #000;
  border: 1px solid #ccc; border-radius: 8px; padding: 0 12px;
}
.search-modal-submit {
  height: 42px; padding: 0 18px; font: inherit; font-weight: 700; text-transform: uppercase;
}

/* ---------- Página de resultados ---------- */
.search-tools { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.search-count { font-weight: 400; }
.search-sort a { margin-left: 12px; }
.search-sort a.is-active { text-decoration: underline; }

.search-list { list-style: none; margin: 0; padding: 0; }
.search-block { font-weight: 700; text-transform: uppercase; margin: 24px 0 8px; }
.search-block:first-child { margin-top: 0; }
.search-item { margin-bottom: 24px; }
.search-item-type { margin-left: 8px; font-weight: 400; text-transform: uppercase; font-size: 0.8rem; }
.search-item-excerpt { margin: 4px 0 0; font-weight: 400; }
/* Toast de feedback da newsletter (cantos arredondados/cor: exceção proposital p/ clareza) */
.revista-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  z-index: 1100;
  max-width: calc(100% - 48px);
  padding: 14px 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.revista-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.revista-toast.is-success { background: #111; }     /* sucesso */
.revista-toast.is-error   { background: #b00020; }  /* erro */
nav.main-menu a, nav.footer-menu a {
    text-transform: lowercase;
}
.share a, .share button {
    text-transform: uppercase;
}
.post-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 3px;
  overflow: hidden;
  background: #f2f2f2;
}
.post-card:hover { text-decoration: none; }

.post-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}
.post-card-bg--empty {
  display: block;
}

.post-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.post-card-top { display: block; }
.post-card-title {
  display: block;
  color: #000000;
}
.post-card-author {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  text-transform: none;
  color: #000000;
}

.post-card-bottom { display: flex; justify-content: flex-start; }
.post-card-readmore {
  display: inline-block;
  color: #000000;
  font-size: 0.875rem;
  text-decoration: underline;
  text-transform:uppercase;
  font-weight: 500;
}

.post-card--no-img .post-card-overlay { background: none; }
.post-card--no-img .post-card-title,
.post-card--no-img .post-card-author,
.post-card--no-img .post-card-readmore {
  color: #000000;
}
.post-card-author { font-size: 14px; }


/* ============================================================
   EDIÇÃO: EDITORIAL + SUMÁRIO
   ============================================================ */
.edition-editorial, .edition-summary { margin: 0 0 40px; }
.edition-block-title {
  margin: 0 0 16px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.editorial-title { margin: 0 0 4px; font-size: 1.5rem; }
.editorial-author { margin: 0 0 8px; }
.editorial-excerpt { margin: 0; max-width: 70ch; }
.summary-group { margin: 0 0 20px; }
.summary-section { margin: 0 0 8px; font-size: 1rem; text-transform: uppercase; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { margin: 0 0 6px; }
.summary-author { margin-left: 8px; }
.article-authors,
.article-authors .author,
.article-authors .author-name,
.article-authors .author-desc {
  font-family: "Crimson Pro", serif !important;
	font-size: 20px;
}
/* Citação */
.article-content blockquote.wp-block-quote {
  position: relative;
  margin: 32px 0 32px 0;
  margin-left: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

/* Aspas grandes, na mesma cor do texto */
.article-content blockquote.wp-block-quote::before {
  content: "\201C";
  position: absolute;
  left: -56px;
  top: -0.15em;
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 700;
  font-style: normal;
}

/* Texto da citação */
.article-content blockquote.wp-block-quote p {
  margin: 0 0 4px;
  font-size: 1.25rem;
  line-height: 1.6;
  font-style: italic;
}

/* Autor: último parágrafo (quando há mais de um) ou o campo "Citação" do bloco */
.article-content blockquote.wp-block-quote p:last-child:not(:first-child),
.article-content blockquote.wp-block-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.4;
  font-style: italic;
}

.article-content blockquote.wp-block-quote p:last-child:not(:first-child)::before,
.article-content blockquote.wp-block-quote cite::before {
  content: "— ";
}

/* ============================================================
   MENU HAMBÚRGUER (cabeçalho e rodapé) + GAVETA DE TELA CHEIA
   O JS (theme.js) adiciona .is-collapsed quando os links não cabem em uma linha.
   ============================================================ */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: #000;
}
.menu-toggle svg { display: block; }
.menu-toggle:hover { text-decoration: none; }

/* Cabeçalho: [logo] ........ [lupa] [hambúrguer] */
.site-header.is-collapsed .main-menu { display: none; }
.site-header.is-collapsed .menu-toggle { display: inline-flex; }
.site-header.is-collapsed .container {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}
.site-header.is-collapsed .header-right { gap: 16px; }

/* Gaveta */
.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 24px;              /* respiro nos 4 cantos */
  background: #ffffff;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.4s;
}
.menu-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
}
.menu-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: #000;
}
.menu-drawer-close:hover { text-decoration: none; }
.menu-drawer-nav ul {
  list-style: none;
  margin: 32px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  text-align: right;
}
.menu-drawer-nav li {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.menu-drawer.is-open .menu-drawer-nav li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.12s + var(--i, 0) * 0.05s);
}
.menu-drawer-nav a { font-size: 1.5rem; text-transform: lowercase; }

/* ============================================================
   BUSCA: popup (desktop/tablet) e bottom sheet (mobile), com animação
   ============================================================ */
.search-modal-overlay { opacity: 0; transition: opacity 0.3s ease; }
.search-modal-box {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.search-modal.is-open .search-modal-overlay { opacity: 1; }
.search-modal.is-open .search-modal-box { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .search-modal { align-items: flex-end; }
  .search-modal-box {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 40px 24px calc(24px + env(safe-area-inset-bottom));
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .search-modal-box::before {          /* alça do bottom sheet */
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: #d0d0d0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-drawer, .menu-drawer.is-open,
  .menu-drawer-nav li,
  .search-modal-overlay, .search-modal-box { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}

/* ============================================================
   CABEÇALHO FIXO NO MOBILE (sombra sutil ao rolar a página)
   ============================================================ */
@media (max-width: 600px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
    transition: box-shadow 0.3s ease;
  }
  .site-header.is-scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .site-header .container { margin-top: 0; margin-bottom: 0; }
  .site-main { margin-top: 40px; }
}

/* ============================================================
   ARTIGO: título dos vizinhos clicável (sem estilo) + compartilhar com ícones no mobile
   ============================================================ */
.post-nav-title-link,
.post-nav-title-link:hover {
  color: inherit;
  font-weight: inherit;
  text-transform: inherit;
  text-decoration: none;
}

.share-link { display: inline-flex; align-items: center; }
.share-icon {
  display: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #000;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 600px) {
  .share { gap: 20px; align-items: center; }
  .share-text { display: none; }
  .share-icon { display: block; }
}

/* Mobile: cada título fica logo abaixo do seu link (anterior / próximo) */
@media (max-width: 480px) {
  .post-nav { display: flex; flex-direction: column; gap: 4px; }
  .post-nav-links,
  .post-nav-titles { display: contents; }
  .post-nav-prev { order: 1; }
  .post-nav-prev-title { order: 2; margin-bottom: 16px; }
  .post-nav-next { order: 3; }
  .post-nav-next-title { order: 4; }
  .post-nav-prev:empty,
  .post-nav-prev-title:empty,
  .post-nav-next:empty,
  .post-nav-next-title:empty { display: none; }
}

/* ============================================================
   RODAPÉ — logo + newsletter à esquerda; contato à direita (alinhado ao topo do logo).
   Mobile: logo, endereço e newsletter, um abaixo do outro. O menu do rodapé fica escondido.
   ============================================================ */
.site-footer .footer-menu { display: none; }
.site-footer .footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "logo    address"
    "news    address";
  column-gap: 48px;
  row-gap: 0;
  align-items: start;
}
.site-footer .footer-left,
.site-footer .footer-right { display: contents; }
.site-footer .footer-logo    { grid-area: logo; }
.site-footer .footer-address {
  grid-area: address;
  justify-self: end;
  text-align: right;
  padding-top: 0;          /* alinha o topo do contato com o topo do logo */
}
.site-footer .newsletter {
  grid-area: news;
  justify-self: start;
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 600px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "logo"
      "address"
      "news";
  }
  .site-footer .footer-address { justify-self: start; text-align: left; padding-top: 24px; }
  .site-footer .newsletter { justify-self: stretch; width: 100%; align-items: stretch; }
  .site-footer .newsletter-row { width: 100%; }
  .site-footer .newsletter input[type="email"] { flex: 1; width: auto; min-width: 0; }
}

/* ============================================================
   IMPRESSÃO / PDF (artigo)
   ============================================================ */
.print-only { display: none; }

@media print {
  @page { margin: 18mm; }

  .site-header,
  .site-footer,
  .share,
  .post-nav,
  .back-link,
  .article-aside,
  .menu-drawer,
  .search-modal,
  .revista-toast { display: none !important; }

  html, body { background: #fff; color: #000; }
  body { font-size: 12pt; line-height: 1.55; }
  .container { width: 100%; max-width: none; margin: 0; }
  .site-main { margin: 0; }

  .print-only { display: block; margin: 0 0 12pt; font-size: 9pt; font-weight: 400; color: #444; }
  .print-logo { margin: 0 0 16pt; }
  .print-logo img { display: block; width: auto; height: 14mm; max-width: none; border-radius: 0; }

  .article-layout { display: block; }
  .article-title { font-size: 20pt; text-transform: none; margin: 0 0 12pt; }
  .article-content { font-size: 12pt; }
  .article-content a { color: #000; text-decoration: none; }
  .article-content p { orphans: 3; widows: 3; }
  .article-content img { max-width: 100%; page-break-inside: avoid; }
  .article-content h2, .article-content h3 { page-break-after: avoid; }
  .article-content blockquote { page-break-inside: avoid; }
  .article-authors { margin-top: 18pt; page-break-inside: avoid; }
}
