:root {
    --azul-mca: #003f8c;
    --azul-oscuro: #002856;
    --rojo-mca: #e30613;
    --gris-claro: #f5f7fa;
    --blanco: #ffffff;
    --negro: #1e1e2a;
    --sombra: 0 15px 35px rgba(0,63,140,0.08);
    --sombra-hover: 0 20px 40px rgba(0,63,140,0.15);
    --border-radius: 20px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--negro);
    background: var(--blanco);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal */
    width: 100%;
}

.container {
    max-width: 1650px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Asegura que el container no se desborde */
}

/* Estilos adicionales para el selector de idioma */
.language-selector {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}
.language-selector button {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}
        .language-selector button.active-lang {
            background-color: #ffc107;
            color: #1e3a6f;
        }

.container-ubic {
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Asegura que el container no se desborde */
}


/* ========== TÍTULOS ========== */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--azul-mca);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    word-wrap: break-word; /* Evita desbordamiento de texto */
}
.section-title::after {
    content: '';
    display: block;
    width: 90px;
    height: 4px;
    background: var(--rojo-mca);
    margin: 15px auto 0;
    border-radius: 4px;
}

/* ========== HEADER ========== */
.top-header {
    background: var(--azul-mca);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
    width: 100%;
    overflow-x: hidden; /* Evita scroll horizontal */
}
.top-header a {
    color: white;
    opacity: 0.9;
    transition: 0.3s;
    text-decoration: none;
    word-wrap: break-word;
}
.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* Espacio entre elementos cuando se envuelven */
}
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Espacio entre items de contacto */
}
.contact-info span {
    margin-right: 0; /* Eliminamos margin-right, usamos gap del padre */
    white-space: nowrap; /* Evita que el texto se rompa */
}
.contact-info i {
    margin-right: 8px;
}
.social-top {
    display: flex;
    gap: 10px;
}
.social-top a {
    color: white;
    transition: 0.3s;
}
.social-top a:hover {
    opacity: 0.7;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* Cambiado de 15px 0 a 15px 20px */
    background: white;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.logo img {
    max-height: 75px;
    width: auto;
    max-width: 100%; /* Evita que el logo se desborde */
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap; /* Permite que los items se envuelvan si es necesario */
}
.navbar a {
    font-weight: 600;
    color: var(--negro);
    padding: 8px 0;
    position: relative;
    text-decoration: none;
    white-space: nowrap; /* Evita que el texto se rompa */
}
.navbar a.active,
.navbar a:hover {
    color: var(--azul-mca);
}
.navbar a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--rojo-mca);
    border-radius: 3px;
}

/* DROPDOWN */
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 260px;
    padding: 15px 0;
    border-radius: 12px;
    box-shadow: var(--sombra);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 100;
    display: block;
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li {
    width: 100%;
}
.dropdown-menu a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap; /* Evita que el texto se rompa en dropdown */
}
.dropdown-menu a:hover {
    background: var(--gris-claro);
    color: var(--azul-mca);
}
.sub-dropdown {
    position: relative;
}
.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    min-width: 200px;
    padding: 15px 0;
    border-radius: 12px;
    box-shadow: var(--sombra);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: 0.3s;
}
.sub-dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--azul-mca);
    margin: 3px 0;
    border-radius: 3px;
}

/* ========== HERO ========== */
.hero {
    width: 100%;
    height: 600px;
    overflow: hidden; /* Evita desbordamiento */
}
.heroSwiper {
    width: 100%;
    height: 100%;
}
.heroSwiper .swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%; /* Asegura que el slide ocupe el ancho completo */
}
.heroSwiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3); /* Overlay para mejorar legibilidad del texto */
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 0 50px;
    color: white;
    width: 100%; /* Asegura que el contenido no se desborde */
}
.hero-content h2 {
    font-size: 3.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word; /* Evita desbordamiento de texto */
}
.hero-content p {
    font-size: 1.2rem;
    word-wrap: break-word;
}
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
}
.swiper-pagination-bullet-active {
    background: var(--rojo-mca) !important;
}

