/*
Theme Name: Sobreviver em Prosa
Theme URI: https://sobreviveremprosa.com.br
Author: Paula Carine
Author URI: https://sobreviveremprosa.com.br
Description: Tema literário com estética de papel e aquarela, convertido do design Next.js original. Paleta papel/tinta, banner com curva côncava, polaroids com fita adesiva e tipografia serifada (Lora + Cormorant Garamond).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
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: sobreviver
*/

/* ===========================================================
   Variáveis — paleta literária papel/tinta (do tailwind.config)
   =========================================================== */
:root {
  --paper: #faf8f4;
  --ink: #2b2722;
  --muted: #6f675c;
  --line: #e7e1d6;
  --accent: #7a5c43;
  --nav-red: #7f343e;
  --footer-red: #691818;
  --font-body: "Lora", Georgia, serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --max-content: 44rem;
  --max-wide: 64rem;
  --max-prose: 38rem;
  color-scheme: light;
}

/* ===========================================================
   Reset leve
   =========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-main {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
}

/* Filete decorativo */
.rule {
  width: 3rem;
  height: 1px;
  background-color: var(--accent);
  border: 0;
  margin: 0;
}

.font-display {
  font-family: var(--font-display);
}

/* Wrappers de largura */
.wrap-content { max-width: var(--max-content); margin-inline: auto; padding-inline: 1.5rem; }
.wrap-wide    { max-width: var(--max-wide);    margin-inline: auto; padding-inline: 1.5rem; }
.wrap-prose   { max-width: var(--max-prose);   margin-inline: auto; }

/* ===========================================================
   Banner de topo (TopBanner) — arte aquarela + logo + curva
   =========================================================== */
.top-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
  background-color: var(--paper);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 1.5rem 140px;
  margin-bottom: -140px;
  text-align: center;
}

.top-banner__logo {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 500px;
}

/* Curva côncava na base do banner (cor do papel) */
.banner-curve {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
}

/* ===========================================================
   Header flutuante (glassmorphism) sobre o banner
   =========================================================== */
.site-header {
  position: absolute;
  inset-inline: 0;
  top: 1.5rem;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding-inline: 1.5rem;
}

.site-header__bar {
  display: flex;
  width: 100%;
  max-width: var(--max-content);
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.4);
  padding: 0.75rem 1.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__nav ul,
.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}

.site-header__nav ul {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nav-red);
}

.site-header__nav a { transition: opacity 0.2s; }
.site-header__nav a:hover { opacity: 0.7; }
.site-header__nav .current-menu-item > a,
.site-header__nav .current_page_item > a { text-decoration: underline; text-underline-offset: 4px; }

.site-header__search {
  flex-shrink: 0;
  color: var(--nav-red);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: opacity 0.2s;
}
.site-header__search:hover { opacity: 0.7; }
.site-header__search svg { width: 1.25rem; height: 1.25rem; }

/* Botão hambúrguer — escondido no desktop */
.site-header__burger {
  display: none;
  flex-shrink: 0;
  color: var(--nav-red);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: opacity 0.2s;
}
.site-header__burger:hover { opacity: 0.7; }
.site-header__burger svg { width: 1.5rem; height: 1.5rem; }

/* ----- Mobile: esconde o menu inline e mostra o hambúrguer ----- */
@media (max-width: 768px) {
  .site-header__bar {
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
  }
  .site-header__nav { display: none; }
  .site-header__burger { display: block; }

  /* Empurra o conteúdo do topo para baixo do header flutuante no mobile */
  .top-banner { padding-top: 76px; padding-bottom: 20px; margin-bottom: 0; }
}

/* ===========================================================
   Drawer lateral (menu mobile)
   =========================================================== */
.drawer[hidden] { display: none; }
.drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
body.drawer-open { overflow: hidden; }

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 39, 34, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer.is-open .drawer__overlay { opacity: 1; }

.drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 80%;
  max-width: 20rem;
  background: var(--paper);
  box-shadow: 4px 0 30px rgba(43, 39, 34, 0.2);
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.drawer__title {
  font-size: 1.25rem;
  color: var(--ink);
}
.drawer__close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.drawer__close:hover { color: var(--accent); background: rgba(122, 92, 67, 0.08); }
.drawer__close svg { width: 1.2rem; height: 1.2rem; }

/* Menu vertical do drawer */
.drawer__nav ul,
.drawer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.drawer__nav li { margin: 0; }
.drawer__nav a {
  display: block;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nav-red);
  transition: color 0.2s;
}
.drawer__nav a:hover { color: var(--accent); }
.drawer__nav .current-menu-item > a,
.drawer__nav .current_page_item > a { text-decoration: underline; text-underline-offset: 4px; }

/* Botão de busca dentro do drawer */
.drawer__search-trigger {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: #fff;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.drawer__search-trigger:hover { border-color: var(--accent); color: var(--accent); }
.drawer__search-trigger svg { width: 1.1rem; height: 1.1rem; }

/* Redes sociais no rodapé do drawer */
.drawer__social {
  margin-top: auto;
  padding-top: 1.5rem;
}
.drawer__social .social-links { justify-content: flex-start; }

/* ===========================================================
   Home / Archive — grid de posts + sidebar autora
   =========================================================== */
.home-grid {
  display: grid;
  gap: 3.5rem;
  padding: 86px 1.5rem 3.5rem;
}

/* Mobile: padding padrão das áreas de conteúdo de TODAS as páginas */
@media (max-width: 639px) {
  .home-grid,
  .page-article,
  .single-article { padding: 2.5rem 1.25rem; }
}

@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr 15rem;
    gap: 4rem;
  }
}

.posts-column { min-width: 0; }

@media (min-width: 1024px) {
  .posts-column {
    border-right: 1px solid var(--line);
    padding-right: 4rem;
  }
}

.posts-list { display: flex; flex-direction: column; }
.posts-list > .post-item { padding: 3rem 0; }
.posts-list > .post-item:first-child { padding-top: 0; }
.posts-list > .post-item:last-child { padding-bottom: 0; }
.posts-list > .post-item + .post-item { border-top: 1px solid var(--line); }

/* ===========================================================
   PostCard — polaroid com fita + texto
   =========================================================== */
/* Mobile: empilha na ordem título → imagem → texto */
.post-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.post-card > .post-card__title { order: 1; }
.post-card > .polaroid         { order: 2; }
.post-card > .post-card__body  { order: 3; }

/* Mobile: título centralizado e imagem menor (70%) e centralizada */
@media (max-width: 639px) {
  .post-card > .post-card__title { text-align: center; }
  .post-card > .polaroid {
    width: 80%;
    margin-inline: auto;
  }
}

/* Desktop: grid com imagem à esquerda (2 linhas) e título+texto à direita */
@media (min-width: 640px) {
  .post-card {
    display: grid;
    grid-template-columns: 14rem 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 3rem;
    row-gap: 0.75rem;
    align-items: start;
  }
  .post-card > .polaroid {
    grid-column: 1;
    grid-row: 1 / span 2; /* imagem ocupa as duas linhas */
    width: 14rem;
  }
  .post-card > .post-card__title { grid-column: 2; grid-row: 1; }
  .post-card > .post-card__body  { grid-column: 2; grid-row: 2; }

  /* Sem imagem: título e corpo ocupam a largura toda */
  .post-card--no-thumb {
    grid-template-columns: 1fr;
  }
  .post-card--no-thumb > .post-card__title,
  .post-card--no-thumb > .post-card__body { grid-column: 1; }
}

.polaroid {
  position: relative;
}

