/* Блок «три шага + форма» (CTA) — голубая полоса во всю ширину.
   Подключается партиалом pages/cta_steps.htm */

.cta_steps {
    background: var(--blue3, #e5f2ff);
    padding: 32px 0;
    margin-bottom: 64px;
}

.cta_steps__title {
    text-align: center;
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 32px;
}

.cta_steps__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1122px;
    margin: 0 auto;
}

/* мобильная карточка: номер и иллюстрация в ряд, текст под ними */
.cta_steps__card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
        "num illu"
        "text text";
    column-gap: 16px;
    row-gap: 24px;
    align-items: start;
    padding: 24px;
    border-radius: 16px;
    background: var(--blue1, #5182ff);
}

.cta_steps__num {
    grid-area: num;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fff;
    color: var(--black1, #202225);
    font-family: var(--font_inter);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}

.cta_steps__illu {
    grid-area: illu;
    position: static;
    width: 172px;
    max-width: 100%;
    height: auto;
    justify-self: start;
}

.cta_steps__text {
    grid-area: text;
    margin: 0;
    padding-top: 0;
    font-family: var(--font_roboto_slab);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.3;
    color: #fff;
}

/* белая карточка с формой */
.cta_steps__form {
    max-width: 1122px;
    margin: 32px auto 0;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(32, 34, 37, 0.12);
}

.cta_steps__form .form_colm {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.cta_steps__form .form_colm .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.cta_steps__form .form__input {
    border-radius: 16px;
    border-color: #bcbec2;
}

.cta_steps__form .form__textpolit {
    font-size: 16px;
    line-height: 1.5;
    color: var(--black3, #9d9fa3);
}

.cta_steps__form .form__button {
    width: 100%;
    margin-bottom: 0;
}

@media (min-width: 700px) {
    .cta_steps {
        padding: 60px 0;
        margin-bottom: 96px;
    }

    .cta_steps__title {
        font-size: 32px;
    }

    .cta_steps__cards {
        gap: 24px;
    }

    .cta_steps__form {
        padding: 24px;
    }

    .cta_steps__form .form_colm .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 16px;
        align-items: start;
    }

    .cta_steps__form .form_colm .colm2 {
        grid-column: 1 / span 2;
        grid-row: 2;
        align-self: start;
    }

    .cta_steps__form .form_colm .form__button {
        grid-column: 3;
        grid-row: 2;
        justify-self: stretch;
        max-width: none;
        align-self: start;
    }
}

@media (min-width: 992px) {
    .cta_steps__cards {
        grid-template-columns: repeat(3, 1fr);
    }

    /* десктоп: карточка в столбик, иллюстрация в правом верхнем углу */
    .cta_steps__card {
        display: flex;
        flex-direction: column;
        min-height: 332px;
    }

    .cta_steps__illu {
        position: absolute;
        top: 24px;
        right: 24px;
        width: 212px;
    }

    .cta_steps__text {
        margin: auto 0 0;
        padding-top: 24px;
        line-height: 1.45;
    }
}

@media (min-width: 1180px) {
    .cta_steps {
        margin-bottom: 120px;
    }
}

/* планшет (768): две карточки в ряд, третья на всю ширину, форма в один столбец */
@media (min-width: 700px) and (max-width: 991px) {
    .cta_steps {
        padding: 48px 0 96px;
        margin-bottom: 96px;
    }

    .cta_steps__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .cta_steps__card {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas: "num illu" "text text";
        column-gap: 16px;
        row-gap: 24px;
        align-items: start;
        min-height: 285px;
    }

    .cta_steps__num {
        grid-area: num;
    }

    .cta_steps__illu {
        grid-area: illu;
        position: static;
        width: 186px;
        max-width: 100%;
        justify-self: start;
    }

    .cta_steps__text {
        grid-area: text;
        margin: 0;
        padding-top: 0;
        line-height: 1.3;
    }

    .cta_steps__card:last-child {
        grid-column: 1 / -1;
        min-height: 254px;
    }

    .cta_steps__form {
        margin-top: 32px;
    }

    .cta_steps__form .form_colm .grid {
        grid-template-columns: 1fr;
        row-gap: 16px;
        column-gap: 16px;
        align-items: stretch;
    }

    .cta_steps__form .form_colm .colm2 {
        grid-column: auto;
        grid-row: auto;
        align-self: start;
        margin-bottom: 8px;
    }

    .cta_steps__form .form_colm .form__button {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        max-width: none;
        justify-self: stretch;
        align-self: start;
    }
}
