:root {
    --color-primary-1: #218880; /* Verde Azulado */
    --color-primary-2: #992847; /* Rojo Vino */
    --color-accent: #D2A557;    /* Dorado Suave */
    --color-light-gray: #F5F5F5;
    --color-dark-gray: #333333;
    --color-white: #FFFFFF;
}

/* Base & Typography */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    scroll-behavior: smooth;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-primary-2);
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.8em;
    color: var(--color-white);
}

h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--color-primary-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    background-color: var(--color-primary-1);
    color: var(--color-white);
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

.section-padding {
    padding: 80px 0;
}

.shadow-effect {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

/* Header & Navigation */
.header {
    background-color: var(--color-primary-1);
    color: var(--color-white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8em;
    color: var(--color-white);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--color-white);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--color-white);
}

/* Hero Section */
.hero {
    /* Asegúrate de que tu imagen 'portada_libro.png' esté en la misma carpeta que tu archivo 'style.css'
       o ajusta la ruta si está en una subcarpeta (ej: url('../images/portada_libro.png')) */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('portada_libro.png') no-repeat center center/cover;
    color: var(--color-white);
    text-align: center;
    padding: 150px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 20px;
    font-size: 3.5em;
    line-height: 1.1;
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 40px;
    font-weight: 400;
}

/* About Section */
.about-book {
    background-color: var(--color-light-gray);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    padding: 80px 20px;
}