/* Polaroid fantasma empilhada atrás */
.polaroid__ghost {
  position: absolute;
  inset: 0;
  transform: rotate(3deg);
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Polaroid principal */
.polaroid__frame {
  position: relative;
  display: block;
  transform: rotate(-2deg);
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.5rem 0.5rem 1.75rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
}
.polaroid__frame:hover { transform: rotate(0) scale(1.02); }

.polaroid__img { display: block; overflow: hidden; }
.polaroid__img img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }

.polaroid__tape {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  width: 5rem;
  transform: translateX(-50%) rotate(-6deg);
  opacity: 0.9;
}

/* Polaroid grande (single) */
.polaroid--large { max-width: 28rem; margin-inline: auto; width: 100%; }
.polaroid--large .polaroid__frame { padding: 0.75rem 0.75rem 3rem; box-shadow: 0 20px 25px rgba(0,0,0,0.15); }
.polaroid--large .polaroid__frame:hover { transform: rotate(-2deg) scale(1); }
.polaroid--large .polaroid__tape { top: -1.25rem; width: 8rem; }

/* Mobile: imagem de capa do post a 80% */
@media (max-width: 639px) {
  .polaroid--large { width: 80%; }
}

.post-card__body { min-width: 0; }

.post-card__title {
  font-family: var(--font-display);
  font-size: 33px;
  font-weight: 600;
  line-height: 32px;
  color: var(--ink);
  margin: 0;
}
.post-card__title a:hover { color: var(--accent); }

.post-card__excerpt { margin-top: 0.75rem; color: var(--ink); }

.post-card__meta {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.read-link {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.read-link:hover { text-decoration: underline; }

.post-card__date { font-size: 0.75rem; color: rgba(111, 103, 92, 0.7); }

/* ===========================================================
   AuthorCard (sidebar)
   =========================================================== */
.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 1024px) {
  .author-card-wrap { position: sticky; top: 2.5rem; align-self: flex-start; }
}

.author-card__ring {
  border-radius: 9999px;
  border: 1px solid rgba(122, 92, 67, 0.6);
  padding: 0.5rem;
}
.author-card__photo {
  aspect-ratio: 1 / 1;
  height: 11rem;
  width: 11rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.author-card__name {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}
.author-card__role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}
.author-card__bio { text-align: left; color: var(--ink); margin: 0; }
.author-card .rule { margin: 2rem 0; }

/* Social */
.social-links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.social-links a { color: var(--muted); transition: color 0.2s; display: block; }
.social-links a:hover { color: var(--accent); }
.social-links svg { width: 1.25rem; height: 1.25rem; }

/* ===========================================================
   Cabeçalhos de seção (archive/blog)
   =========================================================== */
.section-head {
  margin-bottom: 3.5rem;
  text-align: center;
}
.section-head .rule { margin: 0 auto 1.5rem; }
.section-head h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--ink);
  margin: 0;
}
.section-head p { margin-top: 0.75rem; color: var(--muted); }

/* ===========================================================
   Single — artigo
   =========================================================== */
.single-article { max-width: var(--max-content); margin-inline: auto; padding: 3.5rem 1.5rem; }

.single-header { margin-bottom: 2.5rem; text-align: center; }
.single-meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.single-title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
@media (min-width: 640px) { .single-title { font-size: 3rem; } }

