/* =========================================
   FUENTES
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Quicksand:wght@400;500&display=swap');

body {
  font-family: 'Quicksand', sans-serif;
}

/* =========================================
   BODY Y FONDO
========================================= */
body {
  margin: 0;
  line-height: 1.6;
  color: #CFCFCF; /* gris claro cálido */
  min-height: 100vh;
  position: relative;
  background-color: #0e0e0e; /* tono base oscuro */
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/img/fondo.webp') no-repeat center center;
  background-size: cover;
  filter: brightness(0.7);
  z-index: -1;
}

body.pagina-especial::before {
  background: url('../assets/img/fondo2.webp') no-repeat center center;
  background-size: cover;
  filter: brightness(0.7);
}

/* =========================================
   ENLACES GENERALES
========================================= */
a {
  color: #6E8CA0;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #D279B8; /* magenta suave */
}

/* =========================================
   CONTENEDOR PRINCIPAL
========================================= */
.contenedor {
  position: relative;
  z-index: 1;
  max-width: clamp(320px, 90vw, 800px);
  margin: 0 auto;
  padding: 1rem 1rem;
}

/* =========================================
   CABECERA
========================================= */
header {
  text-align: center;
  padding: 2rem 1rem;
  color: #C97CC9;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* ============================
   TÍTULO PRINCIPAL (h1 y p)
============================ */
.titulo-principal {
  text-align: center;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
  color: #C97CC9; /* tono violeta principal */
  text-shadow: 0 0 10px rgba(150, 60, 150, 0.3);
  max-width: 800px;
}

.titulo-principal h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  color: #C97CC9; /* violeta suave */
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
}

.titulo-principal p {
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  color: #A26D9B; /* rosa grisáceo tenue */
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  text-shadow: 0 0 6px rgba(150, 50, 150, 0.2);
}

/* =========================================
   LISTA DE CAPÍTULOS (INDEX)
========================================= */
.capitulos-lista {
  margin-top: 10px;
  display: grid;
  gap: 2rem;
}

.capitulo-item {
  background: rgba(30, 30, 30, 0.6);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 1s ease, box-shadow 0.3s ease;
}

.capitulo-item:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.capitulo-item img {
  width: 100%;
  display: block;
}

.capitulo-item h2 {
  text-align: center;
  margin: 0.8rem 0;
  color: #C97CC9;
}

/* =========================================
   SECCIONES DE CAPÍTULO
========================================= */
.capitulo section {
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  background: rgba(40, 40, 40, 0.4);
  backdrop-filter: blur(8px);
}

.capitulo section img {
  width: 100%;
  display: block;
}

.capitulo section p {
  color: #D6B8CF; /* gris rosado suave */
  margin: 0;
  padding: 1.2rem 1.4rem;
  line-height: 1.4;
  background-color: rgba(30, 30, 30, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
}

/* =========================================
   BOTÓN DE AUDIO
========================================= */
.audio-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  background: rgba(80,80,80,0.8);
  color: #FFF;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.6rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audio-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  background: rgba(130, 130, 130, 0.9);
}

/* =========================================
   BOTONES DE NAVEGACIÓN
========================================= */
.navegacion-capitulos {
  text-align: center;
  margin-top: 2rem;
}

.navegacion-capitulos a {
  display: inline-block;
  margin: 0 1rem;
  background: rgba(201,124,201,0.2);
  padding: 0.8rem 1.4rem;
  border-radius: 0.6rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  color: #CFCFCF;
  font-weight: 600;
  transition: transform 0.5s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.navegacion-capitulos a:hover {
  transform: scale(1.05);
  background: rgba(210,121,184,0.4);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* =========================================
   PIE DE PÁGINA
========================================= */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem 0;
  opacity: 0.8;
  color: #CFCFCF;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* =========================================
   FUNDIDO INICIAL Y TRANSICIONES
========================================= */
.fade-page {
  opacity: 1;
  transition: opacity 1s ease;
}

/* =========================================
   AJUSTES RESPONSIVOS
========================================= */
@media (max-width: 480px) {
  .audio-btn {
    font-size: 1.2rem;
    padding: 0.5rem;
  }
  
  .navegacion-capitulos a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* =========================================
   ANIMACIONES AOS
========================================= */
[data-aos] {
  position: relative;
  z-index: 1;
}
