/* ==========================================================================
   BLOG DE ALTA PERFORMANCE — CSS BASE & TEMA
   Zero frameworks, 100% responsivo, PageSpeed 100/100, acessível
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  /* Brand colors (default) */
  --brand-primary: #7c3aed;
  --brand-primary-hover: #6d28d9;
  --brand-pastel: #ede9fe;
  --brand-accent: #f59e0b;
  --text-brand: #2e1065;
  
  --cta-bg: #fffbeb;
  --cta-border: #f59e0b;
  --cta-text: #92400e;
  
  --resumo-bg: #f8fafc;
  --resumo-border: #cbd5e1;
  
  --container-max: 1320px;
  --content-max: 920px;
}

/* Tema Sinais do Destino (Lilás #DDC7E4 + Roxo Profundo #2E1065) */
body.theme-sinais_destino {
  --brand-primary: #7c3aed;
  --brand-primary-hover: #6d28d9;
  --brand-pastel: #DDC7E4;
  --brand-accent: #8b5cf6;
  --text-brand: #2e1065;
  --cta-bg: #fdfafd;
  --cta-border: #DDC7E4;
  --cta-text: #2e1065;
  --resumo-bg: #faf5fc;
  --resumo-border: #DDC7E4;
}

/* Tema Cultura de Mãe (Rosa Bebê #F1D3D6 + Framboesa/Vinho #881337 — Zero Vermelho) */
body.theme-cultura_mae {
  --brand-primary: #be185d;
  --brand-primary-hover: #9d174d;
  --brand-pastel: #F1D3D6;
  --brand-accent: #f43f5e;
  --text-brand: #881337;
  --cta-bg: #fff5f6;
  --cta-border: #F1D3D6;
  --cta-text: #881337;
  --resumo-bg: #fdf6f7;
  --resumo-border: #F1D3D6;
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-primary-hover);
  text-decoration: underline;
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.content-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navegação */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.98);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-brand, var(--text-main));
  letter-spacing: -0.02em;
}

.site-logo-img {
  height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo span {
  color: var(--brand-primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
  text-decoration: none;
}

/* Categorias Bar */
.category-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.category-bar ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.85rem;
  align-items: center;
}

.category-tag {
  display: inline-block;
  padding: 0.45rem 1.15rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.category-tag:hover, .category-tag.active {
  background: var(--brand-pastel);
  color: var(--text-brand, var(--brand-primary));
  border-color: var(--brand-primary);
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* Hero & Artigo Cabeçalho */
.article-header {
  padding: 3rem 0 2rem;
  text-align: left;
}

.article-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2.35rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .article-title {
    font-size: 1.85rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* YouTube Video Embed */
.video-embed-card {
  margin: 2.25rem 0;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Resumo do Vídeo (Bullet points) */
.resumo-box {
  background: var(--resumo-bg);
  border-left: 4px solid var(--brand-primary);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}

.resumo-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resumo-box ul {
  padding-left: 1.25rem;
}

.resumo-box li {
  margin-bottom: 0.5rem;
  color: #334155;
  line-height: 1.6;
}

/* Conteúdo Principal do Artigo */
.article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
}

.article-body p {
  margin: 1.5rem 0;
}

.article-body h2 {
  font-size: 1.75rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--text-main);
  margin: 3rem 0 1rem;
  letter-spacing: -0.02em;
}

.article-body h3 {
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
}

.article-body ul, .article-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.65rem;
}

.article-body blockquote {
  border-left: 4px solid var(--brand-primary);
  background: var(--bg-secondary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #475569;
}

.article-body strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Imagem Destacada no Artigo */
.featured-image-wrapper {
  margin: 2.5rem auto;
  text-align: center;
}

.featured-image-wrapper img {
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
  max-width: 580px;
}

.featured-image-wrapper figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* CTA Box de Alta Conversão */
.cta-box {
  background: var(--cta-bg);
  border: 2px solid var(--cta-border);
  border-radius: 14px;
  padding: 2rem;
  margin: 3.5rem 0;
  text-align: left;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.1);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "RECOMENDADO";
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  background: var(--brand-accent);
  color: #fff;
  border-radius: 4px;
}

.cta-box h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cta-text);
  margin-bottom: 0.75rem;
}

.cta-box p {
  color: #451a03;
  margin-bottom: 1.25rem;
  font-size: 1.025rem;
  line-height: 1.6;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--brand-accent);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
  transition: all 0.2s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35);
  text-decoration: none !important;
}

/* FAQ Accordion */
.faq-section {
  margin: 3.5rem 0;
}

.faq-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  background: var(--bg-primary);
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--brand-primary);
}

.faq-item summary {
  padding: 1.15rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand-primary);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-answer {
  padding: 0 1.35rem 1.25rem;
  color: #475569;
  line-height: 1.7;
}

/* Bloco Autor E-E-A-T */
.author-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem;
  margin: 3.5rem 0 2rem;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.author-updated {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.4rem !important;
}

/* Disclaimer Legal */
.disclaimer-box {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Grid de Artigos (Home e Categoria — 3 colunas x 4 fileiras = 12 posts) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
  margin: 2.5rem 0;
}

@media (max-width: 1080px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (max-width: 680px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.post-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.post-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f172a;
  overflow: hidden;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-primary);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.post-card-footer {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

/* Hero Post Destaque (Home) */
.hero-post-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  margin: 2rem 0 3rem;
  align-items: center;
}

@media (max-width: 840px) {
  .hero-post-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.hero-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f172a;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: 2rem 2.5rem 2rem 0;
}

@media (max-width: 840px) {
  .hero-content {
    padding: 1.75rem;
  }
}

.hero-title {
  font-size: 1.85rem;
  line-height: 1.3;
  font-weight: 800;
  margin: 0.75rem 0 1rem;
}

/* Footer do Site */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2.5rem;
  margin-top: 6rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Paginação Numérica Elegante */
.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3.5rem 0 2rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.page-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--bg-secondary);
  text-decoration: none;
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--brand-primary);
  color: #ffffff !important;
  border-color: var(--brand-primary);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}