.single-byline {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.single-byline img { height: 1.75rem; width: 1.75rem; border-radius: 9999px; border: 1px solid var(--line); object-fit: cover; }
.single-byline span { font-size: 0.875rem; font-style: italic; color: var(--muted); }

.single-figure {
  margin: 0 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.single-figcaption {
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.3);
  padding: 0.375rem 1rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Corpo do texto (prose) */
.post-body {
  max-width: var(--max-prose);
  margin-inline: auto;
  font-size: 1.175rem;
  line-height: 1.85;
  color: var(--ink);
}
.post-body p { margin: 1.25em 0; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-body h2, .post-body h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; }
.post-body h2 { font-size: 1.85rem; margin-top: 1.8em; }
.post-body h3 { font-size: 1.45rem; margin-top: 1.5em; }
.post-body blockquote {
  border-left: 2px solid rgba(122, 92, 67, 0.6);
  padding-left: 1rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.5em 0;
}
.post-body img { border-radius: 2px; margin: 1.5em auto; }
.post-body ul, .post-body ol { padding-left: 1.4em; }

/* ----- Tipografia do corpo otimizada para celular ----- */
@media (max-width: 639px) {

  .post-body {
    font-size: 1.0625rem;     /* ~17px: confortável em coluna estreita */
    line-height: 1.7;         /* mais compacto que no desktop (1.85) */
    letter-spacing: 0.01em;
    text-align: left;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
  .post-body p { margin: 1em 0; }
  .post-body p:first-child { margin-top: 0; }

  .post-body h2 { font-size: 1.5rem; margin-top: 1.5em; line-height: 1.25; }
  .post-body h3 { font-size: 1.25rem; margin-top: 1.3em; line-height: 1.3; }

  .post-body blockquote {
    padding-left: 0.85rem;
    margin: 1.25em 0;
    font-size: 1.0625rem;
  }
  .post-body ul, .post-body ol { padding-left: 1.2em; }
  .post-body li { margin: 0.35em 0; }

  /* Cabeçalho do post mais enxuto */
  .single-header { margin-bottom: 2rem; }
  .single-meta { font-size: 0.7rem; }
  .single-figure { margin-bottom: 2.5rem; }

  /* Recado da autora */
  .author-note { padding: 1.25rem 1.25rem; margin-top: 2.5rem; }
  .author-note__text { font-size: 1.05rem; line-height: 1.6; }
}

/* Recado da autora */
.author-note {
  max-width: var(--max-prose);
  margin: 3.5rem auto 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(122, 92, 67, 0.3);
  background: rgba(122, 92, 67, 0.05);
  padding: 1.5rem 1.75rem;
}
.author-note__label {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.author-note__body { display: flex; flex-direction: column; gap: 1.25rem; }
.author-note__text {
  margin: 0;
  border-left: 2px solid rgba(122, 92, 67, 0.6);
  padding-left: 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
}

/* Tags */
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  border-radius: 9999px;
  border: 1px solid var(--line);
  padding: 0.125rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.single-tags { max-width: var(--max-prose); margin: 3rem auto 0; }

.back-to-blog {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  text-align: center;
}
.back-to-blog a { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.back-to-blog a:hover { text-decoration: underline; }

/* ===========================================================
   Página estática
   =========================================================== */
.page-article { max-width: var(--max-content); margin-inline: auto; padding: 3.5rem 1.5rem; }
.page-article .section-head { margin-bottom: 2.5rem; }

/* ----- Página "Sobre" (layout fiel ao modelo) ----- */
.sobre-head { margin-bottom: 3rem; text-align: center; }
.sobre-head .rule { margin: 0 auto 1.5rem; }
.sobre-head h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--ink);
  margin: 0;
}
.sobre-subtitle {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
}

.sobre-intro {
  max-width: var(--max-prose);
  margin-inline: auto;
  text-align: center;
  font-size: 1.175rem;
  line-height: 1.85;
  color: var(--ink);
}
.sobre-intro p { margin: 1.25em 0; }

/* Mobile: mesma tipografia do corpo do blog (.post-body) */
@media (max-width: 639px) {
  .sobre-intro {
    font-size: 1.0625rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
  .sobre-intro p { margin: 1em 0; }
}

.sobre-more { margin-top: 2rem; text-align: center; }
.sobre-more a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.sobre-more a:hover { text-decoration: underline; }

/* Seção "E afinal, quem sou eu?" */
.sobre-author {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 4rem;
}
.sobre-author__title {
  margin: 0 0 3rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--ink);
}
.sobre-author__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 640px) {
  .sobre-author__row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }
}
.sobre-author__photo {
  width: 14rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  object-fit: cover;
}
.sobre-author__info { max-width: 24rem; text-align: center; }
@media (min-width: 640px) { .sobre-author__info { text-align: left; } }
.sobre-author__name { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: 0; }
.sobre-author__role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}
.sobre-author__bio { margin-top: 1rem; color: var(--ink); }
.sobre-author__info .social-links { margin-top: 1.25rem; justify-content: center; }
@media (min-width: 640px) { .sobre-author__info .social-links { justify-content: flex-start; } }

