
/* =========================================
   R3S PREMIUM CLIENTS SECTION
========================================= */

.r3s-clients-section {
    position: relative;
    padding: 85px 0;
    background: var(--bg-primary);
    overflow: hidden;
}

/* HEADING */

.clients-heading {
    max-width: 750px;
    margin: 0 auto 48px;
}

.clients-heading h2 {
    margin: 13px 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(30px, 3.5vw, 43px);
    font-weight: 800;
    line-height: 1.2;
}

.clients-heading h2 span {
    color: var(--r3s-primary);
}

.clients-heading p {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.9;
}

/* SLIDER WRAPPER */

.clients-slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    padding: 5px 0;
}

/* SIDE FADE EFFECT */

.clients-slider-wrapper::before,
.clients-slider-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 3;
    pointer-events: none;
}

.clients-slider-wrapper::before {
    left: 0;
    background: linear-gradient(
        to right,
        var(--bg-primary),
        transparent
    );
}

.clients-slider-wrapper::after {
    right: 0;
    background: linear-gradient(
        to left,
        var(--bg-primary),
        transparent
    );
}

/* MARQUEE */

.clients-marquee {
    width: 100%;
    overflow: hidden;
}

.clients-track {
    display: flex;
    width: max-content;
    gap: 18px;
    will-change: transform;
}

/* LOGO GROUP */

.clients-logo-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
}

/* LOGO CARD */

.client-logo-card {
    width: 190px;
    height: 112px;
    flex: 0 0 190px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 13px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.035);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;
}

.client-logo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(221, 3, 17, 0.45);
    box-shadow: 0 12px 30px rgba(221, 3, 17, 0.10);
}

.client-logo-card img {
    display: block;
    width: 100%;
    height: 68px;
    object-fit: contain;

    filter: grayscale(100%);
    opacity: 0.72;

    transition:
        filter 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
}

.client-logo-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ANIMATION */

/* First row: Left to Right */

.clients-marquee-ltr .clients-track {
    animation: clientsMoveLTR 42s linear infinite;
}

/* Second row: Right to Left */

.clients-marquee-rtl .clients-track {
    animation: clientsMoveRTL 42s linear infinite;
}

/* Move first row from left to right */

@keyframes clientsMoveLTR {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Move second row from right to left */

@keyframes clientsMoveRTL {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* PAUSE ON HOVER */

.clients-slider-wrapper:hover .clients-track {
    animation-play-state: paused;
}

/* BOTTOM CTA */

.clients-bottom {
    max-width: 1000px;
    margin: 42px auto 0;
    padding: 24px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;

    transition: border-color 0.3s ease;
}

.clients-bottom:hover {
    border-color: rgba(221, 3, 17, 0.4);
}

.clients-bottom-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clients-bottom-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(221, 3, 17, 0.10);
    border: 1px solid rgba(221, 3, 17, 0.12);
    border-radius: 12px;

    color: var(--r3s-primary);
    font-size: 23px;
}

.clients-bottom-content h3 {
    margin: 0 0 5px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
}

.clients-bottom-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.clients-bottom .r3s-btn {
    flex-shrink: 0;
    min-height: 47px;
    padding: 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* TABLET */

@media (max-width: 991px) {

    .r3s-clients-section {
        padding: 70px 0;
    }

    .client-logo-card {
        width: 165px;
        height: 105px;
        flex-basis: 165px;
        padding: 17px;
    }

    .clients-track,
    .clients-logo-group {
        gap: 14px;
    }

    .clients-slider-wrapper::before,
    .clients-slider-wrapper::after {
        width: 65px;
    }
}

/* MOBILE */

@media (max-width: 767px) {

    .r3s-clients-section {
        padding: 58px 0;
    }

    .clients-heading {
        margin-bottom: 32px;
    }

    .clients-heading h2 {
        font-size: 29px;
    }

    .clients-heading p {
        font-size: 13px;
        padding: 0 8px;
    }

    .clients-slider-wrapper {
        gap: 13px;
    }

    .client-logo-card {
        width: 145px;
        height: 90px;
        flex-basis: 145px;
        padding: 15px;
        border-radius: 11px;
    }

    .client-logo-card img {
        height: 58px;
    }

    .clients-track,
    .clients-logo-group {
        gap: 12px;
    }

    .clients-marquee-ltr .clients-track {
        animation-duration: 34s;
    }

    .clients-marquee-rtl .clients-track {
        animation-duration: 34s;
    }

    .clients-slider-wrapper::before,
    .clients-slider-wrapper::after {
        width: 35px;
    }

    /* CTA */

    .clients-bottom {
        margin-top: 28px;
        padding: 20px 17px;
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .clients-bottom-content {
        gap: 12px;
    }

    .clients-bottom-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .clients-bottom-content h3 {
        font-size: 15px;
    }

    .clients-bottom-content p {
        font-size: 12px;
    }

    .clients-bottom .r3s-btn {
        width: 100%;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {

    .client-logo-card {
        width: 130px;
        height: 82px;
        flex-basis: 130px;
        padding: 12px;
    }

    .client-logo-card img {
        height: 52px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .clients-track {
        animation: none !important;
        transform: none !important;
    }

    .client-logo-card,
    .client-logo-card img,
    .clients-bottom {
        transition: none;
    }
}
