.clients-section {
    padding: 1rem 10% 6rem 10%; /* Increased Side Padding */
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.clients-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1000px; /* Constricted focal width */
    margin: 0 auto; /* Center horizontal */
}

.clients-text {
    flex: 0 0 30%;
    /* Takes up roughly 30% of width */
}

.clients-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.clients-logos-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    min-height: calc(70px + 2rem);
    /* Reserved height to prevent CLS */
    display: flex;
    align-items: center;
    /* Mask for fade effect on sides if scrolling, or just layout */
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

.clients-logos {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    /* Ensure width fits all logos for smooth scrolling */
    animation: scroll 20s linear infinite;
}

.clients-logos:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.client-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

.client-logo {
    height: 70px;
    width: auto;
    opacity: 0.6;
    transition: transform 0.3s ease, font-size 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    filter: grayscale(100%);
    cursor: pointer;
    background: #f8f9fa;
    /* Placeholder background to reserve width */
}

/* Hover on image OR parent link */
.client-logo:hover,
.client-link:hover .client-logo {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .clients-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        overflow: hidden;
        /* Ensure container doesn't scroll page */
    }

    .clients-text {
        flex: 1;
        width: 100%;
        margin-bottom: 1rem;
    }

    .clients-logos-wrapper {
        width: 100%;
        /* Full width */
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
        /* Fade edges */
        mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    }

    .clients-logos {
        flex-wrap: nowrap;
        /* Force single row */
        gap: 3rem;
        justify-content: flex-start;
        width: max-content;
        animation: scroll 8s linear infinite;
        /* Faster scroll (8s) */
    }

    .client-logo {
        height: 70px;
        /* Default mobile height */
        opacity: 0.4;
        /* Faded by default */
        filter: grayscale(100%);
        transition: all 0.3s ease;
        /* fast transition for scroll */
        transform: scale(0.9);
    }

    .client-logo.active {
        opacity: 1;
        filter: grayscale(0%);
        transform: scale(1.1);
        /* Pop effect */
    }
}

/* =========================================
   MOBILE LAYOUT OPTIMIZER (320px - 480px)
   ========================================= */
@media (max-width: 480px) {
    .clients-logos {
        gap: 24px !important;
        /* Visual consistency */
    }

    .client-logo {
        height: 80px !important;
        /* Bigger logos */
        width: auto !important;
        max-width: none !important;
        /* Prevent squishing */
    }
}