/*
Theme Name: Acolher Blog
Theme URI: https://julianaarcanjo.com.br
Author: Juliana Arcanjo
Description: Tema do blog da Juliana Arcanjo, no mesmo visual do tema "Acolher" do site: creme, verde acolhedor e terracota, com Playfair Display e DM Sans.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 8.0
License: Uso exclusivo
Text Domain: acolher-blog
*/

:root {
  --terracotta: #a3412a;
  --terracotta-hover: #86331f;
  --green: #1d8247;
  --green-hover: #166a39;
  --coral: #e8c9b8;
  --sand: #ede2d6;
  --sage-light: #efe6dc;
  --paper: #f6efe7;
  --ink: #2b211c;
  --muted: #6c625b;
  --white: #fffdfa;
  --line: rgb(43 33 28 / 10%);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 60% 40% at 85% 0%, rgb(232 201 184 / 35%), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(163 65 42 / 40%);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.shell {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}

.shell-narrow {
  width: min(720px, calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--terracotta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.eyebrow a {
  text-decoration: none;
}

.eyebrow-light {
  color: #f6d7c9;
}

/* Botões e links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgb(29 130 71 / 22%);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  background: var(--green-hover);
  transform: translateY(-2px);
}

.button-small {
  min-height: 46px;
  padding-inline: 20px;
  white-space: nowrap;
}

.button-light {
  background: #fff;
  color: var(--green);
  box-shadow: none;
}

.button-light:hover {
  background: var(--paper);
}

.wa-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--terracotta);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

/* Cabeçalho */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px max(32px, calc((100% - 1320px) / 2));
  border-bottom: 1px solid rgb(43 33 28 / 6%);
  background: rgb(246 239 231 / 88%);
  backdrop-filter: blur(10px);
}

.admin-bar .site-header {
  top: 32px;
}

.brand {
  flex: 0 1 200px;
}

.brand img {
  width: 100%;
}

.site-nav .menu {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  font-size: 14px;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--terracotta);
}

.site-nav .current-menu-item > a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
}

/* Introdução das listagens */
.page-intro {
  position: relative;
  padding-block: 72px 44px;
}

.page-intro-home {
  padding-bottom: 52px;
}

.page-intro-home::after {
  position: absolute;
  z-index: -1;
  inset: auto -50vw -30px;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 200' preserveAspectRatio='none'%3E%3Cpath d='M0 140 C 220 80, 420 210, 640 150 S 1000 20, 1180 90 S 1360 40, 1400 10' fill='none' stroke='%23c98a75' stroke-width='1.2' opacity='.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  content: "";
  pointer-events: none;
}

.page-intro h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.page-lead {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
}

.search-form {
  display: flex;
  max-width: 460px;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 10px 30px rgb(43 33 28 / 6%);
}

.search-form input {
  min-width: 0;
  flex: 1;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.search-form input:focus {
  outline: none;
}

.search-form button {
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Cartões de artigos */
.post-list {
  padding-bottom: 96px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
}

.post-card-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.45;
  border-radius: 20px;
  background: var(--sand);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--coral), var(--sand));
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
  color: var(--terracotta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-card-title {
  margin-bottom: 10px;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.2;
}

.post-card-title a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 300ms ease;
}

.post-card:hover .post-card-title a {
  background-size: 100% 1px;
}

.post-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Artigo em destaque (primeiro da página inicial) */
.post-card-featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  margin-bottom: 64px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 24px 60px rgb(43 33 28 / 7%);
}

.post-card-featured .post-card-image {
  aspect-ratio: 1.35;
  border-radius: 18px;
}

.post-card-featured .post-card-body {
  padding: 12px 24px 12px 0;
}

.post-card-featured .post-meta {
  margin-top: 0;
}

.post-card-featured .post-card-title {
  font-size: clamp(28px, 3vw, 40px);
}

.post-card-featured .post-card-excerpt {
  margin-bottom: 24px;
  font-size: 16px;
}

/* Paginação */
.pagination {
  margin-top: 56px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  text-decoration: none;
}

.pagination .page-numbers.current {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #fff;
}

.empty-state {
  max-width: 520px;
  padding: 40px 0 20px;
}

.empty-state p {
  color: var(--muted);
}

/* Artigo */
.article-header {
  padding-block: 56px 36px;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--terracotta);
}

.article-title {
  margin-bottom: 26px;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.article-byline a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.byline-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
}

.article-cover {
  margin-block: 0 56px;
}

.article-cover img {
  width: 100%;
  max-height: 560px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 30px 60px rgb(43 33 28 / 10%);
}

.entry-content {
  font-size: 18px;
  line-height: 1.8;
}

.entry-content > * {
  margin-block: 0 1.3em;
}

.entry-content h2 {
  margin-top: 1.9em;
  margin-bottom: 0.6em;
  font-size: clamp(26px, 3vw, 32px);
}

.entry-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 24px;
}

