/* ============================================================
   УСЛУГИ КЛИНИКИ — блок на главной
   ============================================================ */

.services {
    background: linear-gradient(#fff 0%, var(--surface-soft) 100%);
    padding: var(--space-section) var(--space-inline);
}

/* ---------- Заголовок секции ---------- */
.services__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 60px;
    max-width: 1220px;
    margin: 0 auto 44px;
}

.services__title {
    margin: 12px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: var(--fs-h1);
    line-height: 1.13;
    letter-spacing: -.025em;
    color: var(--ink, var(--text-primary));
}

.services__title em {
    color: var(--blue, var(--accent));
    font-style: normal;
    font-weight: 400;
}

.services__lead {
    max-width: 470px;
    margin: 0 0 5px;
    color: var(--muted, var(--text-muted));
    font-size: var(--fs-body);
    line-height: 1.8;
}

/* ============================================================
   СЕТКА КАРТОЧЕК
   ============================================================ */

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1220px;
    margin: 0 auto;
}

/* ---------- Карточка ---------- */
.services__card {
    display: flex;
    flex-direction: column;
    min-height: 520px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    color: var(--ink, var(--text-primary));
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(8, 40, 72, .07);
    transition: transform .35s, box-shadow .35s, border-color .35s;
}

.services__card:hover {
    border-color: #a9d3f8;
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(8, 48, 88, .15);
}

/* ---------- Фото ---------- */
.services__image {
    position: relative;
    flex: 0 0 224px;
    height: 224px;
    background-color: var(--dark-bg);
    background-position: 50% 12%;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.services__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0) 58%, rgba(5, 35, 66, .08));
    pointer-events: none;
}

/* Номер карточки в углу фото */
.services__num {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    font-size: var(--fs-micro);
    font-weight: 700;
    letter-spacing: .08em;
    background: rgba(5, 38, 72, .65);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ---------- Текст карточки ---------- */
.services__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 23px 23px;
}

.services__kicker {
    color: var(--blue, var(--accent));
    font-size: var(--fs-nano);
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.services__card-title {
    margin: 10px 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: var(--fs-h4);
    line-height: 1.14;
    letter-spacing: -.015em;
    color: var(--ink, var(--text-primary));
}

.services__card-text {
    margin: 0 0 22px;
    color: var(--muted, var(--text-muted));
    font-size: var(--fs-small);
    line-height: 1.65;
}

/* ---------- Кнопка «Подробнее» ---------- */
.services__more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    min-height: 42px;
    margin-top: auto;
    padding: 0 21px;
    color: #fff;
    font-size: var(--fs-micro);
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 999px;
    background: linear-gradient(110deg,
        var(--accent-darkest) 0%,
        var(--accent-on-dark) 28%,
        var(--accent-on-dark-soft) 48%,
        var(--accent) 70%,
        var(--accent-darkest) 100%) 0 0 / 240% 100%;
    box-shadow: 0 9px 22px var(--accent-glow-soft);
    animation: servicesButtonFlow 4s linear infinite;
}

.services__more i {
    font-size: 15px;
    font-style: normal;
    transition: transform .25s;
}

.services__card:hover .services__more i {
    transform: translateX(4px);
}

@keyframes servicesButtonFlow {
    from { background-position: 240% 0; }
    to   { background-position: 0 0; }
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1100px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services__card {
        min-height: 490px;
    }
}

@media (max-width: 900px) {
    .services__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .services__lead {
        max-width: 640px;
    }
}

@media (max-width: 760px) {
    .services__head {
        margin-bottom: 30px;
    }

    .services__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .services__card {
        min-height: 0;
    }

    .services__image {
        flex-basis: 210px;
        height: 210px;
    }

    .services__text {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .services__card,
    .services__more {
        animation: none !important;
        transition: none !important;
    }
}