/* === WHY SECTION MODULE STYLES UPDATED === */
/* Debug: Why section styles loaded - Updated version */

.why-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 5rem 0;
}

/* === WHY BACKGROUND === */
.why-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.why-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.why-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.85) 0%, rgba(26, 26, 26, 0.7) 100%);
    z-index: 2;
}

.why-container {
    position: relative;
    z-index: 3;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.why-section .section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === WHY CAROUSEL CONTAINER === */
.why-carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.why-carousel {
    overflow: hidden;
    border-radius: 20px;
    background: var(--glass-effect);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

/* === WHY SLIDES === */
.why-slide {
    display: none;
    padding: 3rem 2rem;
    min-height: 350px;
    position: relative;
}

.why-slide.active {
    display: block;
    animation: fadeInSlide 0.6s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === WHY CONTENT LAYOUT === */
.why-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
}

/* === WHY IMAGE - CAMBIO A CUADRADO === */
.why-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.why-image-container {
    width: 150px;
    height: 150px;
    border-radius: 15px; /* Cambio de border-radius: 50% a 15px para hacerlo cuadrado con bordes redondeados */
    overflow: hidden;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    transition: all 0.4s ease;
    position: relative;
    display: flex; /* Añadido para mejor centrado */
    align-items: center; /* Añadido para centrar verticalmente */
    justify-content: center; /* Añadido para centrar horizontalmente */
}

.why-slide.active .why-image-container {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
        transform: scale(1.05);
    }
}

.why-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Añadido para mejor centrado de la imagen */
    transition: transform 0.4s ease;
    display: block; /* Añadido para eliminar espacio en blanco debajo */
}

.why-slide.active .why-image-container img {
    transform: scale(1.1);
}

/* === FALLBACK ICON (cuando no hay imagen) - ACTUALIZADO === */
.why-image-icon {
    position: absolute; /* Cambio a absolute para centrado perfecto */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centrado perfecto */
    font-size: 4rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px currentColor;
    animation: floatIcon 3s ease-in-out infinite;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes floatIcon {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

/* === WHY TEXT === */
.why-text {
    flex: 1;
}

.why-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.why-text h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.why-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
}

/* === WHY CONTROLS === */
.why-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.why-control {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--glass-effect);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
}

.why-control:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.why-control:active {
    transform: scale(0.95);
}

/* === SLIDE INDICATORS === */
.why-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.why-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.why-indicator.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.why-indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* === RESPONSIVE WHY SECTION === */
@media (max-width: 1024px) {
    .why-container {
        padding: 0 1.5rem;
    }
    
    .why-content {
        gap: 2rem;
    }
    
    .why-image-container {
        width: 120px;
        height: 120px;
        border-radius: 12px; /* Proporcionalmente reducido */
    }
}

@media (max-width: 768px) {
    .why-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .why-container {
        padding: 0 1rem;
    }
    
    .why-section .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .why-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .why-image {
        order: -1;
        justify-content: center; /* Asegurar centrado en mobile */
    }
    
    .why-image-container {
        width: 100px;
        height: 100px;
        margin: 0 auto;
        border-radius: 10px; /* Proporcionalmente reducido */
    }
    
    .why-text h3 {
        font-size: 1.5rem;
    }
    
    .why-text h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .why-text p {
        font-size: 1rem;
    }
    
    .why-slide {
        padding: 2rem 1.5rem;
        min-height: 280px;
    }
}

@media (max-width: 480px) {
    .why-section .section-title {
        font-size: 1.8rem;
    }
    
    .why-image-container {
        width: 80px;
        height: 80px;
        border-radius: 8px; /* Proporcionalmente reducido */
    }
    
    .why-text h3 {
        font-size: 1.3rem;
    }
    
    .why-text p {
        font-size: 0.9rem;
    }
    
    .why-slide {
        padding: 1.5rem 1rem;
        min-height: 250px;
    }
    
    .why-control {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .why-container {
        padding: 0 0.5rem;
    }
    
    .why-slide {
        padding: 1rem;
    }
    
    .why-image-container {
        border-radius: 6px; /* Mínimo para pantallas muy pequeñas */
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .why-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .why-slide {
        min-height: 200px;
        padding: 1.5rem;
    }
    
    .why-content {
        gap: 1.5rem;
    }
    
    .why-image-container {
        width: 80px;
        height: 80px;
        border-radius: 8px;
    }
}

/* === VARIANTE CUADRADOS COMPLETAMENTE RECTOS (opcional) === */
/* Si prefieres cuadrados sin bordes redondeados, descomenta esto y comenta los border-radius arriba */
/*
.why-image-container {
    border-radius: 0 !important;
}

@media (max-width: 1024px) {
    .why-image-container {
        border-radius: 0 !important;
    }
}

@media (max-width: 768px) {
    .why-image-container {
        border-radius: 0 !important;
    }
}

@media (max-width: 480px) {
    .why-image-container {
        border-radius: 0 !important;
    }
}

@media (max-width: 360px) {
    .why-image-container {
        border-radius: 0 !important;
    }
}
*/