/*
Theme Name: Astra Child Base
Template: astra
Description: Personalização do tema Astra — tipografia, cores e componentes próprios do site.
Version: 1.0.0
Text Domain: astra-child
*/

:root {
  --site-accent: #1F5C4B;
  --site-accent-dark: #143E33;
  --site-font-display: "Fraunces", Georgia, serif;
  --site-font-body: "Inter", -apple-system, sans-serif;
}

body {
  font-family: var(--site-font-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title {
  font-family: var(--site-font-display);
  letter-spacing: -0.01em;
}

a { color: var(--site-accent-dark); }
a:hover { color: var(--site-accent); }

/* botões / CTAs do Astra usando a cor de marca do site */
.ast-button, button:not(.editora-faq-question), input[type="submit"], .wp-block-button__link {
  background-color: var(--site-accent-dark) !important;
  border-color: var(--site-accent-dark) !important;
  border-radius: 8px !important;
}
.ast-button:hover, button:not(.editora-faq-question):hover, input[type="submit"]:hover, .wp-block-button__link:hover {
  background-color: var(--site-accent) !important;
  border-color: var(--site-accent) !important;
}

/* =========================================================================
 * Componentes próprios de conteúdo (mantidos do design anterior, agora
 * como acréscimo sobre o Astra em vez de tema inteiro)
 * ========================================================================= */
.verdict-box {
  border: 1px solid #E2DFD6;
  border-radius: 14px;
  padding: 24px 26px;
  margin: 2em 0;
  background: #F5F3EE;
}
.verdict-box .verdict-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-accent-dark);
  display: block;
  margin-bottom: 8px;
}
.verdict-box .verdict-stars {
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--site-accent);
  margin-bottom: 10px;
  display: block;
}
.verdict-box .verdict-stars .off { color: #E2DFD6; }
.verdict-box p:last-child { margin-bottom: 0; }

.checklist-box {
  border: 1px solid #E2DFD6;
  border-left: 4px solid var(--site-accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 2em 0;
  background: #F5F3EE;
}
.checklist-box .checklist-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-accent-dark);
  display: block;
  margin-bottom: 10px;
}
.checklist-box ul { list-style: none; margin: 0; padding: 0; }
.checklist-box li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 15px;
}
.checklist-box li:last-child { margin-bottom: 0; }
.checklist-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--site-accent);
  font-weight: 700;
}