/* ========== PRODUCTOS ========== */
.productos {
    padding: 80px 0;
    background: var(--gris-claro);
    width: 100%;
    overflow-x: hidden;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%; /* Asegura que el grid no se desborde */
}
.product-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--sombra);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%; /* Asegura que la card ocupe el ancho de su celda */
    max-width: 100%; /* Evita desbordamiento */
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra-hover);
}
.product-card h3 {
    font-size: 1.3rem;
    color: var(--azul-mca);
    margin-bottom: 15px;
    min-height: 70px;
    font-weight: 700;
    word-wrap: break-word;
}
.product-card img {
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 15px;
}
.product-card p {
    color: #5a5a6e;
    margin-bottom: 15px;
    flex-grow: 1;
    word-wrap: break-word;
}
.capacidad {
    font-weight: 700;
    color: var(--rojo-mca);
    margin-bottom: 20px;
    font-size: 0.95rem;
    word-wrap: break-word;
}
.btn {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    color: var(--azul-mca);
    border: 2px solid var(--azul-mca);
    border-radius: 60px;
    font-weight: 700;
    transition: 0.3s;
    margin-top: auto;
    text-decoration: none;
    max-width: 100%; /* Evita desbordamiento */
}
.btn:hover {
    background: var(--azul-mca);
    color: white;
}

/* ========== SLIDER DE PRODUCTOS ========== */
.productSwiper {
    position: relative;
    overflow: hidden; /* Esto oculta las tarjetas que sobresalen */
    padding: 20px 20px 60px 20px !important; /* Reducimos el padding lateral */
    margin: 0; /* Eliminamos el margen negativo */
    width: 100%;
}

.productSwiper .swiper-wrapper {
    display: flex;
    width: 100%;
}

.productSwiper .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0; /* Asegura que los slides no se encojan */
}

.productSwiper .product-card {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Personalización de flechas de navegación - DENTRO del contenedor */
.productSwiper .swiper-button-next,
.productSwiper .swiper-button-prev {
    color: var(--azul-mca) !important;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,63,140,0.2);
    transition: all 0.3s ease;
    margin-top: -25px; /* Centrado vertical */
}

.productSwiper .swiper-button-next {
    right: 10px; /* Posición dentro del contenedor */
}

.productSwiper .swiper-button-prev {
    left: 10px; /* Posición dentro del contenedor */
}

.productSwiper .swiper-button-next:after,
.productSwiper .swiper-button-prev:after {
    font-size: 1.4rem;
    font-weight: bold;
}

.productSwiper .swiper-button-next:hover,
.productSwiper .swiper-button-prev:hover {
    background: var(--azul-mca);
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,63,140,0.3);
}

/* Paginación */
.productSwiper .swiper-pagination-bullet {
    background: var(--azul-mca);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.productSwiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--rojo-mca);
    transform: scale(1.2);
}

/* Ajuste responsive para las flechas */
@media (max-width: 1200px) {
    .productSwiper .swiper-button-next {
        right: 8px;
    }
    
    .productSwiper .swiper-button-prev {
        left: 8px;
    }
}

@media (max-width: 992px) {
    .productSwiper {
        padding: 20px 15px 50px 15px !important;
    }
    
    .productSwiper .swiper-button-next,
    .productSwiper .swiper-button-prev {
        width: 45px;
        height: 45px;
    }
    
    .productSwiper .swiper-button-next {
        right: 5px;
    }
    
    .productSwiper .swiper-button-prev {
        left: 5px;
    }
}

@media (max-width: 768px) {
    .productSwiper {
        padding: 20px 10px 50px 10px !important;
    }
    
    .productSwiper .swiper-button-next,
    .productSwiper .swiper-button-prev {
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.95);
        box-shadow: 0 4px 12px rgba(0,63,140,0.25);
    }
    
    .productSwiper .swiper-button-next {
        right: 5px;
    }
    
    .productSwiper .swiper-button-prev {
        left: 5px;
    }
    
    .productSwiper .swiper-button-next:after,
    .productSwiper .swiper-button-prev:after {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .productSwiper {
        padding: 20px 5px 45px 5px !important;
    }
    
    .productSwiper .swiper-button-next,
    .productSwiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .productSwiper .swiper-button-next {
        right: 2px;
    }
    
    .productSwiper .swiper-button-prev {
        left: 2px;
    }
    
    .productSwiper .swiper-button-next:after,
    .productSwiper .swiper-button-prev:after {
        font-size: 1rem;
    }
}

/* ========== BOTÓN VER TODOS LOS PRODUCTOS ========== */
.ver-todos-container {
    text-align: center;
    margin-top: 30px;
}

.btn-ver-todos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--rojo-mca);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 60px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 8px 20px rgba(227, 6, 19, 0.3);
}

