
@keyframes slide {
    from {
        transform: translateX(0);
    }
    to {
        /* -50% of the track = exactly one full set of logos, giving a seamless loop */
        transform: translateX(-50%);
    }
}

.logos {
    overflow: hidden;
    padding: 10px 0;
    background: white;
    position: relative;
}

.logos:before,
.logos:after {
    position: absolute;
    top: 0;
    width: 300px;
    height: 100%;
    content: "";
    z-index: 2;
}

.logos:before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
}

.logos:after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

/* .logos-track is the single animated element; it contains two identical .logos-slide
   copies (original + JS clone), so the track is always 2× one set wide.
   Translating by -50% of the track = moving one full set to the left — seamless loop. */
.logos-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    animation: 34s slide infinite linear;
    will-change: transform;
}

.logos-slide {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
}

.logos-slide img {
    width: 11rem;
    height: 5rem;
    margin: 0 30px;
    object-fit: contain;
    flex-shrink: 0;
}

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