/* ========================================
   Clients Section - CSS-only Infinite Scroll Marquee
   ======================================== */

.clients-section {
    padding: 60px 0;
    background: #f8f9fa;
    overflow: hidden;
}

/* Marquee wrapper - masks edges with fade */
.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* Track holds two copies side by side and scrolls */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 50s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

/* Each copy is a flex row of cards */
.marquee-content {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 12px;
    flex-shrink: 0;
}

/* Keyframes - translate the first copy entirely off-screen left */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Client Card */
.client-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 120px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.client-card:hover {
    border-color: #5b9bd5;
    box-shadow: 0 8px 25px rgba(91, 155, 213, 0.15);
    transform: translateY(-4px);
}

/* Client Logo */
.client-logo {
    max-width: 140px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.client-card:hover .client-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Fallback Name */
.client-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    transition: color 0.3s ease;
}

.client-card:hover .client-name {
    color: #5b9bd5;
}

/* Responsive */
@media (max-width: 768px) {
    .clients-section {
        padding: 40px 0;
    }

    .client-card {
        width: 160px;
        height: 100px;
        padding: 15px;
    }

    .client-logo {
        max-width: 110px;
        max-height: 55px;
    }

    .marquee-track {
        animation-duration: 35s;
    }
}

@media (max-width: 480px) {
    .client-card {
        width: 140px;
        height: 90px;
        padding: 12px;
    }

    .client-logo {
        max-width: 90px;
        max-height: 45px;
    }

    .marquee-content {
        gap: 16px;
    }

    .marquee-track {
        animation-duration: 25s;
    }
}
