/* ===============================================
   El Espejo Bíblico — Blog
   Hoja de estilos compartida (índice + artículos)
   =============================================== */

:root {
  --bg-dark: #0a0705;
  --bg-card: #151210;
  --bg-elevated: #1a1614;
  --gold-primary: #D4AF37;
  --gold-light: #F9E596;
  --gold-dark: #997A15;
  --gold-cream: #F5ECD7;
  --gold-subtle: rgba(212, 175, 55, 0.06);
  --text-main: #E8E4DD;
  --text-muted: #888888;
  --border-glow: rgba(212, 175, 55, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  background: rgba(10, 7, 5, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--gold-cream);
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  font-style: italic;
}

.nav-links { display: flex; gap: 20px; align-items: center; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--gold-primary); }

/* ===== HERO DEL BLOG ===== */
.blog-hero {
  text-align: center;
  padding: 64px 24px 48px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.04) 0%, transparent 100%);
}

.blog-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  color: var(--gold-cream);
  margin-bottom: 12px;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== GRID DE ARTÍCULOS ===== */
.articles-container { max-width: 960px; margin: 0 auto; padding: 0 24px 80px; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-body { padding: 20px; }

.article-tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  background: var(--gold-subtle);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.article-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold-cream);
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta { font-size: 0.72rem; color: var(--gold-dark); }

/* ===============================================
   PÁGINA DE ARTÍCULO
   =============================================== */

.breadcrumb {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--gold-dark); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-primary); }

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 24px 72px;
}

.post-header { padding: 20px 0 28px; border-bottom: 1px solid rgba(212, 175, 55, 0.12); }

.post-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.25;
  color: var(--gold-cream);
  margin: 12px 0 14px;
}

.post-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
}

.post-meta {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--gold-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.post-meta .dot { opacity: 0.5; }

/* Video embebido */
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 32px 0 8px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}

/* Prosa */
.post-content { font-size: 1.02rem; line-height: 1.85; color: var(--text-main); }

.post-content p { margin: 20px 0; }

.post-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: var(--gold-cream);
  margin: 44px 0 14px;
  line-height: 1.35;
}

.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--gold-primary);
  margin: 32px 0 10px;
}

.post-content strong { color: var(--gold-light); font-weight: 600; }

.post-content em { color: var(--gold-cream); }

.post-content a { color: var(--gold-primary); text-decoration: underline; text-underline-offset: 3px; }

.post-content ul, .post-content ol { margin: 20px 0 20px 22px; }
.post-content li { margin-bottom: 10px; }

.post-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--gold-primary);
  background: var(--gold-subtle);
  border-radius: 0 12px 12px 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-cream);
  line-height: 1.6;
}

.post-content blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--gold-dark);
}

/* Caja de claves */
.key-box {
  margin: 36px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
}

.key-box h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--gold-primary);
  margin: 0 0 14px;
  letter-spacing: 0.5px;
}

.key-box ul { margin: 0 0 0 18px; }
.key-box li { font-size: 0.92rem; line-height: 1.7; margin-bottom: 10px; }

/* CTA */
.cta-box {
  margin: 44px 0 8px;
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
}

.cta-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }

/* Selector con .cta-box delante a propósito: `.post-content a` tiene más
   especificidad que `.cta-btn` a secas y le pisaba el color, dejando el texto
   dorado sobre fondo dorado. */
.cta-box .cta-btn {
  display: inline-block;
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #0a0705;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  text-shadow: none;
  border-radius: 30px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.cta-box .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212, 175, 55, 0.25); }

/* Compartir */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 32px 0 8px;
}

.share-row a {
  font-size: 0.75rem;
  color: var(--gold-dark);
  text-decoration: none;
  border: 1px solid var(--border-glow);
  padding: 7px 16px;
  border-radius: 20px;
  transition: color 0.3s, border-color 0.3s;
}

.share-row a:hover { color: var(--gold-primary); border-color: rgba(212, 175, 55, 0.45); }

/* Relacionados */
.related { max-width: 960px; margin: 0 auto; padding: 8px 24px 72px; }

.related > h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold-cream);
  text-align: center;
  margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--gold-dark); text-decoration: none; }
.site-footer a:hover { color: var(--gold-primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .blog-hero h1 { font-size: 1.6rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .nav-title { font-size: 0.95rem; }
  .post-header h1 { font-size: 1.5rem; }
  .post-content { font-size: 0.98rem; }
  .post-content h2 { font-size: 1.15rem; }
}

/* ===============================================================
   SUSCRIPCIÓN Y APOYO
   Ambos bloques nacen con el atributo [hidden] y solo los muestra
   configuracion.js cuando hay valores puestos.
   =============================================================== */

[hidden] { display: none !important; }

.newsletter-box {
  margin: 40px 0 8px;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  text-align: center;
}

.newsletter-box h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--gold-cream);
  margin: 0 0 10px;
}

.newsletter-box > p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0 auto 18px;
  max-width: 440px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1 1 240px;
  max-width: 320px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-dark);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  outline: none;
  transition: border-color 0.25s;
}

.newsletter-form input::placeholder { color: #5f5a54; }

.newsletter-form input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.newsletter-form button {
  padding: 12px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0a0705;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  border: 0;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.25);
}

.newsletter-legal {
  margin: 14px 0 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.newsletter-legal a { color: var(--gold-dark); }

/* ---- Botón de apoyo (pie de página) ---- */
.support-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 22px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-cream) !important;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.06);
  border-radius: 30px;
  text-decoration: none;
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.25s;
}

.support-btn:hover {
  color: #0a0705 !important;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  border-color: transparent;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .newsletter-form input { max-width: 100%; }
  .newsletter-form button { width: 100%; }
}
