/**
 * CTS Logo Carousel - Estilos CSS Premium v1.0.1
 * Basado en el carrusel HTML funcional perfecto del usuario
 * Scroll infinito suave sin conflictos con WordPress
 * CSS ESPECIFICO para evitar interferencias con Elementor
 */

/* ================================================
   CONTAINER PRINCIPAL
   ================================================ */
.cts-brands-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.cts-brands-carousel-container {
    position: relative;
    width: 100%;
}

.cts-carousel-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* ================================================
   CONTAINER DE SCROLL - NÚCLEO DEL CARRUSEL
   ================================================ */
.cts-scroll-container {
    display: flex;
    gap: 2rem;
    padding: 2.5rem 0;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.cts-scroll-container::-webkit-scrollbar {
    display: none;
}

/* ================================================
   SLIDES/LOGOS INDIVIDUALES
   ================================================ */
.cts-logo-slide {
    flex: none;
    width: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 12rem;
    background: white;
    border-radius: 2.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 1);
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.cts-logo-slide:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cts-logo-item {
    max-height: 5rem;
    max-width: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: grayscale(100%);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.5;
}

.cts-logo-slide:hover .cts-logo-item {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* ================================================
   RESPONSIVE SLIDES
   ================================================ */
@media (min-width: 640px) {
    .cts-logo-slide {
        width: 50%;
    }
}

@media (min-width: 768px) {
    .cts-logo-slide {
        width: 33.333333%;
    }
}

@media (min-width: 1024px) {
    .cts-logo-slide {
        width: 25%;
    }
}

/* ================================================
   SOMBRAS LATERALES
   ================================================ */
.cts-carousel-shadow-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8rem;
    z-index: 5;
    background: linear-gradient(to right, rgba(249, 250, 251, 1) 0%, rgba(249, 250, 251, 0) 100%);
    pointer-events: none;
}

.cts-carousel-shadow-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8rem;
    z-index: 5;
    background: linear-gradient(to left, rgba(249, 250, 251, 1) 0%, rgba(249, 250, 251, 0) 100%);
    pointer-events: none;
}

/* ================================================
   NAVEGACIÓN - FLECHAS
   ================================================ */
.cts-carousel-arrow {
    position: absolute;
    z-index: 20;
    background: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    color: rgba(31, 41, 55, 1);
    border: 1px solid rgba(229, 231, 235, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    outline: none;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cts-carousel-group:hover .cts-carousel-arrow {
    opacity: 1;
}

.cts-carousel-arrow:hover {
    background: #3b82f6;
    color: white;
}

.cts-carousel-arrow:focus {
    outline: none;
}

.cts-carousel-prev {
    left: -1rem;
}

.cts-carousel-next {
    right: -1rem;
}

@media (min-width: 768px) {
    .cts-carousel-prev {
        left: -3rem;
    }
    
    .cts-carousel-next {
        right: -3rem;
    }
}

.cts-carousel-arrow svg {
    height: 1.5rem;
    width: 1.5rem;
}

/* ================================================
   NAVEGACIÓN - BULLETS/INDICADORES - CSS ESPECÍFICO
   ================================================ */
.cts-brands-carousel-container .cts-bullet-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-top: 2rem !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
    max-width: 300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.cts-brands-carousel-container .cts-bullet {
    height: 12px !important;
    width: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
    border-radius: 50% !important;
    background: rgba(156, 163, 175, 0.6) !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.cts-brands-carousel-container .cts-bullet:hover {
    background: rgba(107, 114, 128, 0.8) !important;
    transform: scale(1.2) !important;
}

.cts-brands-carousel-container .cts-bullet:focus {
    outline: none !important;
}

.cts-brands-carousel-container .cts-bullet-active {
    background: #3b82f6 !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    border-radius: 12px !important;
    transform: none !important;
}

/* Controles de visibilidad - MAS ESPECIFICOS */
.cts-brands-carousel-container.cts-hide-arrows .cts-carousel-arrow {
    display: none !important;
}

.cts-brands-carousel-container.cts-hide-bullets .cts-bullet-container {
    display: none !important;
}

/* Evitar que otros CSS interfieran con nuestros bullets */
.cts-brands-carousel-wrapper * {
    box-sizing: border-box;
}

.cts-brands-carousel-container .cts-bullet-container * {
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */
@media (max-width: 768px) {
    .cts-scroll-container {
        gap: 1.5rem;
        padding: 2rem 0;
    }
    
    .cts-logo-slide {
        height: 10rem;
        padding: 2rem;
        border-radius: 2rem;
    }
    
    .cts-logo-item {
        max-height: 4rem;
    }
    
    .cts-carousel-shadow-left,
    .cts-carousel-shadow-right {
        width: 6rem;
    }
    
    .cts-carousel-arrow {
        width: 3rem;
        height: 3rem;
        padding: 0.75rem;
    }
    
    .cts-carousel-arrow svg {
        height: 1.25rem;
        width: 1.25rem;
    }
}

@media (max-width: 480px) {
    .cts-scroll-container {
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .cts-logo-slide {
        height: 8rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    .cts-logo-item {
        max-height: 3rem;
    }
    
    .cts-carousel-shadow-left,
    .cts-carousel-shadow-right {
        width: 4rem;
    }
    
    .cts-carousel-arrow {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.5rem;
    }
    
    .cts-carousel-arrow svg {
        height: 1rem;
        width: 1rem;
    }
    
    .cts-carousel-prev {
        left: -0.5rem;
    }
    
    .cts-carousel-next {
        right: -0.5rem;
    }
}

/* ================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================ */
.cts-scroll-container,
.cts-logo-slide,
.cts-logo-item {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* ================================================
   ACCESSIBILITY
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    .cts-logo-slide,
    .cts-logo-item,
    .cts-carousel-arrow,
    .cts-bullet {
        transition: none;
    }
    
    .cts-logo-slide:hover .cts-logo-item {
        transform: none;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    .cts-carousel-arrow,
    .cts-bullet-container,
    .cts-carousel-shadow-left,
    .cts-carousel-shadow-right {
        display: none;
    }
    
    .cts-scroll-container {
        overflow: visible;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .cts-logo-slide {
        width: auto;
        flex: none;
        min-width: 200px;
        height: auto;
        padding: 1rem;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}