/* ==========================================================================
   1. VARIABLES GLOBALES Y RESET (CON PROTECCIÓN ANTI-DESBORDAMIENTO)
   ========================================================================== */
:root {
    --azul-rey: #0041C2;
    --blanco-gris: #F2F2F2;
    --blanco: #FFFFFF;
    --negro: #1A1A1A;
    --fuente-montserrat: 'Montserrat', sans-serif;
    --fuente-industrial: 'Barlow Semi Condensed', sans-serif;
}

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

html, body {
    overflow-x: hidden; /* Elimina la línea blanca a la derecha */
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body { 
    font-family: 'Arial', sans-serif; 
    background-color: var(--blanco-gris); 
}

/* Evita que imágenes, mapas o widgets rompan el ancho en celulares */
img, iframe, video, .elfsight-app {
    max-width: 100% !important;
}

/* ==========================================================================
   2. HEADER Y MENÚ HAMBURGUESA
   ========================================================================== */
.main-header {
    background-color: var(--azul-rey);
    padding: 10px 5%;
    position: sticky;
    top: 0; 
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-col { flex: 1; display: flex; align-items: center; }
.logo-col { justify-content: flex-start; }
.menu-col { justify-content: center; flex: 2; }
.user-col { justify-content: flex-end; }

.logo-small { height: 40px; }

/* Menú en Escritorio */
.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 25px; 
}

.nav-links a { 
    color: var(--blanco); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 14px; 
    text-transform: uppercase; 
    transition: color 0.3s ease;
}

.nav-links a:hover { color: #A0C4FF; }

.user-icon i { color: var(--blanco); font-size: 24px; }

/* Botón 3 líneas (Oculto en PC) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--blanco);
    transition: all 0.3s ease;
}

/* Responsivo Header (Móvil) - CENTRADO PERFECTO DEL MENÚ */
@media (max-width: 768px) {
    .navbar {
        position: relative; /* Contexto para el centrado absoluto del botón */
    }

    .menu-toggle { 
        display: flex; 
        position: absolute; 
        left: 50%;
        transform: translateX(-50%); /* Clava el botón en el centro exacto */
    }
    
    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--azul-rey);
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    .nav-links.active { display: flex; }
    .nav-links li { margin: 15px 0; }
    
    /* Balancear las columnas para que el logo y el usuario queden en los bordes */
    .logo-col { flex: 1; }
    .user-col { flex: 1; justify-content: flex-end; }
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero { 
    height: 90vh; 
    position: relative; 
    background: #000; 
    overflow: hidden;
}

.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }

.hero-overlay { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    color: white; 
    text-align: center; 
    width: 90%; 
    max-width: 100vw;
    padding: 0 15px;
}

.hero-overlay h1 { 
    font-family: var(--fuente-montserrat);
    font-weight: 900; 
    font-size: 4.5rem; 
    text-transform: uppercase; 
    letter-spacing: 8px; 
    line-height: 1.1; 
    margin-bottom: 10px;
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to bottom, #ffffff, #f0f0f0); 
    -webkit-background-clip: text; 
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-overlay p { 
    font-family: var(--fuente-montserrat);
    font-weight: 400; 
    font-size: 1.2rem;
    text-transform: uppercase; 
    letter-spacing: 5px;
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-overlay p::after {
    content: ''; display: block; width: 60%; height: 3px;
    background-color: var(--azul-rey); margin: 15px auto 0;
    box-shadow: 0px 0px 10px var(--azul-rey);
}

@media (max-width: 768px) {
    .hero-overlay h1 { font-size: 2.2rem; letter-spacing: 3px; }
    .hero-overlay p { font-size: 0.85rem; letter-spacing: 2px; }
}

/* ==========================================================================
   4. SOBRE NOSOTROS (ESTILO INDUSTRIAL)
   ========================================================================== */
.intro-section { padding: 120px 10%; background-color: #F8FAFC; overflow: hidden; }

.container-flex {
    display: flex; align-items: stretch; gap: 0; max-width: 1300px;
    margin: 0 auto; background: white; border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.intro-text { flex: 1; padding: 60px; border-left: 10px solid var(--azul-rey); position: relative; }

.intro-text h2 {
    font-family: var(--fuente-industrial); font-weight: 900; color: var(--negro); 
    font-size: 3.2rem; line-height: 0.9; text-transform: uppercase; margin-bottom: 30px;
}

.intro-text h2 span {
    color: var(--azul-rey); display: block; font-size: 1.5rem; letter-spacing: 4px; margin-top: 5px;
}

.intro-text p {
    font-family: var(--fuente-industrial); font-size: 1.15rem; line-height: 1.7; color: #555; position: relative; z-index: 2;
}

.intro-carousel {
    flex: 1; position: relative; min-height: 500px; overflow: hidden;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

.slide-intro {
    position: absolute; width: 100%; height: 100%; object-fit: cover;
    filter: brightness(0.9) contrast(1.1); opacity: 0; transition: opacity 0.8s ease-in;
}

.slide-intro.active { opacity: 1; }

.intro-text::after {
    content: "EST. 2013"; font-family: var(--fuente-industrial); font-weight: 700; 
    font-size: 5rem; color: rgba(0, 65, 194, 0.04); position: absolute; bottom: -10px; left: 40px; z-index: 0;
}

@media (max-width: 992px) {
    .container-flex { flex-direction: column; }
    .intro-carousel { clip-path: none; min-height: 350px; }
    .intro-text { padding: 40px 25px; border-left: none; border-top: 10px solid var(--azul-rey); }
    .intro-text h2 { font-size: 2.5rem; }
}

/* ==========================================================================
   5. NUESTRAS LÍNEAS (3x2)
   ========================================================================== */
.specialties-section { padding: 80px 4%; background-color: var(--blanco-gris); }

.section-title {
    font-family: var(--fuente-montserrat); font-weight: 900; font-size: 2.8rem; 
    color: var(--azul-rey); text-align: center; text-transform: uppercase; margin-bottom: 60px;
}

.specialties-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px;
    max-width: 1400px; margin: 0 auto;
}

.spec-card {
    height: 300px; position: relative; border-radius: 12px; overflow: hidden; 
    background-color: #000; transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.spec-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); }

.spec-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.7s; }
.spec-card:hover img { transform: scale(1.08); }

.spec-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0, 65, 194, 0.9) 20%, transparent 100%);
    padding: 30px 25px 20px;
}

.spec-info h3 { color: white; font-family: var(--fuente-montserrat); font-size: 1.6rem; text-transform: uppercase; }

@media (max-width: 1024px) { .specialties-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .specialties-row { grid-template-columns: 1fr; } .section-title { font-size: 2rem; } }

/* ==========================================================================
   6. LANZAMIENTOS (CARRUSEL ACTUALIZADO CON EFECTOS)
   ========================================================================== */
.launches-section { padding: 80px 5%; background-color: var(--blanco); overflow: hidden; }

.launches-container { display: flex; align-items: center; gap: 40px; max-width: 1400px; margin: 0 auto; }

.launches-left { flex: 1.5; position: relative; min-width: 0; }

.launches-carousel { display: flex; align-items: center; gap: 15px; }

.launches-track-container { overflow: hidden; width: 100%; padding: 15px 0; }

.launches-track { display: flex; gap: 20px; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }

.launch-card {
    min-width: calc(50% - 10px); background: var(--blanco-gris); padding: 25px; 
    border-radius: 15px; text-align: center; text-decoration: none; color: var(--negro); 
    display: block; border-bottom: 5px solid var(--azul-rey); box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.launch-card:hover {
    transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0, 65, 194, 0.15); background-color: var(--blanco);
}

.launch-img-wrapper {
    height: 200px; margin-bottom: 20px; border-radius: 10px; background: white; 
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}

.launch-img-wrapper img {
    max-width: 85%; max-height: 85%; object-fit: contain; transition: transform 0.5s ease;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.launch-card:hover .launch-img-wrapper img { transform: scale(1.1); }

.launch-card h3 {
    color: var(--azul-rey); font-family: var(--fuente-montserrat); font-size: 1.25rem; 
    font-weight: 800; margin-bottom: 10px; text-transform: uppercase;
}

.launch-card p { font-size: 0.95rem; color: #555; line-height: 1.4; }

.carousel-control {
    background-color: var(--azul-rey); color: white; border: none; width: 45px; height: 45px; 
    border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; 
    justify-content: center; transition: all 0.3s ease; flex-shrink: 0; z-index: 10; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-control:hover { background-color: var(--negro); transform: scale(1.1); }

.launches-right { flex: 1; height: 500px; }

.impact-image-wrapper {
    width: 100%; height: 100%; position: relative; border-radius: 20px; 
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.impact-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.impact-image-wrapper:hover img { transform: scale(1.05); }

.image-tag {
    position: absolute; bottom: 30px; right: 30px; background: var(--azul-rey); color: white; 
    padding: 10px 20px; font-size: 0.85rem; font-weight: 900; text-transform: uppercase; 
    border-radius: 5px; letter-spacing: 1.5px; box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

@media (max-width: 1024px) {
    .launches-container { flex-direction: column-reverse; gap: 40px; }
    .launches-right { width: 100%; height: 350px; }
    .launches-left { width: 100%; }
}

@media (max-width: 768px) {
    .launch-card { min-width: 100%; }
    .impact-image-wrapper { border-radius: 15px; }
}

@media (max-width: 480px) {
    .carousel-control { width: 38px; height: 38px; font-size: 1rem; }
    .launches-carousel { gap: 8px; }
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer { background-color: var(--azul-rey); color: white; padding: 80px 8% 30px; font-family: var(--fuente-montserrat); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; max-width: 1300px; margin: 0 auto; }

.main-footer h3 { font-size: 1.4rem; font-weight: 700; text-transform: uppercase; margin-bottom: 25px; position: relative; }
.main-footer h3::after { content: ''; display: block; width: 40px; height: 3px; background-color: white; margin-top: 8px; }

.f-info p { margin-bottom: 15px; font-size: 0.95rem; display: flex; align-items: center; gap: 12px; }

.instagram-btn-perfil {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #FFFFFF;
    text-decoration: none; font-weight: 600; padding: 10px 20px; border: 2px solid #FFFFFF; 
    border-radius: 50px; transition: 0.3s; margin-bottom: 20px;
}

.instagram-btn-perfil:hover { background-color: #FFFFFF; color: var(--azul-rey) !important; transform: translateY(-3px); }

.instagram-widget-container { width: 100%; min-height: 200px; overflow: hidden; border-radius: 12px; }
.map-container { border-radius: 12px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.1); }
.footer-copy { text-align: center; margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; opacity: 0.7; }

@media (max-width: 768px) {
    .main-footer { padding: 60px 5% 20px; text-align: center; }
    .f-info p { justify-content: center; }
    .main-footer h3::after { margin: 8px auto; }
    .f-social { display: flex; flex-direction: column; align-items: center; }
    .instagram-btn-perfil { width: 100%; max-width: 280px; }
}

/* ==========================================================================
   8. WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: var(--azul-rey); color: #FFFFFF;
    width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 35px; z-index: 9999; text-decoration: none; animation: pulse-blue 2s infinite; transition: 0.3s;
}

.whatsapp-float:hover { background-color: #FFFFFF; color: var(--azul-rey); transform: scale(1.1); animation: none; }

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 65, 194, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 65, 194, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 65, 194, 0); }
}

@media (max-width: 768px) {
    .whatsapp-float { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 30px; }
}
.link-politicas {
    color: #A0C4FF; /* O un gris claro si prefieres */
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 5px;
}

.link-politicas:hover {
    color: var(--blanco);
    text-decoration: underline;
}
.oculto {
    display: none !important;
}
/* ==========================================================================
   DISEÑO DE MODAL PROMOCIONAL (FLYERS) - AUTOLACK
   ========================================================================== */

/* 1. FONDO OSCURO (OVERLAY) */
.modal-overlay {
    display: none; /* Se activa con JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Negro profundo transparente */
    z-index: 10000; /* Por encima de todo el sitio */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Efecto de desenfoque al fondo */
}

/* 2. CONTENEDOR DEL FLYER */
.modal-content {
    position: relative;
    max-width: 850px; /* Aumentado de 500px a 850px para mayor impacto */
    width: 95%;
    background-color: var(--blanco);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    animation: modalEntrada 0.5s ease;
}

/* 3. SLIDER Y FLYERS */
.modal-slider {
    position: relative;
    width: 100%;
    line-height: 0; /* Quita espacios raros debajo de la imagen */
}

.slide-flyer {
    display: none; /* Ocultos por defecto */
}

.slide-flyer.active {
    display: block;
    animation: fadeFlyer 0.6s ease;
}

.slide-flyer img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.slide-flyer:hover img {
    transform: scale(1.02); /* Pequeño zoom al pasar el mouse */
}
.hidden-slide {
    display: none !important;
}

/* 4. BOTÓN CERRAR (X) */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    color: var(--blanco);
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--azul-rey);
}

/* 5. NAVEGACIÓN (FLECHAS) */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 65, 194, 0.6); /* Azul Autolack transparente */
    color: var(--blanco);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-nav:hover {
    background-color: var(--azul-rey);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev { left: 10px; }
.modal-nav.next { right: 10px; }

/* 6. PUNTITOS (DOTS) */
/* Puntitos flotantes y sin fondo */
.modal-dots {
    position: absolute;
    bottom: 20px; /* Distancia desde el borde inferior del flyer */
    left: 50%;
    transform: translateX(-50%); /* Lo centra perfectamente */
    background: transparent; /* Quitamos el color de fondo */
    padding: 0;
    z-index: 15; /* Para que quede por encima de la imagen */
}

/* Opcional: Dale una sombra a los puntos para que se vean si la imagen es clara */
.dot {
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5); /* Blanco semi-transparente */
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.5); /* Sombrita para que resalten */
}

.dot.active {
    background-color: var(--azul-rey); /* Tu azul Autolack */
    transform: scale(1.3);
}

/* 7. ANIMACIONES */
@keyframes modalEntrada {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeFlyer {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* 8. AJUSTE PARA MÓVILES */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
    }
    .modal-nav {
        width: 35px;
        height: 35px;
    }
}