/* ----- Página "Contato" (layout fiel ao modelo) ----- */
.contato-head { margin-bottom: 3rem; text-align: center; }
.contato-head .rule { margin: 0 auto 1.5rem; }
.contato-head h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--ink);
  margin: 0;
}
.contato-subtitle {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
}
.contato-intro { margin-top: 1rem; color: var(--ink); }

/* Formulário de contato */
.contato-form { max-width: var(--max-prose); margin-inline: auto; }
.contato-form .field { margin-bottom: 1.25rem; }
.contato-form .field-row {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .contato-form .field-row { grid-template-columns: 1fr 1fr; }
}
.contato-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.contato-form input[type="text"],
.contato-form input[type="email"],
.contato-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s;
}
.contato-form textarea { padding: 0.75rem 1rem; resize: vertical; }
.contato-form input:focus,
.contato-form textarea:focus { outline: none; border-color: var(--accent); }
.contato-form .btn { padding-inline: 1.75rem; }

/* Seção final (chamada + redes) */
.contato-cta {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 4rem;
  text-align: center;
}
.contato-cta h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: 0; }
.contato-cta p { max-width: var(--max-prose); margin: 0.75rem auto 0; color: var(--ink); }
.contato-cta .social-links { margin-top: 2rem; justify-content: center; }

/* ===========================================================
   Paginação
   =========================================================== */
.pagination {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.pagination .page-numbers {
  border-radius: 9999px;
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* ===========================================================
   Comentários — fiel ao modelo (avatar + badge Autora + filete)
   =========================================================== */
.comments-area { max-width: var(--max-prose); margin: 4rem auto 0; }

.comments-area .comments-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

/* Lista de comentários */
.comment-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
/* Respostas: alinhadas ao texto do pai (após o avatar) e com filete à esquerda,
   como no modelo. O avatar tem 2.75rem + gap 1rem = 3.75rem de recuo. */
.comment-list .children {
  list-style: none;
  margin: 1.5rem 0 0 3.75rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .comment-list .children { padding-left: 2rem; }
}
/* Aninhamentos mais profundos não recuam de novo pela largura do avatar */
.comment-list .children .children { margin-left: 0; }

.comment-list li.comment { margin: 0; }

/* Corpo de um comentário: avatar + conteúdo lado a lado */
.comment-body {
  display: flex;
  gap: 1rem;
}

.comment-avatar {
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1px solid var(--line);
  object-fit: cover;
  overflow: hidden;
}
/* Placeholder "sem foto" com a inicial */
.comment-avatar--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(231, 225, 214, 0.4);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.comment-content { min-width: 0; flex: 1 1 auto; }

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}
.comment-author-name { font-weight: 600; color: var(--ink); font-style: normal; }

.comment-badge {
  border-radius: 9999px;
  background: rgba(122, 92, 67, 0.15);
  padding: 0.1rem 0.5rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  line-height: 1.6;
}

.comment-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(111, 103, 92, 0.7);
}

.comment-text { margin: 0.5rem 0 0; color: var(--ink); }
.comment-text p { margin: 0 0 0.5rem; }

.comment-reply { margin-top: 0.5rem; }
.comment-reply .comment-reply-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.comment-reply .comment-reply-link:hover { text-decoration: underline; }

.comment-awaiting-moderation {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--muted);
}

