/* ===================================================
   Nina Kids Gospel — Folha de Estilo Principal
   =================================================== */

/* === VARIÁVEIS (tema claro) === */
:root {
  --primary: #7C3AED;
  --primary-dark: #5B21B6;
  --primary-light: #A78BFA;
  --secondary: #EC4899;
  --accent: #F59E0B;
  --bg: #FFFFFF;
  --bg-alt: #FAF7FF;
  --card-bg: #FFFFFF;
  --text: #1E1B4B;
  --text-muted: #6D5E8A;
  --border: #EDE9FE;
  --shadow: rgba(124,58,237,0.10);
  --radius: 16px;
  --transition: 0.28s ease;
}

/* === TEMA ESCURO === */
[data-theme="dark"] {
  --bg: #0F0720;
  --bg-alt: #1A0E35;
  --card-bg: #1E1040;
  --text: #EDE9FE;
  --text-muted: #A78BFA;
  --border: #2D1B69;
  --shadow: rgba(0,0,0,0.45);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* === BARRA DE PROGRESSO DE LEITURA === */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* === CABEÇALHO === */
.site-header {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 60%, #9333EA 100%);
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo img {
  height: 46px;
  width: auto;
  border-radius: 10px;
}
.logo-text {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.logo-text small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.82;
  letter-spacing: 0.02em;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-icon {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  transition: background var(--transition);
}
.btn-icon:hover { background: rgba(255,255,255,0.28); }
.nav-link {
  color: rgba(255,255,255,0.88);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  transition: background var(--transition);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: #fff; }

/* === HERO (página inicial) === */
.hero {
  background: linear-gradient(135deg, #7C3AED 0%, #EC4899 55%, #F59E0B 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.25rem 5rem;
  clip-path: ellipse(100% 88% at 50% 0%);
}
.hero-emoji { font-size: 3rem; margin-bottom: 0.75rem; }
.hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.9rem);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.hero p {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto;
}

/* === SEÇÃO DE HISTÓRIAS === */
.stories-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-top h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
}

/* === FILTROS DE CATEGORIA === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.42rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* === GRID DE CARDS === */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.story-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 22px var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 36px var(--shadow);
}
.story-card[data-hidden="true"] { display: none; }

.card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.story-card:hover .card-img img { transform: scale(1.06); }

.card-body {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge-cat {
  background: #EDE9FE;
  color: #5B21B6;
  border: 1px solid #DDD6FE;
}
.badge-age {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
[data-theme="dark"] .badge-cat { background: #2D1B69; color: #A78BFA; border-color: #3D2A80; }
[data-theme="dark"] .badge-age { background: #3B2A00; color: #FCD34D; border-color: #5A4200; }

.read-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); text-decoration: none; }
.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.1rem;
}
.card-link:hover { text-decoration: none; opacity: 0.8; }

/* === BANNER YOUTUBE === */
.yt-banner {
  background: linear-gradient(135deg, #CC0000 0%, #FF4444 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
}
.yt-banner h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 0.5rem; }
.yt-banner p { opacity: 0.9; max-width: 460px; margin: 0 auto 1.5rem; }
.btn-yt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #CC0000;
  font-weight: 900;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform var(--transition);
}
.btn-yt:hover { transform: scale(1.05); text-decoration: none; }

/* === RODAPÉ === */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.footer-brand .logo-text { color: var(--text); }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  max-width: 240px;
  line-height: 1.6;
}
.footer-links h3 {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ====================================================
   PÁGINAS DE ARTIGO (histórias)
   ==================================================== */

/* === HERO DO ARTIGO === */
.article-hero {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 60%, #9333EA 100%);
  padding: 2rem 1.25rem 3.5rem;
  color: #fff;
  text-align: center;
}
.breadcrumb {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.88); }
.breadcrumb span { opacity: 0.55; }
.article-hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  font-weight: 900;
  max-width: 720px;
  margin: 0 auto 1rem;
  line-height: 1.2;
}
.article-hero .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.badge-white {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}

/* === IMAGEM DE CAPA === */
.article-cover-wrap {
  max-width: 820px;
  margin: -2rem auto 0;
  padding: 0 1.25rem;
}
.article-cover-wrap img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 48px rgba(0,0,0,0.28);
}

/* === CONTEÚDO DO ARTIGO === */
.article-body {
  max-width: 740px;
  margin: 2.5rem auto 3rem;
  padding: 0 1.25rem;
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.35rem;
  color: var(--text);
}
.article-body p:first-of-type::first-letter {
  float: left;
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 0.72;
  padding-right: 0.08em;
  padding-top: 0.08em;
}

/* === CAIXA DE VERSÍCULO === */
.verse-box {
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.verse-box cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--primary);
}

/* === MORAL DA HISTÓRIA === */
.moral-box {
  background: linear-gradient(135deg, #EDE9FE 0%, #FCE7F3 100%);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
}
[data-theme="dark"] .moral-box {
  background: linear-gradient(135deg, #2D1B69 0%, #4A1040 100%);
}
.moral-box .moral-icon { font-size: 2.2rem; margin-bottom: 0.6rem; }
.moral-box .moral-title {
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.moral-box p {
  font-size: 1rem;
  font-style: italic;
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

/* === BOTÕES FLUTUANTES (FAB) === */
.fab-group {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  z-index: 300;
}
.fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 26px rgba(0,0,0,0.3); }
.fab-tts  { background: var(--primary); color: #fff; }
.fab-share{ background: var(--secondary); color: #fff; }
.fab-top  { background: var(--accent); color: #fff; }
.fab-label {
  position: absolute;
  right: 58px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.fab:hover .fab-label { opacity: 1; }

/* === HISTÓRIAS RELACIONADAS === */
.related-section {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}
.related-section h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* === PÁGINAS INSTITUCIONAIS === */
.page-hero {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 100%);
  padding: 2.5rem 1.25rem;
  color: #fff;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
}
.page-hero p { opacity: 0.85; margin-top: 0.5rem; font-size: 0.95rem; }

.page-content {
  max-width: 800px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
}
.page-content h2 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary);
  margin: 2rem 0 0.75rem;
}
.page-content p { margin-bottom: 1rem; font-size: 0.975rem; line-height: 1.75; }
.page-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.page-content li { margin-bottom: 0.4rem; font-size: 0.975rem; line-height: 1.7; }
.page-content a { color: var(--primary); }

/* === FORMULÁRIO DE CONTATO === */
.contact-form { max-width: 580px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.78rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.88rem 2.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* === 404 / UTILITÁRIOS === */
.text-center { text-align: center; }
.py-8 { padding: 4rem 1.25rem; }

/* === RESPONSIVO === */
@media (max-width: 640px) {
  .hero { clip-path: none; padding-bottom: 2.5rem; }
  .stories-grid { grid-template-columns: 1fr; }
  .fab { width: 46px; height: 46px; font-size: 1rem; }
  .fab-group { bottom: 1rem; right: 1rem; }
  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .nav-link { display: none; }
  .article-body p:first-of-type::first-letter { font-size: 3rem; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
}