.entry-content a {
  color: var(--terracotta);
  text-decoration-color: rgb(163 65 42 / 40%);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.entry-content a:hover {
  text-decoration-color: currentColor;
}

.entry-content strong {
  font-weight: 600;
}

.entry-content blockquote {
  margin-inline: 0;
  padding: 8px 0 8px 26px;
  border-left: 3px solid var(--terracotta);
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.55;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.3em;
}

.entry-content li + li {
  margin-top: 0.4em;
}

.entry-content li::marker {
  color: var(--terracotta);
}

.entry-content figure img,
.entry-content .wp-block-image img {
  border-radius: 18px;
}

.entry-content figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.entry-content hr {
  width: 80px;
  margin-block: 2.4em;
  border: 0;
  border-top: 1px solid var(--terracotta);
}

.entry-content .alignwide {
  width: min(1000px, calc(100vw - 40px));
  margin-inline: calc((min(1000px, calc(100vw - 40px)) - 100%) / -2);
}

.entry-content .alignfull {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.article-tags a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sand);
  font-size: 13px;
  text-decoration: none;
}

/* Caixa da autora */
.author-box {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 28px;
  margin-block: 24px 72px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 20px 50px rgb(43 33 28 / 6%);
}

.author-photo {
  width: 120px;
  height: 150px;
  border-radius: 999px 999px 10px 10px;
  object-fit: cover;
  object-position: 50% 20%;
}

.author-box .eyebrow {
  margin-bottom: 8px;
}

.author-box h2 {
  margin-bottom: 8px;
  font-size: 26px;
}

.author-box p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

/* Leia também */
.related {
  padding-block: 64px 96px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

/* Comentários */
.comments-wrap {
  margin-bottom: 64px;
}

.comments-title,
.comment-reply-title {
  font-size: 28px;
}

.comment-list {
  padding: 0;
  list-style: none;
}

.comment-body {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--white);
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgb(43 33 28 / 18%);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

/* Faixa de contato e rodapé */
.cta-band {
  padding-block: 64px;
  background: var(--green);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.site-footer {
  background: var(--ink);
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  align-items: center;
  gap: 28px;
  padding-block: 35px;
}

.footer-brand {
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.15;
  text-decoration: none;
}

.footer-brand span {
  margin-top: 5px;
  color: var(--coral);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-mantra {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

.footer-legal {
  color: rgb(255 255 255 / 75%);
  font-size: 11px;
  text-align: right;
}

.footer-legal p {
  margin: 0;
}

/* Formulário antes do WhatsApp (igual ao do site) */
.wa-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 80px rgb(0 0 0 / 25%);
}

.wa-dialog::backdrop {
  background: rgb(20 16 14 / 55%);
  backdrop-filter: blur(3px);
}

.wa-form {
  position: relative;
  padding: 34px 30px 26px;
}

.wa-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.wa-eyebrow {
  margin: 0 0 8px;
  color: var(--terracotta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wa-form h2 {
  margin-bottom: 10px;
  font-size: 30px;
}

.wa-intro {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.wa-field {
  margin-bottom: 14px;
}

.wa-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.wa-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgb(0 0 0 / 18%);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.wa-field input:focus {
  border-color: var(--terracotta);
  outline: none;
  box-shadow: 0 0 0 3px rgb(163 65 42 / 20%);
}

.wa-field input[aria-invalid="true"] {
  border-color: #b3261e;
}

.wa-error {
  margin: 5px 0 0;
  color: #b3261e;
  font-size: 12px;
}

.wa-error:empty {
  display: none;
}

.wa-submit {
  width: 100%;
  margin-top: 8px;
}

.wa-privacy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* Campo invisível contra robôs */
.wa-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Responsivo */
@media (max-width: 960px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-card-featured {
    grid-template-columns: 1fr;
  }

  .post-card-featured .post-card-body {
    padding: 4px 10px 14px;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 0;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 20px;
  }

  .shell {
    width: min(100% - 32px, 560px);
  }

  .site-header {
    position: relative;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }

  .brand {
    flex-basis: 180px;
  }

  .header-cta {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .site-nav .menu {
    justify-content: space-between;
    gap: 10px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .page-intro {
    padding-block: 44px 32px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card-featured {
    margin-bottom: 44px;
    padding: 12px;
    border-radius: 22px;
  }

  .article-header {
    padding-block: 32px 24px;
  }

  .back-link {
    margin-bottom: 24px;
  }

  .article-cover {
    width: min(100% - 32px, 560px);
    margin-bottom: 36px;
  }

  .article-cover img {
    border-radius: 20px;
  }

  .entry-content {
    font-size: 17px;
  }

  .author-box {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .author-photo {
    width: 96px;
    height: 120px;
  }

  .section-head {
    align-items: center;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-mantra,
  .footer-legal {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

.footer-legal a,
.wa-privacy a {
  color: inherit;
  text-underline-offset: 3px;
}
