.services {
    background: #FCF5FC;
    position: relative;
}

.services__content {
    position: relative;
    z-index: 2;
}

.services__header {
    margin-bottom: 0;
}

.services__title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 55px;
    line-height: 64px;
    color: #5C075E;
    margin-bottom: 30px;
}


.services__description {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 30px;
    color: #5C075E;
    max-width: 900px;
    margin-bottom: 50px;
}

.page-slug-uslugi .services__header {
    margin-bottom: 80px;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

/* Зуб скрыт по умолчанию — показывается только на планшете */
.services__tooth {
    display: none;
}

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

/* ── TABLET (577px – 1024px) ──────────────────────────────────────── */
@media (min-width: 577px) and (max-width: 1024px) {

    .services__title {
        font-size: clamp(26px, 3.5vw, 40px);
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .services__description {
        font-size: clamp(12px, 1.6vw, 16px);
        line-height: 1.55;
        margin-bottom: 35px;
        max-width: 100%;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }

    .services__card {
        min-height: 293px;
    }

    .services__card-title {
        font-size: clamp(18px, 2.5vw, 26px);
    }

    /* CTA — обычная карточка как остальные, без span */
    .services__cta {
        grid-column: span 1;
        min-height: 293px;
    }

    .services__cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .services__cta-button {
        flex: none;
    }

    /* Зуб — absolute поверх сетки, только на планшете */
    .services__content {
        position: relative;
    }

    .services__tooth {
        display: block;
        position: absolute;
        width: 274px;
        height: 290px;
        right: -40px;
        top: 599px;
        pointer-events: none;
        z-index: 0;
    }
}

/* ── MOBILE (≤ 576px) ────────────────────────────────────────────── */
@media (max-width: 576px) {

    .services__title {
        font-size: 24px;
        line-height: 27px;
        margin-bottom: 10px;
    }

    .services__description {
        font-size: 12px;
        line-height: 18px;
        margin-bottom: 25px;
        max-width: 100%;
    }

    /* Горизонтальный скролл со snap + peek следующей карточки */
    .services__grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        margin-bottom: 0;
        padding-bottom: 8px;
        margin-right: -20px;
        padding-right: 60px;
        scrollbar-width: none;
        box-sizing: border-box;
    }

    .services__grid::-webkit-scrollbar {
        display: none;
    }

    .services__card {
        flex: 0 0 calc(100% - 32px);
        width: calc(100% - 32px);
        min-height: 293px;
        scroll-snap-align: start;
        padding: 20px 16px;
        border-radius: 15px;
    }

    .services__card-title {
        font-size: 18px;
        line-height: 25px;
        margin-bottom: 12px;
    }

    .services__card-image-wrap {
        width: 130px;
        height: 130px;
    }

    /* CTA — такая же карточка в горизонтальном ряду */
    .services__cta {
        flex: 0 0 calc(100% - 32px);
        width: calc(100% - 32px);
        min-height: 293px;
        scroll-snap-align: start;
        border-radius: 15px;
        padding: 20px 16px;
    }

    .services__cta-content {
        margin-top: 0;
    }

    .services__cta-title {
        font-size: 18px;
        line-height: 25px;
    }

    .services__cta-description {
        font-size: 12px;
        line-height: 18px;
    }

    .services__cta-button {
        height: 36px;
        font-size: 12px;
        border-radius: 8px;
    }

    .services::after {
        display: none;
    }
}

.services__card {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(42.2px);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    min-height: 409px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(141, 42, 143, 0.15);
}

.services__card-label {
    display: inline-block;
    background: rgba(252, 245, 252, 1);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #5C075E;
    margin-bottom: 12px;
    width: fit-content;
}

.services__card-title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 100%;
    color: #5C075E;
    margin-bottom: 16px;
}

.services__list {
    margin: 0;
    padding: 0;
    list-style: none;
    margin-bottom: 20px;
}

