/* ===========================
   БЛОК "НАМ ДОВЕРЯЮТ"
   =========================== */

.clients {
    background: transparent;
    width: 100%;
    max-width: 100%;
}

.clients-header {
    text-align: center;
    margin-bottom: 16px;
}

.clients-subtitle {
    text-align: center;
    font-size: 15px;
    color: black;
    max-width: 360px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.city {
    color: rgba(244, 122, 31, 1);
    font-weight: 600;
}

.clients-note {
    text-align: center;
    margin-top: 28px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #000;
}

/* Сетка */
.clients-grid {
    display: grid;
    grid-template-columns: minmax(0, 645fr) repeat(2, minmax(0, 308fr));
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(12px, 2.5vw, 34px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 600px;
}

/* Общие стили карточек */
.client-card {
    position: relative;                /* для ::before */
    background: rgba(46, 46, 46, 1);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-weight: 700;
    color: var(--text-light);
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;                  /* чтобы номер не вылезал */
}

/* Большая карточка */
.client-card.large {
    grid-column: 1;
    grid-row: 1 / 4;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.client-card-epigraph {
    position: absolute;
    inset: 0;
    display: flex;
    top: -15px;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 12px;
    font-size: 153px;
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.03em;
    text-align: center;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.05);
    user-select: none;
}

/* Текст профессии */
.client-text {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    position: relative;
    z-index: 1; /* поверх номера */
}

/* ===========================
   НУМЕРАЦИЯ НА ФОНЕ
   =========================== */

.client-card--num-01::before,
.client-card--num-02::before,
.client-card--num-03::before,
.client-card--num-04::before,
.client-card--num-05::before,
.client-card--num-06::before {
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 200px;
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
    user-select: none;
}

.client-card--num-01::before { content: "01"; }
.client-card--num-02::before { content: "02"; }
.client-card--num-03::before { content: "03"; }
.client-card--num-04::before { content: "04"; }
.client-card--num-05::before { content: "05"; }
.client-card--num-06::before { content: "06"; }

/* ПК: ритм и акценты как в services */
@media (min-width: 901px) {
    .clients-subtitle {
        font-size: clamp(14px, calc(14px + 4 * (100vw - 420px) / 1020), 18px);
        font-weight: 500;
        letter-spacing: 0.12em;
        max-width: none;
    }

    .client-card {
        border-radius: var(--radius-lg);
        border: 1px solid rgba(0, 0, 0, 0.2);
        align-items: flex-start;
        justify-content: flex-start;
        padding: 40px 28px 28px;
    }

    .client-card::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 45%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
        pointer-events: none;
        z-index: 0;
    }

    .client-card--num-01::before,
    .client-card--num-02::before,
    .client-card--num-03::before,
    .client-card--num-04::before,
    .client-card--num-05::before,
    .client-card--num-06::before {
        top: auto;
        bottom: 10px;
        left: auto;
        right: 15px;
        transform: none;
        font-size: 100px;
        color: rgba(255, 255, 255, 0.06);
    }

    .client-text {
        font-size: clamp(22px, calc(20px + 0.59vw), 28px);
        font-weight: 500;
        text-align: left;
        line-height: 1.25;
        max-width: 72%;
        color: #fff;
    }

    .client-card.large {
        border-color: rgba(0, 0, 0, 0.2);
        padding: 0;
        align-items: stretch;
        justify-content: center;
    }

    .client-card.large::after {
        width: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06));
        border-radius: var(--radius-lg);
    }

    .client-card-epigraph {
        font-size: var(--client-epigraph-font-size);
        align-items: center;
        top: 0;
    }
}

/* Мобилка: как на ПК, все карточки тёмные */
@media (max-width: 900px) {
    .clients-subtitle {
        font-size: clamp(14px, calc(14px + 4 * (100vw - 420px) / 1020), 18px);
        font-weight: 500;
        letter-spacing: 0.12em;
        margin-bottom: 24px;
        max-width: none;
    }

    .clients-note {
        margin-top: 20px;
        padding: 0 2px;
    }

    .client-card:not(.large) {
        width: 100%;
        max-width: 390px;
        min-height: 120px;
        margin-left: auto;
        margin-right: auto;
        background: rgba(46, 46, 46, 1);
        border-radius: var(--radius-lg);
        border: 1px solid rgba(0, 0, 0, 0.2);
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px 20px 20px;
    }

    .client-card::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 45%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
        pointer-events: none;
        z-index: 0;
    }

    .client-card--num-01::before,
    .client-card--num-02::before,
    .client-card--num-03::before,
    .client-card--num-04::before,
    .client-card--num-05::before,
    .client-card--num-06::before {
        top: auto;
        bottom: 8px;
        left: auto;
        right: 17px;
        transform: none;
        font-size: 64px;
        color: rgba(255, 255, 255, 0.06);
    }

    .client-text {
        font-size: clamp(18px, calc(16px + 1.2vw), 22px);
        font-weight: 500;
        text-align: left;
        line-height: 1.3;
        max-width: 72%;
        color: #fff;
    }

    .client-card.large {
        border: 1px solid rgba(0, 0, 0, 0.2);
        padding: 0;
        align-items: stretch;
        justify-content: center;
    }

    .client-card.large::after {
        width: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06));
        border-radius: var(--radius-lg);
    }
}

/* ===========================
   Интерактивная команда: картинка слева + кнопки справа
   =========================== */
.client-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    z-index: 2;
}
.client-card.large.has-image .client-card-epigraph,
.client-card.large.has-image::after {
    opacity: 0;
}

/* Карточки-кнопки специальностей */
button.client-card {
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: inherit;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
/* Ховер — лишь слегка затемняем тёмную карточку, текст остаётся читаемым */
.client-card[data-team-image]:not(.is-active):hover {
    background: rgba(34, 34, 32, 1);
}
.client-card.is-active {
    background: var(--orange);
}
.client-card.is-active .client-text {
    color: #fff;
}
.client-card.is-active::before {
    color: rgba(255, 255, 255, 0.16);
}

/* Мобилка: только текстовые блоки — без большой картинки и без интерактива */
@media (max-width: 900px) {
    .client-card.large {
        display: none;
    }
    button.client-card {
        cursor: default;
    }
    .client-card[data-team-image]:hover,
    .client-card.is-active {
        background: rgba(46, 46, 46, 1);
    }
    .client-card.is-active .client-text {
        color: #fff;
    }
}
