/* =============================================================================
   GLOBAL TRUSTED PARTNERS & CLIENTS MARQUEE
   Hardware-accelerated continuous infinite marquee for all screen sizes
   ============================================================================= */

.clients-section {
    padding: clamp(48px, 6vw, 80px) 0;
    background: #ffffff;
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.clients-section.bg-light {
    background: var(--bg-light, #f8fafc);
}

.clients-section.bg-dark {
    background: var(--dark-bg, #0b0f19);
    border-top-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.clients-header {
    text-align: center;
    margin-bottom: clamp(32px, 4.5vw, 48px);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.clients-eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-red, #e41f26);
    background: rgba(228, 31, 38, 0.06);
    padding: 5px 16px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.clients-section.bg-dark .clients-eyebrow {
    background: rgba(228, 31, 38, 0.15);
}

.clients-title {
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.35rem);
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    margin: 0 0 10px;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.clients-section.bg-dark .clients-title {
    color: #ffffff;
}

.clients-subtitle {
    font-size: clamp(13.5px, 1.4vw, 15px);
    color: var(--text-muted, #64748b);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

.clients-section.bg-dark .clients-subtitle {
    color: rgba(255, 255, 255, 0.65);
}

/* Marquee Container with smooth edge fades */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 16px 0;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: clamp(32px, 5vw, 64px);
    animation: marquee-continuous-scroll 32s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Pause on hover/active */
.marquee-container:hover .marquee-track,
.marquee-container:focus-within .marquee-track {
    animation-play-state: paused;
}

/* Individual Logo Item Card */
.marquee-item {
    flex: 0 0 auto;
    width: clamp(120px, 14vw, 170px);
    height: clamp(52px, 7vw, 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 12px;
    background: transparent;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.marquee-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.65;
    transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    transform: translateZ(0);
}

.clients-section.bg-dark .marquee-item img {
    filter: grayscale(1) brightness(1.6);
    opacity: 0.55;
}

/* Hover effect: reveal original brand color */
.marquee-item:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.06);
}

.clients-section.bg-dark .marquee-item:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

/* Infinite continuous scroll keyframe */
@keyframes marquee-continuous-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Mobile & Small Screen Optimizations */
@media screen and (max-width: 768px) {
    .clients-section {
        padding: 38px 0;
    }

    .clients-header {
        margin-bottom: 24px;
        padding: 0 16px;
    }

    .marquee-track {
        gap: 28px;
        animation-duration: 26s;
    }

    .marquee-item {
        width: 130px;
        height: 52px;
        padding: 6px 10px;
    }

    .marquee-item img {
        opacity: 0.85;
    }
}

@media screen and (max-width: 480px) {
    .clients-section {
        padding: 32px 0;
    }

    .clients-eyebrow {
        font-size: 10px;
        padding: 4px 12px;
        margin-bottom: 8px;
    }

    .clients-title {
        font-size: 1.45rem;
        margin-bottom: 6px;
    }

    .clients-subtitle {
        font-size: 12.5px;
        line-height: 1.5;
    }

    .marquee-track {
        gap: 20px;
        animation-duration: 22s;
    }

    .marquee-item {
        width: 110px;
        height: 46px;
        padding: 4px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
        overflow-x: auto;
        justify-content: center;
        flex-wrap: wrap;
    }
}