/**
 * TootConnect – Partners logo ticker
 *
 * Infinite, seamless horizontal marquee. The logo list is rendered twice inside
 * the track and the track animates translateX(0 -> -50%), so one full copy
 * scrolls past before the loop repeats with no visible jump.
 *
 * Per-instance values (height, speed) are passed as inline styles from PHP.
 */

.tc-partners {
    width: 100%;
    text-align: center;
}

.tc-partners__title {
    margin: 0 0 24px;
    font-size: 1.6rem;
    font-weight: 700;
}

.tc-marquee {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Soft fade on both edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.tc-marquee__track {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 100%;
    animation-name: tc-marquee-left;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.tc-marquee__item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 35px;
    height: 100%;
}

.tc-marquee__item img {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
}

.tc-marquee__item a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Grayscale variant – colour on hover */
.tc-partners--grayscale .tc-marquee__item img {
    filter: grayscale(100%);
    opacity: .7;
    transition: filter .3s ease, opacity .3s ease;
}
.tc-partners--grayscale .tc-marquee__item:hover img {
    filter: none;
    opacity: 1;
}

/* Pause on hover variant */
.tc-partners--pause .tc-marquee:hover .tc-marquee__track {
    animation-play-state: paused;
}

@keyframes tc-marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .tc-marquee__track { animation: none; }
    .tc-marquee {
        overflow-x: auto;
        -webkit-mask-image: none;
                mask-image: none;
    }
}
