/* =========================================
   1. VARIABLES & PALETA "SUNSET & MIDNIGHT"
   ========================================= */
:root {
    /* Colores Principales */
    --midnight: #1D3557;      /* Azul Profundo (Fondos oscuros) */
    --sunset: #E63946;        /* Rojo Vibrante (Acciones/CTA) */
    --sunset-hover: #D62828;
    --sky: #457B9D;           /* Azul medio (Detalles) */
    --sand: #F1FAEE;          /* Fondo Claro (Off-white) */
    --white: #FFFFFF;
    
    /* Texto */
    --text-dark: #1D3557;     /* Usamos el azul oscuro como negro */
    --text-light: #F1FAEE;    /* Texto para fondos oscuros */
    --text-gray: #6C757D;
    
    /* Configuración */
    --radius: 16px;
    --shadow-card: 0 20px 40px rgba(29, 53, 87, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-title: 'Playfair Display', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--sand);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   2. NAVEGACIÓN (Transparente a Solida)
   ========================================= */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 25px 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: all 0.4s ease;
}

.navbar.scrolled {
    background: var(--midnight); /* Barra oscura al bajar */
    padding: 15px 5%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.logo {
    font-family: var(--font-title); font-weight: 700; font-size: 1.6rem;
    color: var(--white); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.nav-links { display: flex; gap: 15px; }

.btn-nav {
    text-decoration: none; padding: 10px 25px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600; transition: 0.3s;
}
.btn-ghost { color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-demo { background: var(--sunset); color: var(--white); border: none; }
.btn-demo:hover { background: var(--sunset-hover); transform: translateY(-2px); }

/* =========================================
   3. HERO SLIDER (Imágenes y Mensajes)
   ========================================= */
.hero-slider {
    height: 100vh; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease-in-out;
}
.slide.active { opacity: 1; }

/* Overlay oscuro para que el texto resalte sobre la foto */
.slide::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(29, 53, 87, 0.4), rgba(29, 53, 87, 0.7));
}

.hero-content {
    position: relative; z-index: 10; text-align: center; color: var(--white);
    max-width: 900px; padding: 0 20px; margin-top: 60px;
}

/* --- MENSAJES QUE APARECEN (CHAT BUBBLES) --- */
.message-container {
    display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 30px;
    min-height: 120px; /* Espacio reservado */
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 12px 30px; border-radius: 30px;
    font-size: 1.1rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    opacity: 0; transform: translateY(30px) scale(0.9);
    /* Animación definida abajo */
}

/* Animación secuencial cuando el slide está activo */
.slide.active .chat-bubble:nth-child(1) { animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards; }
.slide.active .chat-bubble:nth-child(2) { animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.5s forwards; }

.hero-title {
    font-family: var(--font-title); font-size: 4rem; line-height: 1.1; margin-bottom: 25px;
    opacity: 0; animation: fadeInUp 0.8s ease-out 0.2s forwards;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hero-text {
    font-size: 1.3rem; margin-bottom: 40px; opacity: 0; animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.btn-main {
    padding: 20px 50px; background: var(--sunset); color: var(--white);
    text-decoration: none; border-radius: 50px; font-weight: 700; font-size: 1.1rem;
    box-shadow: 0 15px 30px rgba(230, 57, 70, 0.4);
    display: inline-block; transition: all 0.3s;
    opacity: 0; animation: fadeInUp 0.8s ease-out 0.8s forwards;
}
.btn-main:hover { background: var(--sunset-hover); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(230, 57, 70, 0.5); }

/* =========================================
   4. BLOQUE 1: QUÉ ES (Fondo Claro - Sand)
   ========================================= */
.section-light {
    padding: 100px 5%; background-color: var(--sand);
    text-align: center;
}
.section-title-dark { font-family: var(--font-title); font-size: 2.8rem; color: var(--midnight); margin-bottom: 20px; }
.section-desc { max-width: 700px; margin: 0 auto; font-size: 1.2rem; color: var(--text-gray); }

/* =========================================
   5. BLOQUE 2: BENEFICIOS (Fondo Oscuro - Midnight)
   ========================================= */
.section-dark {
    padding: 100px 5%; background-color: var(--midnight);
    color: var(--white);
}
.section-header-white { text-align: center; margin-bottom: 60px; }
.section-header-white h2 { font-family: var(--font-title); font-size: 2.8rem; color: var(--white); }
.section-header-white p { font-size: 1.1rem; opacity: 0.7; }

.benefits-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; max-width: 1200px; margin: 0 auto;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.05); /* Cristal Oscuro */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 30px; border-radius: var(--radius);
    text-align: center; transition: 0.4s;
}
.benefit-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-10px); }

.icon-box {
    width: 70px; height: 70px; margin: 0 auto 20px;
    background: var(--sunset); color: var(--white);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.8rem;
}
.benefit-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--white); }
.benefit-card p { font-size: 0.95rem; opacity: 0.7; }

/* =========================================
   6. BLOQUE 3: CÓMO FUNCIONA (Fondo Blanco Puro)
   ========================================= */
.section-white {
    padding: 100px 5%; background-color: var(--white);
}

.steps-container {
    display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 50px;
}

.step-card {
    flex: 1; min-width: 250px; max-width: 300px;
    background: var(--sand); padding: 30px; border-radius: var(--radius);
    text-align: center; border: 2px solid transparent; transition: 0.3s;
}
.step-card:hover { border-color: var(--sunset); transform: scale(1.03); }

.step-num {
    font-size: 4rem; font-weight: 900; color: rgba(29, 53, 87, 0.1);
    line-height: 1; margin-bottom: -20px; display: block;
}
.step-content h3 { color: var(--midnight); font-size: 1.3rem; margin-bottom: 10px; }
.step-content p { font-size: 0.95rem; color: var(--text-gray); }

/* =========================================
   7. BLOQUE 4: CTA FINAL (Fondo Vibrante - Sunset)
   ========================================= */
.section-cta {
    padding: 120px 5%; background-color: var(--sunset);
    text-align: center; color: var(--white);
    /* Patrón de fondo sutil */
    background-image: radial-gradient(rgba(255,255,255,0.2) 2px, transparent 2px);
    background-size: 30px 30px;
}

.cta-title { font-family: var(--font-title); font-size: 3.5rem; margin-bottom: 20px; }
.cta-desc { font-size: 1.4rem; margin-bottom: 40px; opacity: 0.9; }

.btn-white {
    padding: 20px 60px; background: var(--white); color: var(--sunset);
    border-radius: 50px; font-weight: 800; font-size: 1.2rem;
    text-decoration: none; display: inline-block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); transition: 0.3s;
}
.btn-white:hover { transform: translateY(-5px) scale(1.05); color: var(--midnight); }

/* =========================================
   8. FOOTER (Fondo Oscuro Total)
   ========================================= */
footer {
    background: #111; padding: 60px 5%; text-align: center; color: rgba(255,255,255,0.5);
}
footer h3 { color: var(--white); font-family: var(--font-title); font-size: 2rem; margin-bottom: 10px; }

/* ANIMACIONES */
@keyframes popIn { 
    from { opacity: 0; transform: translateY(30px) scale(0.9); } 
    to { opacity: 1; transform: translateY(0) scale(1); } 
}
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(40px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-title { font-size: 2.8rem; }
    .nav-links { display: none; } /* En producción necesitarías un menú hamburguesa */
    .steps-container { flex-direction: column; align-items: center; }
}