.partners-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    overflow: hidden;
    position: relative;
}

.partners-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

.partners-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto;
}

.logo-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.logo-carousel-wrapper::before,
.logo-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(232, 238, 245, 1) 0%, rgba(232, 238, 245, 0) 100%);
}

.logo-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(232, 238, 245, 1) 0%, rgba(232, 238, 245, 0) 100%);
}

.logo-carousel {
    display: flex;
    gap: 60px;
    animation: scroll-logos 40s linear infinite;
    will-change: transform;
}

.logo-carousel.row-2 {
    animation: scroll-logos-row2 40s linear infinite;
}

.logo-carousel-wrapper:hover .logo-carousel {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: all 0.4s ease;
}

.logo-item:hover {
    transform: scale(1.15) translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
    background: linear-gradient(135deg, #24DD6F 0%, #12BF57 100%);
}

.logo-item:hover img {
    filter: brightness(1.1);
    opacity: 1;
}

@keyframes scroll-logos {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-9 * (180px + 60px)));
    }
}

@keyframes scroll-logos-row2 {
    from {
        transform: translateX(calc(-8 * (180px + 60px)));
    }

    to {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .partners-section {
        padding: 50px 0;
    }

    .partners-title {
        font-size: 1.8rem;
    }

    .partners-description {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    .logo-carousel-wrapper {
        gap: 35px;
    }

    .logo-item {
        width: 140px;
        height: 100px;
        padding: 15px;
    }

    .logo-carousel {
        gap: 40px;
        animation-name: scroll-logos-mobile;
    }

    .logo-carousel:not(.row-2) {
        animation-duration: 30s;
    }

    .logo-carousel.row-2 {
        animation-name: scroll-logos-row2-mobile;
        animation-duration: 30s;
    }

    .logo-carousel-wrapper::before,
    .logo-carousel-wrapper::after {
        width: 80px;
    }

    @keyframes scroll-logos-mobile {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(calc(-9 * (140px + 40px)));
        }
    }

    @keyframes scroll-logos-row2-mobile {
        from {
            transform: translateX(calc(-8 * (140px + 40px)));
        }

        to {
            transform: translateX(0);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-carousel {
        animation: none;
    }
}