/* Importación de tipografías */
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Baskervville:ital@0;1&display=swap");

/* Variables de color */
:root {
    --first-color: hsl(72, 60%, 68%);
    --morado-color: #33126B;
    --color-brown: #a5643c;
}

/* Estilos generales */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Gordita', sans-serif;
    background-color: #f0f0f0;
}

a{
    text-decoration: none;
}

/* Estilos para el banner */
.hero-banner {
    position: relative;
    height: 100vh;
    background: url('media/banneranna.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 17%;
}

/* Oscurecimiento de la imagen de fondo */
.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Capa oscura */
    z-index: 1;
}

/* Estilos para el contenido del banner */
.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 45%;
}

/* Estilos para el título del libro */
.book-title {
    font-family: 'Baskervville', serif;
    font-size: 4.4em;
    font-weight: 700;
    margin: 0;
    color: white;
}

.book-subtitle {
    font-size: 1rem;
    color: white;
}

.book-subtitle2 {
    font-size: 1.3rem;
    color: var(--first-color);
}

/* Estilos para el enlace */
.book-link {
    font-size: 1.2em;
    font-weight: 500;
    margin-top: 20px;
    color: white;
    text-decoration: none;
    display: inline-block;
    background-color: var(--morado-color);
    padding: 15px 30px; /* Aumentado para más espacio */
    border-radius: 0; /* Cambiado a 0 para esquinas cuadradas */
    transition: background-color 0.3s;
}

.book-link:hover {
    background-color: var(--first-color);
    color: var(--morado-color);
}

/* Estilos para la imagen del libro */
.hero-image {
    position: relative;
    z-index: 2;
    margin-left: 15px; /* Reducido para acercar más la imagen al contenido */
}

/* Animación de salto */
@keyframes jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Aplicar animación a la imagen */
.hero-image img {
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    animation: jump 1s ease-in-out infinite; /* Duración de 1s, repetición infinita */
}

/* Estilos para la sección del prólogo del libro */
.book-prologue {
    padding: 30px; /* Espaciado interno */
    text-align: center;
    max-width: 1100px; /* Ancho máximo */
    margin: 50px auto; /* Centrado en la página */
    border-radius: 10px; /* Bordes redondeados */
}

.book-prologue h2 {
    font-family: 'Baskervville', serif; /* Tipografía del título */
    font-size: 3.5em;
    color: var(--morado-color); /* Color morado */
    margin-bottom: 15px;
    padding-bottom: 2rem;
}

.book-prologue p {
    font-size: 1.1em; /* Tamaño del texto del prólogo */
    color: #333; /* Color de texto */
    line-height: 1.6;
}
/* Estilos para el banner de compra */
.purchase-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 17%;
    background: url('media/banneranna1.png') no-repeat center center/cover; /* Imagen de fondo */
    color: #fff;
    position: relative;
    height: 60vh;
    overflow: hidden; /* Asegura que el pseudo-elemento no sobresalga */
}

/* Capa oscura sobre la imagen de fondo */
.purchase-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Oscurecimiento del fondo */
    z-index: 1;
}

.purchase-content {
    max-width: 45%;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

.purchase-content h2 {
    font-family: 'Baskervville', serif;
    font-size: 3em;
    margin: 0 0 15px;
}

.purchase-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 1rem;
}

/* Contenedor de los botones */
.button-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

/* Estilos para los botones */
.purchase-link {
    font-size: 1.2em;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background-color: var(--morado-color);
    padding: 15px 30px;
    border-radius: 2px;
    transition: background-color 0.3s;
}

.purchase-link:hover {
    background-color: var(--first-color);
    color: white;
}

/* Responsivo para dispositivos móviles */
@media (max-width: 600px) {
    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .purchase-link {
        width: 100%;
        max-width: 300px;
    }
}

.purchase-image {
    position: relative;
    z-index: 2;
}