/* ----- Formulário de comentário ----- */
.comment-respond {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.comment-respond .comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.comment-respond .comment-reply-title small { font-weight: 400; }
.comment-notes,
.comment-form-cookies-consent label { font-size: 0.875rem; color: var(--muted); }
.comment-notes { margin: 0.25rem 0 1.5rem; }

/* Form como linha flexível: comentário (100%) + nome/e-mail (50/50) + extras */
.comment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.comment-form > p { margin: 0; }
.comment-form .comment-form-comment { flex: 1 1 100%; }
.comment-form .comment-form-author,
.comment-form .comment-form-email { flex: 1 1 100%; }
@media (min-width: 640px) {
  .comment-form .comment-form-author,
  .comment-form .comment-form-email { flex: 1 1 calc(50% - 0.5rem); }
}
.comment-form .comment-form-cookies-consent,
.comment-form .form-submit { flex: 1 1 100%; }

/* O modelo usa apenas placeholders — labels ficam ocultos visualmente */
.comment-form .comment-form-comment label,
.comment-form .comment-form-author label,
.comment-form .comment-form-email label,
.comment-form .comment-form-url label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s;
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form textarea { resize: vertical; }
.comment-form .form-submit { margin: 0; }

.comment-form .submit,
.search-form button,
button.btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 0.55rem 1.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ===========================================================
   Busca
   =========================================================== */
.search-form { display: flex; gap: 0.5rem; max-width: 30rem; margin: 0 auto; }
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-body);
  background: #fff;
}

/* ===========================================================
   Modal de busca
   =========================================================== */
.search-modal[hidden] { display: none; }
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
}
body.search-modal-open { overflow: hidden; }

.search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 39, 34, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: sv-fade 0.2s ease;
}

.search-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  margin-top: 12vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(43, 39, 34, 0.25);
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  animation: sv-pop 0.22s ease;
}

@keyframes sv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sv-pop {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.search-modal__close:hover { color: var(--accent); background: rgba(122, 92, 67, 0.08); }
.search-modal__close svg { width: 1.1rem; height: 1.1rem; }

.search-modal__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}

.search-modal__form {
  display: flex;
  gap: 0.5rem;
}
.search-modal__field {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s;
}
.search-modal__field:focus { outline: none; border-color: var(--accent); }
.search-modal__submit { flex-shrink: 0; }

.search-modal__hint {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(111, 103, 92, 0.7);
}

/* ===========================================================
   Rodapé — arte com livros + curva invertida
   =========================================================== */
.site-footer {
  position: relative;
  overflow-x: clip;
  background-color: var(--paper);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 0;
}

.footer-curve {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 220px;
}

/* Mobile: curvas côncavo/convexo do topo e rodapé menores */
@media (max-width: 639px) {
  .banner-curve,
  .footer-curve { height: 90px; }
}

.site-footer__inner {
  position: relative;
  z-index: 10;
  max-width: var(--max-content);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 18rem 1.5rem 2.5rem;
  text-align: center;
}

/* Mobile: menos espaço no topo do conteúdo do rodapé */
@media (max-width: 639px) {
  .site-footer__inner { padding: 200px 1.5rem 2.5rem; }
}

.footer-books {
  position: relative;
  width: 570px;
  max-width: 100%;
  margin-top: -210px;
  margin-bottom: 0.5rem;
}
.footer-books__badge {
  position: absolute;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--footer-red);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  margin-top: 257px;
}

.site-footer__name { font-family: var(--font-display); font-size: 1.125rem; color: var(--ink); margin: 0; }
.site-footer__tagline { font-size: 0.875rem; color: var(--ink); margin: 0; }
.site-footer__nav ul {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  justify-content: center;
}
.site-footer__nav a:hover { color: var(--accent); }
.site-footer__copy { margin-top: 0.5rem; font-size: 0.75rem; color: var(--ink); }
.site-footer__top { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }

/* Acessibilidade */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