.about-book .book-cover {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-book .book-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.about-book .book-cover img:hover {
    transform: translateY(-5px);
}

.about-book .content {
    flex: 2;
    min-width: 300px;
}

/* Author Section */
.author-section {
    background-color: var(--color-white);
    padding: 80px 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.author-section .author-photo {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.author-section .author-photo img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--color-primary-1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.author-section .content {
    flex: 2;
    min-width: 300px;
}

/* Benefits Section */
.benefits-section {
    background-color: var(--color-light-gray);
    padding: 80px 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-item {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.benefit-item i {
    font-size: 3em;
    color: var(--color-primary-1);
    margin-bottom: 15px;
}

.benefit-item h3 {
    font-size: 1.4em;
    color: var(--color-primary-2);
    margin-bottom: 10px;
}

/* ... (código CSS anterior) ... */

/* Testimonials Section */
.testimonials-section {
    background-color: var(--color-white);
    padding: 80px 0; /* Padding horizontal de 0 para que el carrusel ocupe todo el ancho */
}

/* Wrapper para el carrusel y sus controles */
.testimonial-carousel-wrapper {
    position: relative;
    max-width: 1200px; /* Igual que el .container */
    margin: 40px auto 0; /* Centra y añade margen superior */
    padding: 0 50px; /* Espacio para las flechas */
    overflow: hidden; /* Oculta el overflow si las flechas están fuera */
}

.testimonial-grid {
    display: flex;
    overflow-x: scroll; /* Habilita el scroll horizontal */
    scroll-snap-type: x mandatory; /* Para un desplazamiento suave y que se detenga en cada testimonio */
    -webkit-overflow-scrolling: touch; /* Mejora el scrolling en iOS */
    gap: 30px; /* Espacio entre los testimonios */
    padding-bottom: 20px; /* Espacio para la barra de scroll si es visible */
    scrollbar-width: thin; /* Hace visible la barra de scroll en Firefox */
    /* *** CAMBIO AQUÍ: COLORES DE LA BARRA DE SCROLL A GRIS CLARO *** */
    scrollbar-color: var(--color-light-gray) var(--color-light-gray); 
}

.testimonial-grid::-webkit-scrollbar {
    height: 8px; /* Altura de la barra de scroll en Webkit */
}

.testimonial-grid::-webkit-scrollbar-track {
    background: var(--color-light-gray); /* Color de la pista de la barra de scroll a gris claro */
    border-radius: 10px;
}

.testimonial-grid::-webkit-scrollbar-thumb {
    background-color: var(--color-dark-gray); /* Color del "pulgar" de la barra de scroll a gris oscuro para contraste */
    border-radius: 10px;
    border: 2px solid var(--color-light-gray); /* Borde del mismo color que la pista */
}


.testimonial-item {
    background-color: var(--color-light-gray);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    flex: 0 0 350px; /* No encoge, no crece, ancho base de 350px */
    scroll-snap-align: start; /* Alinea el inicio de cada item con el punto de snap */
    box-sizing: border-box; /* Asegura que el padding se incluya en el ancho */
}

.testimonial-item::before {
    content: "\f10d"; /* Font Awesome quote-left icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2em;
    color: rgba(153, 40, 71, 0.1); /* Lighter version of primary-2 */
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--color-dark-gray);
    font-size: 1.1em;
}

.testimonial-item span {
    font-weight: 600;
    color: var(--color-primary-2);
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-primary-1);
    color: var(--color-white);
    border: none;
    padding: 15px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
    background-color: var(--color-accent);
    transform: translateY(-50%) scale(1.05);
}

.prev-arrow {
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.next-arrow {
    right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}



/* ... (resto del código CSS) ... */

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8em;
    }

    .hero p {
        font-size: 1.2em;
    }

    .about-book, .author-section {
        flex-direction: column;
        text-align: center;
    }

    .about-book .book-cover, .author-section .author-photo {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--color-primary-1);
        margin-top: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hamburger {
        display: block;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .section-padding {
        padding: 60px 0;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9em;
    }

    .buy-options {
        flex-direction: column;
        align-items: center;
    }

    .buy-option-item {
        max-width: 100%;
    }

    /* Responsive for Testimonials Section */
    .testimonial-carousel-wrapper {
        padding: 0 20px; /* Reduce el padding para las flechas en móviles */
    }

    .testimonial-item {
        flex: 0 0 calc(90% - 15px); /* Permite ver el siguiente testimonio parcialmente en móviles */
    }
    
    .carousel-arrow {
        display: none; /* Oculta las flechas en pantallas pequeñas para dar más espacio */
    }

    /* Responsive for Quote Section */
    .quote-section h2 {
        font-size: 1.6em;
    }
    .quote-section .quote-author {
        font-size: 0.9em;
    }

    /* MODIFICACIÓN CLAVE PARA LA IMAGEN DEL HERO */
    .hero {
        background-position: right center; /* Mueve la posición del fondo para mostrar el lado derecho */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.6em;
    }

    .hero p {
        font-size: 1em;
    }

    .footer .social-icons a {
        font-size: 1.5em;
        margin: 0 10px;
    }

    /* Responsive for Testimonials Section */
    .testimonial-item {
        flex: 0 0 calc(95% - 15px); /* Ajuste para móviles muy pequeños, manteniendo la visibilidad parcial */
    }

    /* Responsive for Quote Section */
    .quote-section h2 {
        font-size: 1.3em;
    }
}

/* CTA Final Section */
.cta-final {
    background-color: var(--color-primary-2);
    color: var(--color-white);
    padding: 80px 20px;
    text-align: center;
}

.cta-final h2 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.cta-final h2::after {
    background-color: var(--color-accent);
}

.cta-final p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

/* Buy Section */
.buy-section {
    background-color: var(--color-white);
    padding: 80px 20px;
    text-align: center;
}

.buy-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.buy-option-item {
    background-color: var(--color-light-gray);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.buy-option-item h3 {
    color: var(--color-primary-1);
    font-size: 1.6em;
    margin-bottom: 20px;
}

.buy-option-item a {
    display: block;
    padding: 15px 25px;
    background-color: var(--color-primary-1);
    color: var(--color-white);
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.buy-option-item a:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Quote Section */
.quote-section {
    background-color: var(--color-primary-1); /* Fondo Verde Azulado para que resalte */
    color: var(--color-white); /* Texto principal en blanco para un alto contraste */
    text-align: center;
    padding: 50px 20px; /* Relleno reducido para una sección más delgada */
}

.quote-section h2 {
    color: var(--color-white); /* Color de texto blanco para la cita */
    font-size: 2.2em;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 15px;
    line-height: 1.4;
}

.quote-section h2::before,
.quote-section h2::after {
    content: '"'; /* Añadir comillas */
    font-size: 1.5em;
    vertical-align: middle;
    margin: 0 5px;
    color: var(--color-accent); /* Comillas en Dorado Suave para destacarlas */
}

.quote-section h2::after {
    display: none;
}

.quote-section .quote-author {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-accent); /* Autor en Dorado Suave para un toque distintivo */
    margin-top: 10px;
}

@media (max-width: 768px) {
    .quote-section h2 {
        font-size: 1.6em;
    }
    .quote-section .quote-author {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .quote-section h2 {
        font-size: 1.3em;
    }
}

/* Footer */
.footer {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9em;
}

.footer .social-icons {
    margin-top: 20px;
    margin-bottom: 30px;
}

.footer .social-icons a {
    color: var(--color-white);
    font-size: 1.8em;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer .social-icons a:hover {
    color: var(--color-accent);
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 24px;
    background-color: var(--color-primary-1);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#scrollTopBtn:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}