.purchase-image img {
    max-width: 350px;
    height: auto;
    border-radius: 10px;
    animation: jump 1s ease-in-out infinite; /* Duración de 1s, repetición infinita */
}


/* Estilos CSS para la sección FAQ */
.faq-section {
    padding: 30px;
    max-width: 800px;
    margin: 50px auto;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.faq-section h2 {
    font-size: 2.5em;
    font-family: 'Baskervville', serif;
    color: var(--morado-color);
    text-align: center;
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.faq-question {
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    color: var(--morado-color);
    position: relative;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(200, 200, 200, 0.2);
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 10px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-answer {
    display: none;
    padding: 10px 0;
    font-size: 1em;
    color: #333;
    border-top: 1px solid #e0e0e0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    max-height: 0; /* Mantener colapsado */
    opacity: 0; /* Mantener invisibilidad inicial */
}

.faq-item.active .faq-answer {
    display: block;
    max-height: 500px; /* Altura suficiente para expandirse automáticamente */
    opacity: 1; /* Hacer visible la respuesta */
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Cambia el ícono al expandir */
.faq-item.active .faq-question::after {
    content: "-";
    transform: rotate(180deg);
}

/* Ajuste para dispositivos móviles */
@media (max-width: 600px) {
    .faq-section h2 {
        font-size: 2em;
    }

    .faq-question {
        font-size: 1em;
    }

    .faq-answer {
        font-size: 0.9em;
    }
}


/* Estilos para el botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s ease;
}

/* Tooltip para el mensaje */
.whatsapp-float .tooltip {
    position: absolute;
    right: 60px;
    padding: 8px 12px;
    background-color: #25D366;
    color: white;
    font-size: 14px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mostrar tooltip al hacer hover */
.whatsapp-float:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Efecto de agrandar el botón al hacer hover */
.whatsapp-float:hover {
    transform: scale(1.1);
}


.footer {
    background-color: var(--morado-color);
    color: white;
    padding: 20px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    margin-bottom: 10px;
}

.social-links a {
    color: white;
    margin: 0 10px;
    font-size: 1.5em;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--first-color);
}

.footer-info a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: .6s;
}

.footer-info a:hover {
    text-decoration: underline;
}

/* Responsividad */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
}



/* Responsividad para dispositivos móviles */
@media (max-width: 768px) {
    .hero-banner {
        flex-direction: column;
        height: auto;
        padding: 20px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .hero-image {
        margin-left: 0;
    }

    .hero-image img {
        max-width: 80%;
        margin: 0 auto;
    }

    .book-info {
        padding: 40px 20px;
    }

    .purchase-banner {
        flex-direction: column;
        height: auto; /* Ajusta la altura para que no se limite en pantallas pequeñas */
        text-align: center;
        padding: 20px; /* Reduce el relleno para teléfonos */
    }

    .purchase-content {
        max-width: 100%; /* Ancho completo en pantallas pequeñas */
        padding-right: 0;
        margin-bottom: 20px;
    }

    .purchase-image {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .purchase-image img {
        max-width: 80%;
        height: auto; /* Asegura que la imagen mantenga su proporción */
    }
}

@media (max-width: 480px) {
    .book-title {
        padding-top: 3rem;
        font-size: 3.5em;
    }

    .book-link {
        font-size: 1.2em;
        padding: 8px 16px;
    }

    .hero-image img {
        padding-bottom: 5rem;
    }

    .book-prologue h2 {
        font-size: 2.5em;
    }

    .purchase-banner {
        padding: 15px; /* Aún menos relleno en pantallas más pequeñas */
    }

    .purchase-content h2 {
        padding-top: 3rem;
        font-size: 2em; /* Reduce el tamaño del título para que no desborde */
    }

    .purchase-link {
        font-size: 1em;
        padding: 10px 20px; /* Ajusta el tamaño del botón para pantallas pequeñas */
    }
}
