/**
 * TAZDUCA - CAROUSEL FIX IMMEDIATO DREV1
 * CSS directo y funcional para el carousel de servicios
 */

/* ============================================
   CONTAINER PRINCIPAL DEL CAROUSEL
   ============================================ */

.services-carousel-fix {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px; /* Espacio para botones */
    overflow: hidden;
}

/* ============================================
   CONTAINER Y TRACK DE SLIDES
   ============================================ */

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

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

/* ============================================
   LÍNEA HORIZONTAL DE CARDS - 2 POR VISTA
   ============================================ */

.cards-horizontal {
    display: flex;
    gap: 30px;
    padding: 20px 10px;
    justify-content: center;
    align-items: stretch;
    min-height: 500px;
}

.cards-horizontal .service-card-ultra {
    flex: 1;
    max-width: 450px;
    width: 100%;
}

/* ============================================
   BOTONES DE NAVEGACIÓN
   ============================================ */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF0000 0%, #FF1493 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    
    /* Sombras y efectos */
    box-shadow: 
        0 10px 30px rgba(255, 20, 147, 0.4),
        0 4px 15px rgba(255, 0, 0, 0.3);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Animación sutil */
    animation: gentle-glow 3s ease-in-out infinite;
}

.carousel-btn:hover {
    background: linear-gradient(135deg, #FF1493 0%, #DC143C 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 
        0 15px 40px rgba(255, 20, 147, 0.6),
        0 6px 20px rgba(255, 0, 0, 0.5);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Estado deshabilitado */
.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666 0%, #444 100%);
    animation: none;
}

.carousel-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   INDICADORES
   ============================================ */

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    padding: 20px 0;
}

.carousel-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.carousel-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF0000 0%, #FF1493 100%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.carousel-indicator:hover::before,
.carousel-indicator.active::before {
    left: 0;
}

.carousel-indicator.active {
    background: linear-gradient(135deg, #FF0000 0%, #FF1493 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 4px 15px rgba(255, 0, 0, 0.5),
        0 0 0 4px rgba(255, 20, 147, 0.2);
    transform: scale(1.2);
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes gentle-glow {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(255, 20, 147, 0.4),
            0 4px 15px rgba(255, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 15px 40px rgba(255, 20, 147, 0.6),
            0 6px 20px rgba(255, 0, 0, 0.4);
    }
}

/* Animación de entrada para los cards */
.carousel-slide.active .service-card-ultra {
    animation: slide-in-cards 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.carousel-slide.active .service-card-ultra:nth-child(1) {
    animation-delay: 0.1s;
}

.carousel-slide.active .service-card-ultra:nth-child(2) {
    animation-delay: 0.2s;
}

.carousel-slide.active .service-card-ultra:nth-child(3) {
    animation-delay: 0.3s;
}

.carousel-slide.active .service-card-ultra:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes slide-in-cards {
    0% {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .services-carousel-fix {
        padding: 0 60px;
    }
    
    .cards-horizontal {
        gap: 20px;
        padding: 15px 5px;
        min-height: 450px;
    }
    
    .cards-horizontal .service-card-ultra {
        max-width: none;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .services-carousel-fix {
        padding: 0 50px;
    }
    
    .cards-horizontal {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
        min-height: auto;
    }
    
    .cards-horizontal .service-card-ultra {
        max-width: none;
        width: 100%;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .carousel-btn.prev {
        left: 5px;
    }
    
    .carousel-btn.next {
        right: 5px;
    }
    
    .carousel-indicators {
        gap: 10px;
        margin-top: 30px;
    }
    
    .carousel-indicator {
        width: 12px;
        height: 12px;
    }
}

/* ============================================
   ESTADOS DE FOCUS PARA ACCESIBILIDAD
   ============================================ */

.carousel-btn:focus,
.carousel-indicator:focus {
    outline: 3px solid rgba(255, 0, 0, 0.6);
    outline-offset: 2px;
}

/* ============================================
   REDUCIR ANIMACIONES PARA USUARIOS CON PREFERENCIAS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        transition: transform 0.3s ease;
    }
    
    .carousel-btn,
    .carousel-indicator,
    .carousel-slide {
        transition: all 0.2s ease;
        animation: none;
    }
    
    .service-card-ultra {
        animation: none !important;
    }
}

/* ============================================
   MEJORAS DE RENDIMIENTO
   ============================================ */

.services-carousel-fix {
    contain: layout style paint;
}

.carousel-track {
    contain: layout style;
    will-change: transform;
}

.carousel-slide {
    contain: layout style;
}