/* ================================================= */
/* === SECCIÓN WHY US (HORIZONTAL SCROLL CON VIDEO) === */
/* ================================================= */

#why-us-horizontal {
    position: relative; 
    overflow: hidden;
    height: 100vh; /* Altura fija para evitar problemas de scroll */
    width: 100%;
}

/* Contenedor del video de fondo */
#why-us-horizontal .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
}

#why-us-horizontal .video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Optimizaciones para mejor rendimiento */
    will-change: auto;
    transform: translateZ(0);
}

#why-us-horizontal .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ================================================ */
    /* OPACIDAD DE LA CAPA NEGRA SOBRE EL VIDEO       */
    /* Cambia el último número (0.4) para ajustar:    */
    /* 0.1 = muy transparente, 0.9 = muy opaco        */
    /* ================================================ */
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: 1;
}

/* Contenedor de los paneles que se mueven */
#why-us-horizontal .panels-container {
    width: 200%; /* Exactamente 200% para 2 paneles */
    height: 100vh;
    display: flex;
    flex-wrap: nowrap;
    position: relative; 
    z-index: 2; /* Por encima del video y overlay */
    will-change: transform; /* Optimización para animaciones */
}

/* Cada panel individual */
#why-us-horizontal .panel {
    width: 50%; /* Exactamente 50% del contenedor (que es 200%) = 100vw cada panel */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #fff;
    box-sizing: border-box; /* Importante para que el padding no afecte el tamaño */
    flex-shrink: 0; /* Prevenir que los paneles se encojan */
}

/* Contenido dentro de cada panel */
#why-us-horizontal .panel-content {
    max-width: 800px;
    text-align: center;
}

#why-us-horizontal .panel-content h2 {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    color: #ffffff;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7); 
}

#why-us-horizontal .panel-content h3 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    color: #f59e0b;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

#why-us-horizontal .panel-content p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

#why-us-horizontal .btn-panel {
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 700;
    background-color: var(--accent-color, #f59e0b);
    border: none;
    color: #111;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

#why-us-horizontal .btn-panel:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: #ffb742;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* ---- RESPONSIVE DESIGN ---- */

/* Tablets grandes y pantallas medianas */
@media (max-width: 1024px) {
    #why-us-horizontal .panel-content {
        max-width: 700px;
        padding: 0 2rem;
    }
    
    #why-us-horizontal .panel-content h2 {
        margin-bottom: 0.8rem;
    }
    
    #why-us-horizontal .panel-content h3 {
        margin-bottom: 1.2rem;
    }
    
    #why-us-horizontal .panel-content p {
        margin-bottom: 2rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    #why-us-horizontal .panel-content {
        padding: 0 1.5rem;
        max-width: 90%;
    }
    
    #why-us-horizontal .panel-content h2 {
        margin-bottom: 0.6rem;
        letter-spacing: -1px;
    }
    
    #why-us-horizontal .panel-content h3 {
        margin-bottom: 1rem;
        letter-spacing: -0.3px;
    }
    
    #why-us-horizontal .panel-content p {
        margin-bottom: 1.8rem;
        line-height: 1.5;
    }
    
    #why-us-horizontal .btn-panel {
        min-width: 140px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    #why-us-horizontal .panel-content {
        padding: 0 1rem;
        max-width: 95%;
    }
    
    #why-us-horizontal .panel-content h2 {
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    #why-us-horizontal .panel-content h3 {
        margin-bottom: 0.8rem;
        text-align: center;
    }
    
    #why-us-horizontal .panel-content p {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    #why-us-horizontal .btn-panel {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        display: block;
        text-align: center;
    }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
    #why-us-horizontal .panel-content {
        padding: 0 0.8rem;
    }
    
    #why-us-horizontal .panel-content p {
        margin-bottom: 1.2rem;
    }
}