.floating-cards {
    background: rgba(224,229,237,1);
}

.floating-cards__bg {
    position: relative;
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
}

.floating-cards__bg-img {
    width: 100%;
    height: 839px;
    object-fit: cover;
    display: block;
}


.floating-cards__text {
    position: absolute;
    top: calc(100% - 410px);
    left: 50%;
    transform: translateX(-50%);
    max-width: 820px;
    text-align: center;
    padding: 0 20px;
    z-index: 2;
}

.floating-cards__title {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 49px;
    color: rgba(255,240,240,1);
    margin: 0 0 16px;
}

.floating-cards__description {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255,240,240,1);
    margin: 0;
}

.floating-cards__cards {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    z-index: 2;
}

.floating-cards__card {
    width: 270px;
    min-height: 187px;
    background: rgba(255,255,255,0.8);
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.floating-cards__card-title {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 25px;
    color: rgba(31,79,206,1);
}

.floating-cards__card-text {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: rgba(27,27,27,1);
    margin: 0;
}

/* ── ПЛАНШЕТ (641px – 1024px) ───────────────────────────── */
@media (max-width: 1024px) {

    .floating-cards__bg-img {
        height: 720px;
    }

    .floating-cards__text {
        top: calc(100% - 550px);
        max-width: 700px;
    }

    .floating-cards__title {
        font-size: 28px;
        line-height: 35px;
        margin-bottom: 12px;
    }

    .floating-cards__description {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
    }

    .floating-cards__cards {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 20px;
        bottom: 40px;
        width: calc(100% - 60px);
    }

    .floating-cards__card {
        width: 216px;
        flex-shrink: 0;
        min-height: 151px;
        padding: 16px;
    }

    .floating-cards__card-title {
        font-size: 16px;
        line-height: 20px;
    }

    .floating-cards__card-text {
        font-size: 12px;
        line-height: 18px;
    }
}

/* ── МОБИЛЬНЫЙ (≤640px) ─────────────────────────────────── */
@media (max-width: 640px) {

    /* Секция — скруглённый контейнер с картинкой как фоном */
    .floating-cards {
        margin-left: 16px;
        margin-right: 16px;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
    }

    /* Картинка — абсолютный фон всего блока */
    .floating-cards__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        overflow: hidden;
        z-index: 0;
    }

    .floating-cards__bg-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Оверлей тоже растягивается на весь блок */
    .floating-cards__overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(
                180deg,
                rgba(0, 0, 0, 0.45) 0%,
                rgba(0, 20, 60, 0.65) 100%
        );
        display: block;
    }

    /* Контент поверх фона */
    .floating-cards .container {
        position: relative;
        z-index: 1;
        padding-left: 20px;
        padding-right: 20px;
    }

    .floating-cards__text {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        max-width: 100%;
        padding: 28px 0 20px;
        text-align: left;
    }

    .floating-cards__title {
        font-size: 22px;
        line-height: 29px;
        margin-bottom: 10px;
        color: rgba(255,240,240,1);
    }

    .floating-cards__description {
        font-size: 12px;
        font-weight: 700;
        line-height: 1.5;
        color: rgba(255,240,240,1);
    }

    /* Карточки — вертикальный стек, полупрозрачные */
    .floating-cards__cards {
        position: relative;
        bottom: auto;
        top: auto;
        left: auto;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 12px;
        padding-bottom: 28px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .floating-cards__card {
        width: 100%;
        min-height: unset;
        padding: 16px 20px;
        background: rgba(255,255,255,0.75);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border-radius: 15px;
        gap: 8px;
    }

    .floating-cards__card-title {
        font-size: 16px;
        line-height: 20px;
        margin-bottom: 8px;
        display: block;
    }

    .floating-cards__card-text {
        font-size: 12px;
        line-height: 18px;
        margin: 0;
    }
}