.btn-ver-todos:hover {
    background: white;
    color: var(--rojo-mca);
    border-color: var(--rojo-mca);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(227, 6, 19, 0.4);
}

.btn-ver-todos i {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.btn-ver-todos:hover i {
    transform: translateX(8px);
}

/* Responsive para el botón */
@media (max-width: 768px) {
    .btn-ver-todos {
        padding: 14px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .btn-ver-todos {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
}

/* ===== SECCIÓN VIDEOS VERTICALES ===== */
.videos {
    padding: 40px 0 60px 0;
    background-color: var(--gris-claro);
    width: 100%;
    overflow-x: hidden;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-family: 'Open Sans', sans-serif;
}

/* Grid para videos verticales */
.video-grid-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjeta de video vertical */
.video-card-vertical {
    background: var(--blanco);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.video-card-vertical:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
}

/* Contenedor del video con proporción vertical (9:16) */
.video-wrapper-vertical {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Relación 9:16 */
    background: #000;
    overflow: hidden;
    cursor: default;
}

.video-wrapper-vertical video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quitamos cualquier indicador de play */
.video-wrapper-vertical::-webkit-media-controls {
    display: none !important;
}

.video-wrapper-vertical::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-wrapper-vertical video::-webkit-media-controls {
    display: none !important;
}

.video-wrapper-vertical video::-webkit-media-controls-panel {
    display: none !important;
}

.video-wrapper-vertical video::-webkit-media-controls-play-button {
    display: none !important;
}

.video-wrapper-vertical video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Título del video */
.video-card-vertical h4 {
    padding: 12px 10px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--azul-mca);
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    border-top: 1px solid rgba(0,63,140,0.1);
    background: white;
}

/* Responsive */
@media (max-width: 992px) {
    .video-grid-vertical {
        gap: 15px;
        max-width: 800px;
    }
    
    .video-card-vertical {
        max-width: 240px;
    }
    
    .video-card-vertical h4 {
        font-size: 0.9rem;
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .videos {
        padding: 30px 0 50px 0;
    }
    
    .video-grid-vertical {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 500px;
    }
    
    .video-card-vertical {
        max-width: 220px;
    }
}

@media (max-width: 576px) {
    .video-grid-vertical {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 280px;
    }
    
    .video-card-vertical {
        max-width: 260px;
    }
}

/* ========== UBICACIÓN ========== */
.ubicacion {
    padding: 80px 0;
    width: 100%;
    overflow-x: hidden;
}
.mapa {
    width: 100%;
    height: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
}
.mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========== CLIENTES ========== */
.clientes {
    padding: 10px 0;
    width: 100%;
    overflow-x: hidden;
}
.clientSwiper {
    padding: 20px 0;
    width: 100%;
    overflow: hidden; /* Importante para Swiper */
}
.clientSwiper .swiper-wrapper {
    width: 100%;
}
.clientSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 130px;
    width: auto; /* Swiper maneja el ancho */
}
.clientSwiper img {
    max-width: 80%;
    max-height: 80px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.clientSwiper img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

/* ========== FOOTER CON FORMA ========== */
.footer {
    background: var(--azul-mca);
    color: white;
    position: relative;
    margin-top: 20px;
    width: 100%;
    overflow-x: hidden;
}
.footer-wave {
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden; /* Evita desbordamiento del SVG */
}
.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}
.footer-content {
    padding: 60px 0 30px;
    position: relative;
    z-index: 2;
    width: 100%;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 50px;
    width: 100%;
}
.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
    width: 100%;
    height: auto;
}
.footer-social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    margin-right: 12px;
    transition: 0.3s;
}
.footer-social a:hover {
    background: var(--rojo-mca);
    transform: translateY(-3px);
}

.footer-col {
    margin-left: 30px;
}
.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    font-weight: 700;
    word-wrap: break-word;
}
.footer-col h4::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--rojo-mca);
    margin-top: 8px;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    word-wrap: break-word;
}
.footer-col a {
    color: white;
    opacity: 0.9;
    transition: 0.3s;
    text-decoration: none;
    word-wrap: break-word;
}
.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
}
.footer-bottom {
    background: var(--azul-oscuro);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}
.footer-bottom a {
    color: white;
    font-weight: 700;
    text-decoration: none;
}

/* ========== MEJORAS PARA EL ASISTENTE (GRID DE CONTACTOS) ========== */
.contacto-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 5px 0;
}

