:root {
    --font-main: "Inter", sans-serif;
}

/* базовые */

body {
    font-family: var(--font-main);
    color: #0a0a0a;
}

.section {
    padding: 80px 0;
}

a {
    text-decoration: none;
    color: #606060;
    font-weight: 400;
    font-size: 14px;
}

ul {
    color: rgba(96, 96, 96, 1);
}

.clients-wrap {
    background: #eef3f8;
}

.client-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    padding: 32px 16px;
    text-align: center;
    height: 100%;
    font-weight: 400;
}

.client-icon {
    width: 140px;
    height: 140px;
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 10px;
    margin: 0 auto 12px;
    font-weight: 600;
}
.client-icon::after {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    content: attr(data-text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.client-icon img {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    object-fit: cover;
    display: block;
}
.client-icon span {
    width: 100%;
    height: 100%;
    display: block;
    background: #2563eb;
}

.clients-slider {
    position: relative;
}

.clients-viewport {
    overflow: hidden;
}

.clients-track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-columns: calc(25% - 18px);
    gap: 24px;
    transition: transform 0.4s ease;
}

.clients-arrow {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
}

/* ПК + планшет */

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    overflow: hidden;
    transition: transform 0.45s ease;
    will-change: transform;
    min-height: 250px; /* Чтобы не прыгала высота при анимации */
}

#reviewsSwiper {
}

.slider-wrapper {
    position: relative;
}

@media screen and (min-width: 1140px) {
    .swiper-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        grid-auto-flow: column;
    }
}

#reviewsSwiper .swiper-slide {
    height: auto !important;
}

.review-card {
    height: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    color: rgba(54, 65, 83, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.review-card p {
    color: rgba(54, 65, 83, 1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-user {
    display: flex;
    gap: 12px;
    align-items: center;
}

.review-user img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.review-name {
    font-weight: 500;
}

.review-position {
    font-size: 14px;
    color: rgba(74, 85, 101, 1);
}

.review-company {
    font-size: 14px;
    color: #2563eb;
}

.review-stars {
    color: #f5b301;
    letter-spacing: 2px;
}

/* REVIEWS SLIDER */

.reviews-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s ease;
}

.reviews-viewport {
    overflow: hidden;
}

.review-card {
    flex: 0 0 calc(25% - 18px); /* 4 карточки */
}

/* мобильный */

@media (max-width: 768px) {
    .clients-grid {
        transition: opacity 0.2s ease;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        width: 100%;
    }

    .review-card {
        flex: 0 0 100%;
    }
}

@media (max-width: 1140px) and (min-width: 769px) {
    .clients-wrap .carousel-controls {
        display: none;
    }

    .review-card {
        flex: 0 0 calc(50% - 12px);
    }

}

@media (min-width: 1140px) {
    .reviews-viewport {
        overflow: hidden;
    }

    .reviews-track {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 48.8%;
        grid-template-rows: repeat(2, auto);
        gap: 24px;
        transition: transform 0.45s ease;
    }

    .review-card {
        width: 100%;
    }

}

.case-card {
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

.case-card .mtop {
    margin-top: 30px;
}

.text-muted {
    min-height: 48px;
}

.case-content {
    display: flex;
    flex-direction: column;
    flex: 1; /* занимает всю высоту под изображением */
}

.case-status {
    align-self: flex-start; /* или center, если нужно */
}

.case-card small {
    color: rgba(113, 113, 130, 1);
}

.case-img-wrap {
    position: relative;
    padding-top: 81.92%;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.case-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.case-status {
    font-weight: 400 !important;
    line-height: 1.2;
}

.badge,
.badge * {
    font-weight: 400 !important;
    letter-spacing: normal;
}

.badge-place,
.case-status {
    font-weight: 400 !important;
    font-size: 12px;
}

.badge-title {
    max-width: 70%;
    min-height: 32px;
    line-height: 16px;
}

.case-status {
    background: #f5f0e8;
    color: #8f7858;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-place {
    background: rgba(143, 120, 88, 1);
    font-size: 14px;
    padding: 4px 8px;
}

#casesCarousel {
    position: relative;
}

.cases-viewport {
    overflow: hidden;
}

.cases-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s ease;
}

.case-slide {
    flex: 0 0 calc(33.333% - 16px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* disabled arrows */

.carousel-control-prev.disabled,
.carousel-control-prev.swiper-button-disabled,
.carousel-control-next.swiper-button-disabled,
.carousel-control-next.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1);
}

/* чтобы hover не срабатывал */

.carousel-control-prev.disabled:hover,
.carousel-control-next.disabled:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    box-shadow: none;
}

/* планшет */

/* планшет */
@media (max-width: 1140px) {
    .case-slide {
        flex: 0 0 calc(50% - 12px);
    }
}

/* телефон */
@media (max-width: 768px) {
    .case-slide {
        flex: 0 0 100%;
    }
}

.review-user {
    width: 100%;
}

.review-header {
    flex-wrap: wrap;
}

.review-stars {
    margin-bottom: 0;
    margin-top: 40px;
}

/* стрелки */

.carousel-control-prev,
.carousel-control-next {
    position: static !important;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(4px);
    color: rgba(236, 104, 1, 1);
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.15s ease, border-color 0.25s ease;
    transform: none;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.carousel-control-prev:active,
.carousel-control-next:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 104, 1, 0.35);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: none !important;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.clients-rotator {
    position: relative;
}

.clients-grid-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.clients-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* адаптив */

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 1139px) {
    #casesCarousel .carousel-controls {
        margin-top: 24px;
    }
}

@media (min-width: 1230px) {
    .carousel-controls {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        transform: translateY(-50%);
        justify-content: space-between;
        padding: 0 20px;
        pointer-events: none;
    }

    .carousel-control-prev,
    .carousel-control-next {
        pointer-events: auto;
        background: #fff !important;
    }

    .carousel-control-prev {
        margin-left: -100px;
    }

    .carousel-control-next {
        margin-right: -100px;
    }
}