.services {
    padding: 0 24px 120px;
    font-family: "Manrope", sans-serif;
}

.services,
.services * {
    box-sizing: border-box;
}

.services__container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.services__card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    grid-column: span 2;
    min-width: 0;
    min-height: 260px;
    padding: 32px;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px -8px rgb(15 58 140 / 16%);
    transition: box-shadow 0.2s;
}

.services__card:nth-child(4),
.services__card:nth-child(5) {
    grid-column: span 3;
}

.services__card:hover,
.services__card:focus-within {
    box-shadow:
        0 32px 80px -4px rgb(15 58 140 / 16%),
        0 8px 20px -8px rgb(15 58 140 / 16%);
}

/* Изображение справа */

.services__picture {
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    width: 55%;
    max-width: 302px;
    height: 261px;
    pointer-events: none;
}

.services__card:nth-child(4) .services__picture,
.services__card:nth-child(5) .services__picture {
    max-width: 392px;
}

.services__picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
}

/* Название */

.services__title {
    margin: 0;
    color: #242f3a;
    font-size: 24px;
    font-weight: 600;
    line-height: 40px;
}

/* Цена и кнопка */

.services__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: auto;
    padding-top: 64px;
}

.services__price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #3f444a;
    font-size: 16px;
    line-height: 24px;
}

.services__price strong {
    font-size: 20px;
    font-weight: 600;
}

.services__button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 8px 8px 20px;
    border-radius: 40px;
    background: #09204b;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.services__button:hover {
    background: #15386d;
    color: #fff;
}

.services__button:focus-visible {
    outline: 2px solid #376cb6;
    outline-offset: 4px;
}

.services__button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
}

.services__button-icon img {
    display: block;
    width: 20px;
    height: 20px;
}

/* Планшет */

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

    .services__card,
    .services__card:nth-child(4),
    .services__card:nth-child(5) {
        grid-column: auto;
    }

    .services__card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .services__title {
        max-width: 75%;
        font-size: 22px;
        line-height: 30px;
    }

    .services__picture {
        width: 50%;
    }
}

/* Телефон */
@media (max-width: 700px) {
    .services {
        padding: 40px 12px 64px;
    }

    .services .services__container-title {
        display: block;
        max-width: 320px;
        margin: 0 auto 28px;
        font-size: clamp(21px, 6.4vw, 24px);
        line-height: 1.15;
        text-wrap: balance;
    }

    .services__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .services__card {
        min-height: 172px;
        padding: 20px;
        border-radius: 12px;
    }

    .services__title {
        max-width: 62%;
        font-size: clamp(16px, 5.1vw, 20px);
        line-height: 1.2;
    }

    .services__card .services__picture {
        top: 0;
        right: 0;
        bottom: 0;
        width: 47%;
        max-width: none;
        height: 100%;
    }

    .services__bottom {
        gap: 8px;
        padding-top: 12px;
    }

    .services__price {
        gap: 4px;
        font-size: 12px;
        line-height: 20px;
    }

    .services__price strong {
        font-size: 16px;
        font-weight: 500;
    }

    .services__button {
        min-height: 32px;
        gap: 8px;
        padding: 4px 4px 4px 12px;
        font-size: 13px;
        line-height: 16px;
    }

    .services__button-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 350px) {
    .services__card { padding: 16px; }
    .services__button { font-size: 12px; }
}
