/* Importa una tipografía serif agradable para lectura */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&display=swap');

/* Reset básico */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General */
body {
  background: #f6f5f3;
  color: #333;
  font-family: "Merriweather", Georgia, serif; 
  line-height: 1.8;
}

/* Encabezado principal */
header {
  text-align: center;
  background-color: #f0f0f0;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid #ddd;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

/* Ajuste del título en móviles */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }
}

/* Contenedor principal */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}


/* Contenedor del texto */
#capitulo {
  display: none; /* Se muestra solo cuando el usuario lo activa */
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  line-height: 1.9; /* Más espacio entre líneas */
  max-width: 800px; /* Para que no sea muy ancho */
  margin-left: auto;
  margin-right: auto;
}

/* Títulos dentro del capítulo */
#capitulo h2 {
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 1rem;
  margin-top: 2rem; /* Espacio extra arriba */
}

/* Texto dentro del capítulo */
#capitulo p {
  text-align: justify; /* Alineado normal, no en columnas */
  margin-bottom: 1.2rem;
  text-indent: 1.5em; /* Simula sangría en los párrafos */
  font-size: 1.1rem; /* Tamaño cómodo de lectura */
}

/* Resalta citas o partes importantes */
#capitulo blockquote {
  font-style: italic;
  color: #555;
  border-left: 4px solid #4b7bec;
  padding-left: 10px;
  margin: 1.5rem 0;
}

/* Enlaces dentro del texto */
#capitulo a {
  color: #4b7bec;
  text-decoration: underline;
}
#capitulo a:hover {
  text-decoration: none;
}

/* Ajustes responsive */
@media (max-width: 768px) {
  #capitulo {
    padding: 1rem; /* Menos padding en móviles */
  }
}

/* Separador */
hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #ddd;
}

/* Sección de suscripción */
section.subscribe {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f8f8f8;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-align: center;
}

section.subscribe h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

section.subscribe form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

section.subscribe input[type="email"] {
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 400px;
  font-family: "Merriweather", serif;
}

section.subscribe button {
  background-color: #f39c12;
  color: #000000;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
  width: 100%;
  max-width: 200px;
}

section.subscribe button:hover {
  background-color: #ff9d00;
}

/* Botón para mostrar/ocultar capítulo */
#btn-toggle {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 200px;
  text-align: center;
}
#btn-toggle:hover {
  background-color: #3f5588;
}

/* Ajuste de la imagen de portada */
.book-cover {
  max-width: 100%; /* No se desbordará del contenedor */
  height: auto; /* Mantiene la proporción */
  display: block;
  margin: 1rem auto; /* Centra la imagen */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Agrega una sombra para destacar */
  border-radius: 8px; /* Bordes redondeados */
}

/* Para pantallas grandes, limita el tamaño máximo */
@media (min-width: 1024px) {
  .book-cover {
    max-width: 90%; /* Reduce el tamaño en pantallas grandes */
  }
}

/* Contenedor para los botones */
.cta-container {
  display: flex;
  flex-direction: column; /* Apila los botones en columna */
  align-items: center; /* Centra los elementos */
  gap: 10px; /* Espacio entre botones */
  margin-top: 15px;
}

/* Asegurar que los botones ocupen el mismo ancho */
.cta-button {
  width: 100%;
  max-width: 250px;
  text-align: center;
  padding: 12px 20px;
}

/* Ajuste en móviles */
@media (max-width: 768px) {
  .cta-container {
      width: 100%;
  }
  .cta-button {
      width: 90%;
  }
}

/* Footer principal */
.site-footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  margin-top: 3rem;
  font-size: 1rem;
}

/* Contenedor flexible */
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

/* Secciones dentro del footer */
.footer-section {
  flex: 1;
  min-width: 300px;
  margin-bottom: 1.5rem;
  padding: 5px;
}

/* Estilo de títulos */
.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

/* Lista de donaciones */
.donation-list {
  list-style: none;
  padding: 0;
}

.donation-list li {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 5px;
  margin-bottom: 5px;
  word-wrap: break-word;
  font-size: 0.9rem;
}

/* Código en color destacado */
.donation-list code {
  color: #f39c12;
  font-weight: bold;
  font-size: 0.95rem;
}

/* Pie inferior */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #bdc3c7;
}


/* Enlaces */
a {
  color: #4b7bec;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

#backtotop-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  user-select: none;
  visibility: hidden;
  transition: 0.3s;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #4b7bec; /* Color de fondo del botón */
  border-radius: 50%; /* Hace que el botón sea circular */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); /* Sombra para mejor visibilidad */
}

.arrow-top {
  color: #fff; /* Color de la flecha */
  font-size: 1.8rem;
  pointer-events: none;
}

/* Efecto hover para mejor UX */
#backtotop-btn:hover {
  background-color: #3867d6;
  transform: scale(1.1);
}

/* Ajuste en móviles */
@media (max-width: 768px) {
  #backtotop-btn {
    width: 50px;
    height: 50px;
  }
  .arrow-top {
    font-size: 1.5rem;
  }
}

.slide-in-bottom {
    -webkit-animation: slide-in-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation: slide-in-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.slide-out-top {
    -webkit-animation: slide-out-top 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
    animation: slide-out-top 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

.scale-in-center {
    -webkit-animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.scale-out-center {
    -webkit-animation: scale-out-center 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
    animation: scale-out-center 0.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@-webkit-keyframes slide-in-bottom {
    0% {
        -webkit-transform: translateY(1000px);
        transform: translateY(1000px);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-in-bottom {
    0% {
        -webkit-transform: translateY(1000px);
        transform: translateY(1000px);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }
}

@-webkit-keyframes slide-out-top {
    0% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        -webkit-transform: translateY(-1000px);
        transform: translateY(-1000px);
        opacity: 0;
    }
}

@keyframes slide-out-top {
    0% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        -webkit-transform: translateY(-1000px);
        transform: translateY(-1000px);
        opacity: 0;
    }
}

@-webkit-keyframes scale-in-center {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scale-in-center {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}

@-webkit-keyframes scale-out-center {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(0);
        transform: scale(0);
        opacity: 1;
    }
}

@keyframes scale-out-center {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(0);
        transform: scale(0);
        opacity: 1;
    }
}


.promo-banner {
  background: linear-gradient(135deg, #ffcc00, #ff6600);
  color: white;
  text-align: center;
  padding: 40px 20px;
  margin-top: 40px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.promo-content h2 {
  font-size: 2em;
  margin-bottom: 10px;
}

.promo-content p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

.promo-button {
  background: white;
  color: #ff6600;
  padding: 12px 24px;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  transition: 0.3s;
}

.promo-button:hover {
  background: #ff6600;
  color: white;
}
