.clients-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.clients-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 11, 36, 0.02) 0%, rgba(0, 0, 0, 0.03) 100%);
    pointer-events: none;
}

.clients-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.clients-header {
    text-align: center;
    margin-bottom: 60px;
}

.clients-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

@media (min-width: 768px) {
    .clients-header h2 {
        font-size: 3rem;
    }
}

.clients-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   CARRUSEL INFINITO MEJORADO
   =================================== */

.clients-carousel {
    overflow: hidden;
    position: relative;
    margin-top: 50px;
    padding: 10px 0;
}

.carousel-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
    width: fit-content;
}

.carousel-track {
    display: flex;
    gap: 30px;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

/* Animación hacia la derecha - MEJORADA */
.carousel-row.right .carousel-track {
    animation: scrollRight 60s linear infinite;
}

/* Animación hacia la izquierda - MEJORADA */
.carousel-row.left .carousel-track {
    animation: scrollLeft 65s linear infinite;
}

/* Pausar al hacer hover */
.carousel-row:hover .carousel-track {
    animation-play-state: paused;
}

/* Keyframes CORREGIDOS para loop perfecto */
@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollLeft {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ===================================
   TARJETAS DE CLIENTES
   =================================== */

.client-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    min-height: 140px;
    min-width: 200px;
    max-width: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 11, 36, 0.1), transparent);
    transition: left 0.5s ease;
}

.client-card:hover::before {
    left: 100%;
}

.client-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(168, 11, 36, 0.2);
    border-color: var(--primary-color);
    z-index: 10;
}

.client-logo {
    width: 100%;
    height: auto;
    max-width: 150px;
    object-fit: contain;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    /* filter: grayscale(100%); */
    opacity: 0.7;
}

.client-card:hover .client-logo {
    /* filter: grayscale(0%); */
    opacity: 1;
}

/* ===================================
   FOOTER CTA
   =================================== */

.clients-footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(168, 11, 36, 0.2);
}

.clients-footer h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.clients-footer p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.95;
}

.clients-footer .btn {
    padding: 15px 40px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
    text-decoration: none;
    display: inline-block;
}

.clients-footer .btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .clients-section {
        padding: 60px 15px;
    }

    .carousel-row {
        gap: 20px;
        margin-bottom: 20px;
    }

    .carousel-track {
        gap: 20px;
    }

    .client-card {
        padding: 20px 15px;
        min-height: 120px;
        min-width: 160px;
        max-width: 160px;
    }

    .client-logo {
        max-width: 120px;
    }

    /* Velocidades ajustadas para móvil */
    .carousel-row.right .carousel-track {
        animation: scrollRight 40s linear infinite;
    }

    .carousel-row.left .carousel-track {
        animation: scrollLeft 45s linear infinite;
    }

    .clients-footer {
        padding: 30px 20px;
    }

    .clients-footer h3 {
        font-size: 1.5rem;
    }

    .clients-footer p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .client-card {
        min-width: 140px;
        max-width: 140px;
        min-height: 100px;
    }

    .client-logo {
        max-width: 100px;
    }

    /* Velocidades más rápidas en móviles pequeños */
    .carousel-row.right .carousel-track {
        animation: scrollRight 30s linear infinite;
    }

    .carousel-row.left .carousel-track {
        animation: scrollLeft 35s linear infinite;
    }
}