.callout {
  background: #F5F3EE;
  border: 1px solid #E2DFD6;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 1.8em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--site-accent-dark); }

/* newsletter (formulário próprio via AJAX, ver mu-plugin) */
.editora-newsletter-block {
  background: linear-gradient(135deg, var(--site-accent-dark), #1A1A1A);
  border-radius: 16px;
  padding: 40px;
  color: #fff;
}
.editora-newsletter-block h3 { color: #fff; font-family: var(--site-font-display); font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 6px; }
.editora-newsletter-block p { color: rgba(255,255,255,0.78); margin: 0 0 18px; font-size: 15px; }
.editora-newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 460px; }
.editora-newsletter-form input[type="email"] {
  flex: 1; min-width: 200px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; font-size: 15px;
}
.editora-newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.editora-newsletter-form button {
  background: #fff !important; color: var(--site-accent-dark) !important; border: none !important;
  border-radius: 8px !important; padding: 12px 22px !important; font-weight: 700; cursor: pointer;
}
.editora-newsletter-form button:hover { background: #F0EFEA !important; }
.editora-newsletter-msg { margin: 12px 0 0; font-size: 13.5px; color: rgba(255,255,255,0.85); opacity: 0; transition: opacity 0.2s ease; }
.editora-newsletter-msg.is-visible { opacity: 1; }
.editora-newsletter-msg.is-error { color: #FFB4A8; }

/* =========================================================================
 * Layout base (independente do Astra) — construído em PHP puro
 * ========================================================================= */
.editora-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.editora-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-accent-dark);
  background: color-mix(in srgb, var(--site-accent) 12%, white);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.editora-eyebrow-on-dark { background: rgba(255,255,255,0.16); color: #fff; }
.editora-eyebrow-on-dark a { color: inherit; text-decoration: none; }

.editora-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid #1A1A1A;
  padding-bottom: 10px;
  margin: 0 0 8px;
}
.editora-section-heading h2 { font-size: 24px; margin: 0; }

/* técnica de "sangria total" — quebra pra fora do container do Astra
   independente da largura configurada nele */
.editora-full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* hero da home */
.editora-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  background: #1A1A1A center/cover no-repeat;
  overflow: hidden;
  margin-top: -1px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.editora-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.55) 45%, rgba(10,10,10,0.25) 100%);
}
.editora-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
  color: #fff;
}
.editora-hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  max-width: 18ch;
  color: #fff;
  margin: 4px 0 14px;
  line-height: 1.15;
}
.editora-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.86);
  max-width: 56ch;
  margin: 0 0 24px;
}
.editora-hero-cta {
  display: inline-block;
  background: #fff;
  color: var(--site-accent-dark) !important;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
}
.editora-hero-cta:hover { background: #F0EFEA; }

/* faixa de estatísticas */
.editora-stats-band {
  background: #1A1A1A;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.editora-stats-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.editora-stat-item {
  text-align: center;
  padding: 32px 16px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.editora-stat-item:last-child { border-right: none; }
.editora-stat-n {
  display: block;
  font-family: var(--site-font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.editora-stat-label { display: block; margin-top: 8px; font-size: 13px; color: rgba(255,255,255,0.65); }
@media (max-width: 640px) {
  .editora-stats-grid { grid-template-columns: 1fr; }
  .editora-stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .editora-stat-item:last-child { border-bottom: none; }
}

/* vitrine de categorias */
.editora-category-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 8px;
}
@media (max-width: 900px) {
  .editora-category-showcase { grid-template-columns: repeat(2, 1fr); }
}
.editora-category-tile {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: #1A1A1A center/cover no-repeat;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 8px 20px rgba(0,0,0,0.08);
}
.editora-category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.75) 100%);
  transition: background 0.3s ease;
}
.editora-category-tile:hover::before { background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.85) 100%); }
.editora-category-tile-inner { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; color: #fff; }
.editora-category-tile-name { display: block; font-family: var(--site-font-display); font-weight: 700; font-size: 18px; line-height: 1.25; }
.editora-category-tile-count { display: block; font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 4px; }

/* grid de artigos */
.editora-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 24px 0 8px;
}
@media (max-width: 900px) { .editora-article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .editora-article-grid { grid-template-columns: 1fr; } }
.editora-article-card { display: flex; flex-direction: column; }
.editora-card-thumb {
  aspect-ratio: 16/10;
  background: #F5F3EE;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--site-accent-dark);
  font-family: var(--site-font-display);
  font-weight: 700; font-size: 15px; text-align: center; padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 6px 18px rgba(0,0,0,0.06);
}
.editora-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.editora-article-card:hover .editora-card-thumb img { transform: scale(1.045); }
.editora-card-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--site-accent-dark); margin-bottom: 6px; }
.editora-article-card h3 { font-size: 19px; margin: 0 0 6px; }
.editora-article-card h3 a { color: #1A1A1A; text-decoration: none; }
.editora-article-card h3 a:hover { color: var(--site-accent); }
.editora-card-excerpt { color: #5A5A5A; font-size: 15px; margin: 0; }
.editora-card-meta { font-size: 13px; color: #5A5A5A; margin-top: 10px; }

/* grid de recursos/diferenciais */
.editora-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 24px 0 8px; }
@media (max-width: 900px) { .editora-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .editora-feature-grid { grid-template-columns: 1fr; } }
.editora-feature-item {
  padding: 24px 20px; border: 1px solid #E2DFD6; border-radius: 12px; background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.editora-feature-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.07); }
.editora-feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: color-mix(in srgb, var(--site-accent) 14%, white); font-size: 21px; margin-bottom: 14px;
}
.editora-feature-item h3 { font-size: 16.5px; margin: 0 0 6px; }
.editora-feature-item p { font-size: 14px; color: #5A5A5A; margin: 0; line-height: 1.55; }

/* FAQ acordeão */
.editora-faq-list { max-width: 740px; margin: 24px 0 8px; border-top: 1px solid #E2DFD6; }
.editora-faq-item { border-bottom: 1px solid #E2DFD6; }
.editora-faq-question,
.editora-faq-question:focus,
.editora-faq-question:active,
.editora-faq-question:hover {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none !important; border: none !important; box-shadow: none !important; outline: none;
  text-align: left; padding: 20px 4px;
  font-family: var(--site-font-body); font-size: 16px; font-weight: 600; color: #1A1A1A !important; cursor: pointer;
}
.editora-faq-question:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; }
.editora-faq-icon { position: relative; flex-shrink: 0; width: 20px; height: 20px; }
.editora-faq-icon::before, .editora-faq-icon::after { content: ""; position: absolute; background: var(--site-accent-dark); border-radius: 2px; transition: transform 0.25s ease; }
.editora-faq-icon::before { top: 9px; left: 2px; width: 16px; height: 2px; }
.editora-faq-icon::after { top: 2px; left: 9px; width: 2px; height: 16px; }
.editora-faq-item.is-open .editora-faq-icon::after { transform: rotate(90deg); opacity: 0; }
.editora-faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.editora-faq-answer p { overflow: hidden; margin: 0; padding-right: 32px; color: #5A5A5A; font-size: 15px; line-height: 1.6; }
.editora-faq-item.is-open .editora-faq-answer { grid-template-rows: 1fr; }
.editora-faq-item.is-open .editora-faq-answer p { padding-bottom: 20px; }

.editora-newsletter-block.is-compact { padding: 22px; border-radius: 12px; }
.editora-newsletter-block.is-compact h3 { font-size: 17px; }
.editora-newsletter-block.is-compact p { font-size: 13.5px; margin-bottom: 14px; }
.editora-newsletter-block.is-compact .editora-newsletter-form { flex-direction: column; }
.editora-newsletter-block.is-compact .editora-newsletter-form button { width: 100%; }

/* =========================================================================
 * Artigo — banner + layout de duas colunas com sumário fixo
 * ========================================================================= */
.editora-page-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--site-accent-dark), #1A1A1A) center/cover no-repeat;
  margin-top: -1px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.editora-page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.72) 100%); }
.editora-page-hero .editora-container { position: relative; z-index: 1; padding: 40px 24px; }
.editora-page-hero h1 { color: #fff; margin: 0; font-size: clamp(26px, 3.4vw, 36px); }
.editora-breadcrumb { font-size: 13px; color: #5A5A5A; margin-bottom: 10px; }
.editora-page-hero .editora-breadcrumb { color: rgba(255,255,255,0.75); }
.editora-page-hero .editora-breadcrumb a { color: rgba(255,255,255,0.75); }
.editora-breadcrumb a { color: #5A5A5A; }

.editora-article-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 740px) 300px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 980px) {
  .editora-article-layout { grid-template-columns: 1fr; gap: 32px; }
  .editora-sidebar { order: 2; position: static !important; }
  .editora-toc-desktop-only { display: none; }
}
.editora-toc-mobile-only { display: none; }
@media (max-width: 980px) { .editora-toc-mobile-only { display: block; margin-bottom: 24px; } }

.editora-single { min-width: 0; }
.editora-single h1 { font-size: clamp(28px, 4vw, 38px); }

.editora-entry-meta { font-size: 14px; color: #5A5A5A; border-bottom: 1px solid #E2DFD6; padding-bottom: 20px; margin-bottom: 30px; }

.editora-entry-content h2 { font-size: 24px; margin-top: 1.6em; font-family: var(--site-font-display); }
.editora-entry-content h3 { font-size: 19px; margin-top: 1.4em; font-family: var(--site-font-display); }
.editora-entry-content p { margin: 0 0 1.3em; line-height: 1.7; }
.editora-entry-content ul, .editora-entry-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.editora-entry-content li { margin-bottom: 0.5em; }
.editora-entry-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 15px; }
.editora-entry-content table th, .editora-entry-content table td { border: 1px solid #E2DFD6; padding: 10px 12px; text-align: left; }
.editora-entry-content table th { background: #F5F3EE; }
.editora-entry-content figure { margin: 1.8em 0; }

.editora-tags-list { margin: 40px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.editora-tags-list a { font-size: 13px; background: #F5F3EE; border: 1px solid #E2DFD6; padding: 5px 12px; border-radius: 999px; text-decoration: none; color: #5A5A5A; }

.editora-author-box { display: flex; gap: 16px; align-items: flex-start; background: #F5F3EE; border-radius: 10px; padding: 20px; margin: 40px 0; }
.editora-author-box img { border-radius: 50%; width: 56px; height: 56px; }
.editora-author-box h4 { margin: 0 0 4px; font-size: 15px; }
.editora-author-box p { margin: 0; font-size: 14px; color: #5A5A5A; }

.editora-sidebar { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 20px; }
.editora-toc { background: #F5F3EE; border: 1px solid #E2DFD6; border-radius: 12px; padding: 18px 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
.editora-toc-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #5A5A5A; margin: 0 0 10px; }
.editora-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #E2DFD6; }
.editora-toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: 13.5px; line-height: 1.4; color: #5A5A5A; text-decoration: none; transition: color 0.15s ease, border-color 0.15s ease;
}
.editora-toc .editora-toc-level-3 a { padding-left: 26px; font-size: 13px; }
.editora-toc a:hover { color: #1A1A1A; }
.editora-toc a.is-active { color: var(--site-accent-dark); border-left-color: var(--site-accent); font-weight: 600; }

.editora-sidebar-card { background: #fff; border: 1px solid #E2DFD6; border-radius: 12px; padding: 18px 20px; }
.editora-sidebar-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #5A5A5A; margin: 0 0 12px; font-family: var(--site-font-body); font-weight: 700; }
.editora-sidebar-card ul { list-style: none; margin: 0; padding: 0; }
.editora-sidebar-card li { margin-bottom: 10px; }
.editora-sidebar-card li:last-child { margin-bottom: 0; }
.editora-sidebar-card a { font-size: 13.5px; color: #1A1A1A; text-decoration: none; line-height: 1.4; display: block; }
.editora-sidebar-card a:hover { color: var(--site-accent); }
