/* ============================================
   CARROSSEL DE LOGOS - CLIENTES
   Animação infinita e responsiva
   ============================================ */

/* === SEÇÃO DO CARROSSEL === */
.clients-carousel-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.clients-carousel-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.clients-carousel-section .section-title {
    color: var(--azul-oceano);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.clients-carousel-section .section-subtitle {
    color: var(--cinza-medio);
    font-size: 1.1rem;
}

/* === CONTAINER DO CARROSSEL === */
.logo-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

/* Gradientes nas bordas para efeito de fade */
.logo-carousel-wrapper::before,
.logo-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa 0%, transparent 100%);
}

.logo-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #e9ecef 0%, transparent 100%);
}

/* === TRILHA DO CARROSSEL === */
.logo-carousel-track {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: scrollLogos 45s linear infinite;
    width: max-content;
}

/* Pausa no hover */
.logo-carousel-wrapper:hover .logo-carousel-track {
    animation-play-state: paused;
}

/* === ITEM DE LOGO === */
.logo-carousel-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    background: var(--branco-neve);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    min-width: 180px;
    height: 100px;
}

/* === IMAGEM DA LOGO === */
.logo-carousel-item img {
    max-width: 150px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* === ANIMAÇÃO INFINITA === */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* === VERSÃO PARA PÁGINA DE CLIENTES === */
.clients-page-carousel {
    padding: 80px 0;
    background: var(--branco-neve);
}

.clients-page-carousel .logo-carousel-wrapper::before {
    background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

.clients-page-carousel .logo-carousel-wrapper::after {
    background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

/* === RESPONSIVIDADE === */

/* Tablet e Mobile: cards fixos em grid */
@media (max-width: 992px) {
    .clients-carousel-section {
        padding: 50px 0;
        overflow: visible;
    }

    /* Esconde gradientes laterais */
    .logo-carousel-wrapper::before,
    .logo-carousel-wrapper::after {
        display: none;
    }

    /* Remove animação e transforma em grid */
    .logo-carousel-wrapper {
        overflow: visible;
        padding: 0 1rem;
    }

    .logo-carousel-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        animation: none;
        width: 100%;
    }

    /* Oculta itens duplicados (loop) */
    .logo-carousel-item:nth-child(n+15) {
        display: none;
    }

    .logo-carousel-item {
        min-width: unset;
        width: 100%;
        height: 90px;
        padding: 12px;
        border-radius: 12px;
    }

    .logo-carousel-item img {
        max-width: 100%;
        max-height: 55px;
    }

    .clients-carousel-section .section-title {
        font-size: 1.8rem;
    }
}

/* Mobile: 3 colunas */
@media (max-width: 768px) {
    .logo-carousel-track {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .logo-carousel-item {
        height: 80px;
        padding: 10px;
        border-radius: 10px;
    }

    .logo-carousel-item img {
        max-height: 48px;
    }

    .clients-carousel-section .section-title {
        font-size: 1.6rem;
    }
}

/* Mobile pequeno: 2 colunas */
@media (max-width: 480px) {
    .logo-carousel-track {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .logo-carousel-item {
        height: 75px;
        padding: 8px;
        border-radius: 10px;
    }

    .logo-carousel-item img {
        max-height: 44px;
    }

    .clients-carousel-section .section-title {
        font-size: 1.4rem;
    }
}