.contacto-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.contacto-row.row-3 {
    flex-wrap: wrap; /* Permite que en móviles se ajusten */
}

.contacto-row.row-3 .contacto-item {
    flex: 1 1 calc(33.333% - 7px); /* Para 3 items por fila */
    min-width: 0; /* Evita desbordamientos de texto */
}

.contacto-row.row-2 .contacto-item {
    flex: 1 1 calc(50% - 5px); /* Para 2 items por fila */
    min-width: 0;
}

/* Ajustes para el item de contacto dentro de las filas */
.contacto-row .contacto-item {
    flex-direction: column; /* Apila el icono y el texto verticalmente */
    text-align: center;
    padding: 12px 8px;
    gap: 8px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(0,63,140,0.08);
    transition: all 0.2s ease;
}

.contacto-row .contacto-item:hover {
    transform: translateY(-3px);
    border-color: var(--azul-mca);
    box-shadow: 0 8px 20px rgba(0,63,140,0.1);
}

.contacto-row .contacto-icon {
    margin: 0 auto; /* Centra el icono */
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Hace el fondo circular */
}

.contacto-row .contacto-info {
    text-align: center;
}

.contacto-row .contacto-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--azul-mca);
}

.contacto-row .contacto-detail {
    font-size: 0.7rem;
    line-height: 1.2;
}

.asistente-panel:not(.active) {
    pointer-events: none !important;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .contacto-row.row-3,
    .contacto-row.row-2 {
        flex-wrap: wrap;
    }
    
    .contacto-row.row-3 .contacto-item,
    .contacto-row.row-2 .contacto-item {
        flex: 1 1 calc(50% - 5px); /* En móvil, 2 por fila */
        min-width: 0;
    }
    
    /* Si es muy pequeño, que sea 1 por fila */
    @media (max-width: 380px) {
        .contacto-row.row-3 .contacto-item,
        .contacto-row.row-2 .contacto-item {
            flex: 1 1 100%;
        }
    }
}

/* Ajuste para el botón de llamada que está fuera del grid */
.asistente-panel .contacto-item:not(.contacto-row .contacto-item) {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 12px 15px;
    margin-top: 15px; /* Separación del grid */
}

.asistente-panel .contacto-item:not(.contacto-row .contacto-item) .contacto-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px; /* Vuelve a la forma cuadrada para la llamada */
    margin: 0;
}

.asistente-panel .contacto-item:not(.contacto-row .contacto-item) .contacto-info {
    text-align: left;
}

/* ========== ASISTENTE INTERACTIVO (MASCOTA) ========== */
.asistente-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Botón flotante con la mascota GIF */
.asistente-button {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1002;
    animation: pulse-asistente 2s infinite;
    overflow: hidden;
    padding: 0;
}

.asistente-button:hover {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 12px 25px rgba(0, 63, 140, 0.5);
}

/* Estilo para el GIF de la mascota */
.asistente-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Tooltip "¿Necesitas ayuda?" - SIEMPRE VISIBLE */
.asistente-tooltip {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--azul-mca);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.2);
    /* Siempre visible */
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1003;
}

/* Flecha del tooltip */
.asistente-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent var(--azul-mca);
}

/* Cuando el panel está abierto, ocultamos el tooltip */
.asistente-panel.active ~ .asistente-button .asistente-tooltip {
    opacity: 0;
    visibility: hidden;
    right: 70px;
}

/* Animación de pulso */
@keyframes pulse-asistente {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 63, 140, 0.5);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0, 63, 140, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 63, 140, 0);
    }
}

/* Panel del asistente */
.asistente-panel {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 340px;
    max-height: 520px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
    z-index: 1001;
    border: 1px solid rgba(0,63,140,0.15);
}

.asistente-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header del panel */
.panel-header {
    background: linear-gradient(135deg, var(--azul-mca), var(--azul-oscuro));
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.header-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid rgba(255,255,255,0.3);
}

.header-text {
    flex: 1;
}

.header-title {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.header-subtitle {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
}

.panel-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.panel-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Body del panel */
.panel-body {
    max-height: 450px;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafd;
}

/* Menú principal */
.menu-principal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,63,140,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.menu-item:hover {
    transform: translateX(5px);
    border-color: var(--azul-mca);
    box-shadow: 0 8px 20px rgba(0,63,140,0.1);
}

.menu-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--azul-mca), var(--azul-oscuro));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
}

.menu-title {
    display: block;
    font-weight: 700;
    color: var(--azul-mca);
    font-size: 1rem;
    margin-bottom: 3px;
}

