/* ========== CLIENT LOGOS ========== */
.clients-reference {
    position: relative;
    isolation: isolate;
    padding: 60px 0 45px;
    overflow: hidden;
    background: #ffffff;
}

.clients-reference,
.clients-reference * {
    box-sizing: border-box;
}

.clients-reference::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(
        to top,
        transparent 0%,
        rgb(34 128 186 / 3%) 10%,
        rgb(48 164 237 / 8%) 28%,
        rgb(48 164 237 / 4%) 50%,
        transparent 85%
    );
    pointer-events: none;
}

.clients-reference .cs-team-header {
    max-width: 900px;
    margin: 0 auto 24px;
    text-align: center;
}

/* ================= LOGO STAGE ================= */
.clients-reference__stage {
    /* Adjust these values to change card size and spacing. */
    --card-width: 150px;
    --card-height: 120px;
    --card-gap: 22px;
    --edge-fade: 65px;
    position: relative;
    height: 196px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        #000 var(--edge-fade),
        #000 calc(100% - var(--edge-fade)),
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        #000 var(--edge-fade),
        #000 calc(100% - var(--edge-fade)),
        transparent
    );
}

.clients-reference__card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--card-width);
    height: var(--card-height);
}

.clients-reference__tile {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    border: 1px solid #e5eef1;
    border-radius: 15px;
    background: #ffffff;
    box-shadow:
        0 3px 4px rgb(0 0 0 / 3%),
        0 10px 20px rgb(30 70 95 / 8%);
}

.clients-reference__tile img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    opacity: 1;
    filter: none;
}

.clients-reference__stage:focus-visible {
    outline: 2px solid #0870af;
    outline-offset: -3px;
    border-radius: 12px;
}

/* ================= GOOGLE RATING ================= */
.clients-reference__rating-wrap {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding: 0 12px;
}

.clients-reference__rating {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    padding: 13px 20px;
    border: 1px solid #e1edf3;
    border-radius: 50px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgb(30 70 95 / 4%);
}

.clients-reference__google {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.clients-reference__google svg {
    display: block;
}

.clients-reference__score {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #393939;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.clients-reference__score > span {
    color: #e9a817;
    font-size: 17px;
}

.clients-reference__rating-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 22px;
    background: #e2eaf0;
}

.clients-reference__review-text {
    color: #74787b;
    font-size: 16px;
    line-height: 1.6;
}

.clients-reference__review-text strong {
    color: #393939;
    font-weight: 600;
}

/* ================= MOBILE ================= */
@media (max-width: 767.98px) {
    .clients-reference {
        padding: 40px 0 30px;
    }

    .clients-reference .cs-team-header {
        margin-bottom: 16px;
    }

    .clients-reference__stage {
        --card-width: 110px;
        --card-height: 90px;
        --card-gap: 16px;
        --edge-fade: 35px;
        height: 170px;
    }

    .clients-reference__tile {
        padding: 6px;
        border-radius: 12px;
    }

    .clients-reference__rating-wrap {
        margin-top: 5px;
    }

    .clients-reference__rating {
        gap: 9px;
        padding: 11px 15px;
    }

    .clients-reference__score {
        font-size: 17px;
    }

    .clients-reference__review-text {
        font-size: 13px;
    }
}

@media (max-width: 359.98px) {
    .clients-reference__rating {
        border-radius: 16px;
    }

    .clients-reference__rating-divider {
        display: none;
    }

    .clients-reference__review-text {
        flex-basis: 100%;
        text-align: center;
    }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
    .clients-reference__stage {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 18px;
        height: auto;
        padding: 20px 0;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .clients-reference__card {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: var(--card-height);
        will-change: auto;
    }
}
