/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary-teal: #5D9C96;      /* Verde Zenroute */
    --secondary-slate: #6B7C93;   /* Azul Pizarra */
    --dark-charcoal: #2C3E50;     /* Texto Oscuro */
    --bg-cream: #F9F7F2;          /* Fondo Papel */
    --accent-gold: #D4A373;       /* Acento/Botones */
    --white: #ffffff;
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-cream);
    color: var(--dark-charcoal);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* En mobile, agregar espacio para el navbar fixed */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

h1, h2, h3, h4 {
    font-family: 'Merriweather', serif;
    color: var(--dark-charcoal);
}

a { text-decoration: none; }
ul { list-style: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. LÓGICA BILINGÜE (IDIOMAS)
   ========================================= */
/* Si el HTML es inglés, oculta español */
html[lang="en"] .lang-es { display: none !important; }
/* Si el HTML es español, oculta inglés */
html[lang="es"] .lang-en { display: none !important; }

/* =========================================
   3. COMPONENTES (BOTONES)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-teal);
    color: var(--white);
}
.btn-primary:hover { 
    background-color: #4a7f7a; 
    transform: translateY(-2px); 
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    margin-left: 10px;
}
.btn-secondary:hover { 
    background-color: var(--primary-teal); 
    color: var(--white); 
}

/* Logo de Amazon en botones */
.amazon-logo {
    height: 20px;
    width: auto;
    display: block;
    vertical-align: middle;
    margin: 0;
    line-height: 1;
}

.btn-text {
    display: inline;
    vertical-align: middle;
}

/* =========================================
   4. NAVEGACIÓN (LOGO ACTUALIZADO)
   ========================================= */
.navbar {
    background: var(--white);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* En mobile, cambia a fixed para que se pueda ocultar con scroll */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0.6rem 0;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .nav-container {
        gap: 8px;
    }
    .nav-left {
        gap: 8px;
    }
}

.logo { 
    display: flex; 
    align-items: center;
    flex-shrink: 0;
}

/* LOGO MENÚ: Más grande y limpio */
.logo-img { 
    height: 50px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo-img { height: 35px; }
    .lang-switch { padding: 4px 10px; font-size: 0.75rem; }
}

/* Ocultamos el texto escrito, el logo ya lleva letras */
.logo-text { display: none; }

/* Switch de Idioma */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 2px solid var(--primary-teal);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    background: var(--white);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: var(--secondary-slate);
    font-family: 'Lato', sans-serif;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: var(--primary-teal);
    color: var(--white);
}

.lang-btn.active { 
    background-color: var(--primary-teal);
    color: var(--white);
}

.divider { color: #ccc; font-size: 0.8rem; }

/* -- Lado Derecho del Menú -- */
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--secondary-slate); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-teal); }

.btn-nav {
    background: var(--accent-gold);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
}

/* =========================================
   5. HERO SECTION (ENCABEZADO)
   ========================================= */
.hero {
    padding: 80px 0;
    background: linear-gradient(to right, #F9F7F2 50%, #f0ebe4 50%);
}

.hero-content { 
    display: flex; 
    align-items: center; 
    gap: 50px; 
}

.hero-text { flex: 1; }

/* LOGO PROTAGONISTA EN HERO (NUEVO) */
.hero-brand-main {
    margin-bottom: 30px;
    animation: fadeIn 1.5s ease;
}

.hero-brand-main img {
    max-width: 280px; /* Tamaño grande */
    width: 100%;
    height: auto;
}

.tagline { 
    color: var(--primary-teal); 
    font-weight: bold; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    display: block;
    margin-bottom: 10px;
}

.hero-text h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.hero-text p { font-size: 1.15rem; margin-bottom: 30px; color: var(--secondary-slate); }

.hero-image { flex: 1; display: flex; justify-content: center; }
.book-mockup img { 
    max-width: 100%; 
    border-radius: 5px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); 
    transform: rotate(-3deg); 
    transition: transform 0.3s ease;
}
.book-mockup img:hover { transform: rotate(0deg); }

/* Animación de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   6. SECCIÓN PRODUCTO
   ========================================= */
.book-section { padding: 80px 0; background: var(--white); }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2.2rem; }

.book-details { display: flex; align-items: center; gap: 60px; }

.book-preview { flex: 1; }
.book-preview img { 
    width: 100%; 
    border-radius: 10px; 
    border: 1px solid #eee; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.book-info { flex: 1; }
.book-info h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--primary-teal); }
.features-list { margin-top: 20px; }
.features-list li { margin-bottom: 15px; font-size: 1.05rem; }

/* =========================================
   7. NEWSLETTER / REGALO
   ========================================= */
.newsletter-section { padding: 80px 0; background-color: var(--secondary-slate); color: var(--white); }
.newsletter-box { text-align: center; max-width: 700px; margin: 0 auto; }
.newsletter-text h2 { color: var(--white); margin-bottom: 15px; }
.newsletter-text p { margin-bottom: 30px; opacity: 0.95; font-size: 1.1rem; }

.signup-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.signup-form input {
    padding: 15px 20px;
    border-radius: 50px;
    border: none;
    width: 350px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
}
.signup-form input:focus { outline: 2px solid var(--accent-gold); }

/* =========================================
   8. CARRUSEL DE IMÁGENES
   ========================================= */
.carousel-section {
    padding: 60px 0;
    background-color: var(--white);
}

.carousel-section .section-title {
    text-align: center;
    margin-bottom: 50px;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.carousel-wrapper {
    width: 100%;
    max-width: 700px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    aspect-ratio: 4 / 3;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.carousel-slide.active img {
    transform: scale(1.08);
}

.carousel-btn {
    background-color: var(--primary-teal);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background-color: #4a7f7a;
    transform: scale(1.1);
}

.carousel-prev, .carousel-next {
    position: relative;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--primary-teal);
    width: 30px;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .carousel-container {
        gap: 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .carousel-wrapper {
        max-width: 100%;
    }
}

.btn-submit {
    background-color: var(--accent-gold);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-submit:hover { background-color: #c08e5f; }
.privacy-note { font-size: 0.8rem; margin-top: 15px; opacity: 0.7; }

/* =========================================
   8. FOOTER
   ========================================= */
footer { background: var(--dark-charcoal); color: white; padding: 50px 0 20px; }
.footer-content { display: flex; justify-content: space-between; margin-bottom: 30px; align-items: center; }
.footer-brand h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 5px; }
.footer-brand p { font-size: 0.9rem; opacity: 0.7; }

.footer-links a { color: #ccc; margin-left: 20px; font-size: 0.9rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary-teal); }

.copyright { text-align: center; font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; opacity: 0.6; }

/* =========================================
   9. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Menú simplificado */
    .nav-container { flex-direction: column; gap: 15px; }
    
    /* Ajuste tamaño logo en móvil */
    .logo-img { height: 50px; }
    
    .hero { background: var(--bg-cream); text-align: center; padding: 40px 0; }
    .hero-content { flex-direction: column-reverse; gap: 30px; }
    
    /* Ajuste logo héroe en móvil */
    .hero-brand-main img { max-width: 200px; margin: 0 auto; display: block; }
    
    .hero-text h1 { font-size: 2rem; }
    
    .book-details { flex-direction: column; gap: 30px; }
    
    .signup-form input { width: 100%; }
    .btn-secondary { margin: 10px 0 0 0; }
}