.menu-desc {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

.menu-item i.fa-chevron-right {
    color: var(--azul-mca);
    font-size: 0.9rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.menu-item:hover i.fa-chevron-right {
    opacity: 1;
    transform: translateX(5px);
}

/* Submenús */
.submenu {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.submenu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0 5px 0;
    border-bottom: 1px dashed rgba(0,63,140,0.15);
    margin-bottom: 5px;
}

.back-button {
    background: var(--gris-claro);
    border: none;
    color: var(--azul-mca);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.back-button:hover {
    background: var(--azul-mca);
    color: white;
    border-color: var(--azul-mca);
}

.back-button i {
    font-size: 0.8rem;
}

.submenu-title {
    font-weight: 700;
    color: var(--azul-mca);
    font-size: 1rem;
    flex: 1;
}

.submenu-content {
    padding: 5px 0;
}

.submenu-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 15px;
    line-height: 1.5;
    padding: 0 5px;
}

/* Opciones de contacto */
.contacto-opciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,63,140,0.08);
}

.contacto-item:hover {
    transform: translateX(5px);
    border-color: var(--azul-mca);
    box-shadow: 0 4px 12px rgba(0,63,140,0.1);
}

.contacto-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.contacto-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.whatsapp-bg {
    background: #25D366;
}

.phone-bg {
    background: var(--azul-mca);
}

.email-bg {
    background: #ea4335;
}

.contacto-info {
    flex: 1;
}

.contacto-title {
    display: block;
    font-weight: 600;
    color: var(--negro);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.contacto-detail {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Botón de cotización */
.btn-cotizacion-asistente {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px;
    background: linear-gradient(135deg, var(--rojo-mca), #c40510);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    margin: 5px 0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-cotizacion-asistente:hover {
    background: white;
    color: var(--rojo-mca);
    border-color: var(--rojo-mca);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(227, 6, 19, 0.2);
}

.separador {
    text-align: center;
    margin: 5px 0;
    position: relative;
}

.separador span {
    background: #f8fafd;
    padding: 0 10px;
    color: #9ca3af;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}

.separador::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,63,140,0.1);
    z-index: 1;
}

/* Horario y notas */
.horario-atencion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0,63,140,0.03);
    border-radius: 10px;
    margin-top: 15px;
    color: var(--azul-mca);
    font-size: 0.85rem;
}

.horario-atencion i {
    color: var(--rojo-mca);
}

.nota-soporte {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(227,6,19,0.03);
    border-radius: 10px;
    margin-top: 15px;
    color: var(--rojo-mca);
    font-size: 0.85rem;
    border-left: 3px solid var(--rojo-mca);
}

.nota-soporte i {
    color: var(--rojo-mca);
    font-size: 1rem;
}

/* Footer del panel */
.panel-footer {
    padding: 12px 20px;
    background: #f1f5f9;
    border-top: 1px solid rgba(0,63,140,0.1);
    text-align: center;
    font-size: 0.75rem;
    color: var(--azul-mca);
}

/* Corrección para submenús del asistente */
.asistente-panel .submenu {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-width: auto !important;
    padding: 0 !important;
}

.asistente-panel .submenu[style*="display: block"] {
    display: block !important;
}

.asistente-panel .submenu[style*="display: none"] {
    display: none !important;
}

/* Botón de play overlay para videos */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a1a2f;
  cursor: pointer;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* Overlay de play */
.btn-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 63, 140, 0.85);
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-play-overlay:hover {
  background: var(--rojo-mca);
  transform: translate(-50%, -50%) scale(1.1);
  border-color: var(--rojo-mca);
}

.btn-play-overlay.playing {
  display: none;
}

/* Cuando el video está reproduciéndose, mostrar controles */
.video-wrapper video[controls] {
  cursor: default;
}

/* Ajuste para el botón de expandir cuando hay play overlay */
.btn-expand-video {
  z-index: 6; /* Por encima del play overlay */
}

/* Responsive para el botón de play */
@media (max-width: 768px) {
  .btn-play-overlay {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

/* Asegurar que los menús se muestren correctamente */
#menu-principal {
    display: flex !important;
}

#menu-principal[style*="display: none"] {
    display: none !important;
}

#submenu-producto,
#submenu-cotizacion,
#submenu-soporte {
    display: none !important;
}