.services__list-item {
    margin-bottom: 6px;
}

.services__list-item:last-child {
    margin-bottom: 0;
}

.services__list-link {
    display: inline-flex;
    align-items: flex-start;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 30px;
    color: #5C075E;
    text-decoration: none;
    transition: color 0.2s ease;
}

.services__list-link::before {
    content: "•";
    margin-right: 6px;
    font-size: 16px;
    line-height: 30px;
}

.services__list-link:hover {
    color: #8D2A8F;
}

.services__card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 3;
}

.services__card-more-text {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #8E468F;
    margin-top: 17px;
}

.services__card-more {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.services__card-more:hover {
    transform: translate(2px, -2px);
}

.services__card-arrow {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.services__card-image-wrap {
    position: absolute;
    bottom: 0;
    right: -1px;
    width: 137px;
    height: 141px;
    pointer-events: none;
    z-index: 1;
}

.services__card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
}

.services__cta {
    background: rgba(141, 42, 143, 1);
    backdrop-filter: blur(42.2px);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.services__cta-content {
    flex: 1;
    margin-top: -20px;
}

.services__cta-title {
    font-family: Manrope, sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 100%;
    color: #FEFAFF;
    margin-bottom: 12px;
}

.services__cta-description {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 25px;
    color: #FFF;
}

.services__cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.services__cta-button {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.services__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.services__cta-button--primary {
    background: linear-gradient(180deg, #DA81DB 0%, #A642A8 100%);
    color: #fff;
}

.services__cta-button--secondary {
    background: #FEFAFF;
    color: #8D2A8F;
}

/* ── USLUGI PAGE: TABLET ──────────────────────────── */
@media (max-width: 1024px) {
    .page-slug-uslugi .services__header {
        margin-bottom: 50px;
    }

    .page-slug-uslugi .services__title {
        font-size: 34px;
        line-height: 46px;
        margin-bottom: 0;
    }

    .page-slug-uslugi .services__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .page-slug-uslugi .services__card {
        min-height: 293px;
        border-radius: 20px;
    }

    .page-slug-uslugi .services__card-title {
        font-size: 18px;
        line-height: 25px;
    }

    .page-slug-uslugi .services__card-label {
        font-size: 12px;
        padding: 4px 10px;
    }

    .page-slug-uslugi .services__list-link {
        font-size: 14px;
        line-height: 22px;
    }

    .page-slug-uslugi .services__list-link::before {
        font-size: 14px;
        line-height: 22px;
    }

    .page-slug-uslugi .services__cta {
        grid-column: span 1;
        min-height: 293px;
        border-radius: 20px;
    }
}

/* ── USLUGI PAGE: MOBILE ──────────────────────────── */
@media (max-width: 576px) {
    .page-slug-uslugi .services__header {
        margin-bottom: 25px;
    }

    .page-slug-uslugi .services__title {
        font-size: 24px;
        line-height: 27px;
        margin-bottom: 0;
    }

    .page-slug-uslugi .services__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        overflow-x: visible;
        scroll-snap-type: none;
        margin-right: 0;
        padding-right: 0;
        padding-bottom: 0;
    }

    .page-slug-uslugi .services__card {
        flex: none;
        width: 100%;
        min-height: 293px;
        border-radius: 15px;
        scroll-snap-align: unset;
    }

    .page-slug-uslugi .services__card-title {
        font-size: 18px;
        line-height: 25px;
    }

    .page-slug-uslugi .services__card-label {
        font-size: 12px;
        padding: 4px 10px;
    }

    .page-slug-uslugi .services__list-link {
        font-size: 14px;
        line-height: 22px;
    }

    .page-slug-uslugi .services__list-link::before {
        font-size: 14px;
        line-height: 22px;
    }

    .page-slug-uslugi .services__cta {
        flex: none;
        width: 100%;
        min-height: 293px;
        border-radius: 15px;
        scroll-snap-align: unset;
    }
}