#submenu-producto[style*="display: block"],
#submenu-cotizacion[style*="display: block"],
#submenu-soporte[style*="display: block"] {
    display: block !important;
}

/* Responsive del asistente */
@media (max-width: 768px) {
    .asistente-float {
        bottom: 20px;
        right: 20px;
    }
    
    .asistente-button {
        width: 65px;
        height: 65px;
    }
    
    .asistente-tooltip {
        right: 70px;
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    /* En móvil también ocultamos al abrir el panel */
    .asistente-panel.active ~ .asistente-button .asistente-tooltip {
        opacity: 0;
        visibility: hidden;
        right: 60px;
    }
    
    .asistente-panel {
        width: 300px;
        bottom: 75px;
    }
    
    .panel-header {
        padding: 15px;
    }
    
    .header-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
    
    .menu-item {
        padding: 12px;
    }
    
    .menu-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .menu-title {
        font-size: 0.95rem;
    }
    
    .menu-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .asistente-button {
        width: 55px;
        height: 55px;
    }
    
    .asistente-tooltip {
        right: 60px;
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .asistente-panel {
        width: 280px;
        right: -10px;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .top-header .container {
        flex-direction: column;
        gap: 8px;
    }
    .footer-col {
        margin-left: 0px;
    }
    .contact-info {
        justify-content: center;
    }
    .contact-info span {
        margin: 0 10px;
        white-space: normal; /* Permite que el texto se rompa en móvil */
        font-size: 0.85rem;
    }
    .navbar {
        position: fixed;
        top: 110px;
        left: -100%;
        width: 80%;
        max-width: 300px; /* Limita el ancho máximo */
        height: 100vh;
        background: white;
        padding: 40px 20px;
        box-shadow: var(--sombra);
        transition: 0.3s;
        z-index: 999;
        overflow-y: auto; /* Permite scroll vertical si es necesario */
    }
    .navbar.active {
        left: 0;
    }
    .navbar ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
    }
    .navbar li {
        width: 100%;
    }
    .navbar a {
        white-space: normal; /* Permite que el texto se rompa en móvil */
        width: 100%;
        display: block;
    }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        width: 100%;
        min-width: auto; /* Elimina el min-width fijo */
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        width: 100%;
    }
    .sub-dropdown.open .submenu {
        display: block;
    }
    .hamburger {
        display: flex;
    }
    .hero {
        height: 450px;
    }
    .hero-content {
        padding: 0 30px;
    }
    .hero-content h2 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Fix adicional para Swiper en móvil */
.swiper-container {
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    /* ---- TOP HEADER ---- */
    .top-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0;
    }
    .top-header .contact-info {
        flex-direction: column;
        gap: 4px;
        width: auto;
        flex: 1;
    }
    /* Ocultar horario */
    .top-header .contact-info span:nth-child(3) {
        display: none;
    }
    .top-header .social-top {
        flex-direction: row;
        align-items: center;
        width: auto;
        flex-shrink: 0;
        justify-content: flex-end;
    }
    /* Ocultar redes sociales */
    .top-header .social-top > a {
        display: none;
    }
    .top-header .social-top .language-selector {
        margin-left: 0;
    }

    /* ---- FOOTER ---- */
    /* Ocultar columna Productos en mobile */
    .footer-col:last-child {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

        /* ========== AJUSTES MÓVIL ========== */
        @media (max-width: 768px) {
            /* Top header: dos filas */
            .top-header .container {
                display: flex;
                flex-wrap: wrap;
                gap: 5px;
            }
            .top-header .contact-info {
                width: 50%;
                display: flex;
                flex-direction: column;
                gap: 5px;
            }
            .top-header .social-top {
                width: 50%;
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                gap: 5px;
            }
            /* Ocultar horario en móvil */
            .top-header .contact-info span[data-i18n="top_hours"] {
                display: none;
            }
            /* Ajustar selector de idioma dentro de social-top */
            .top-header .social-top .language-selector {
                margin-left: 0;
                justify-content: flex-end;
            }
            /* Header principal: hamburguesa a la izquierda, logo centrado */
            .main-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
            }
            .hamburger {
                order: 1;
                margin-right: auto;
            }
            .logo {
                order: 2;
                margin-right: 30%;
            }
            /* El nav está oculto por defecto en móvil (lo maneja script.js) */
            /* Footer: centrar logo y redes en la primera columna */
            .footer-grid {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .footer-col:first-child {
                text-align: center;
            }
            .footer-social {
                justify-content: center;
            }
        }