.first-screen__block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.first-screen__back {
    overflow: hidden;
}

.first-screen__group {
    display: flex;
    justify-content: end;
}

.first-screen__group-text__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    padding: 0;
    margin: 0;
}

h4.first-screen__group-text,
.first-screen__group-text__list-item.h4 {
    color: #FFFFFF;
}

.first-screen__group-text__list {
    position: relative;
    min-width: 326px;
}

.first-screen__group-text__list-item {
    margin: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.first-screen__row-heading__text {
    line-height: 110%;
    width: fit-content;
    margin-bottom: -1px;
    border-top-right-radius: 20px;
    position: relative;

}

.first-screen__row-heading__text:last-child {
    padding-bottom: 10px;
}

.first-screen__row-heading__text::after,
.first-screen__row-heading::before {
    content: '';
    display: flex;
    flex-shrink: 0;
    position: absolute;
    bottom: 0;
}

.first-screen__row-heading__text::after {
    background: url("/wp-content/uploads/2025/07/fselement.svg") center/cover no-repeat;
}

.first-screen__row-heading {
    position: relative;
}

.first-screen__row-heading::before {
    background: url("/wp-content/uploads/2025/07/fsel.svg") center/cover no-repeat;
    top: 0;
    left: 0;
}

.first-screen__row-link__item {
    max-width: 216px;
    max-height: 150px;
    background: #ECF0F4;
    padding: 14px 30px;
    border-radius: 14px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: -11px;
    padding-bottom: 0;
}

.first-screen__row-link__item-title {
    font-size: 18px;
    line-height: 100%;
    margin-bottom: 14px;
}

.first-screen__row-link__item-img {
    width: 156px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    height: 86px;
}

.first-screen__row-link__button {
    height: 66px;
    padding: 17px 20px;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.first-screen__row-link__button-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 11px;
    justify-content: center;
}

.first-screen__row-link__button-item::before {
    content: '';
    background: url("/wp-content/uploads/2025/07/dots.svg") center/cover no-repeat;
    display: flex;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.first-screen__row-link__button-item svg {
    width: 14px;
    height: 14px;
}

.first-screen__button {
    font-size: 15px;
}

.first-screen__group .first-screen__group-text {
    opacity: 0;
    transform: translateX(-100px);
    transition: all ease 0.5s;
}

.first-screen__group .first-screen__group-text__list-item {
    opacity: 0.4;
    transition: all ease 0.5s;
}

.first-screen__group.first-screen__group-active .first-screen__group-text {
    opacity: 1;
    transform: translateX(0px);
    transition: all ease 0.5s;
}

.first-screen__group.first-screen__group-active .first-screen__group-text__list-item {
    opacity: 1;
    transition: all ease 0.5s;
}

.first-screen__groups {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media screen and (min-width: 1200px){
    .first-screen__row-heading__text {
        font-size: 60px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1199.98px) {
    .first-screen__row-heading__text {
        font-size: 55px;
    }

}

@media screen and (min-width: 1024px) {
    .first-screen__row {
        display: flex;
        align-items: end;
        justify-content: space-between;
    }

    .first-screen__block {
        padding: 30px;
        min-height: 620px;
    }

    .first-screen__back {
        border-radius: 20px;
    }

    .first-screen__group {
        gap: 10px;
        padding-right: 21px;
    }


    .first-screen__group-text__list {
        font-size: 30px;
        line-height: 33px; /* Для правильного вирівнювання тексту */
    }


    .first-screen__row-heading__text {
        padding-left: 30px;
        padding-right: 40px;
        padding-top: 11px;
    }

    .first-screen__row-heading {
        margin-bottom: -30px;
        margin-left: -30px;
    }

    .first-screen__row-heading__text::after,
    .first-screen__row-heading::before {
        width: 24px;
        height: 24px;
    }

    .first-screen__row-heading__text::after {
        right: -23px;
    }

    .first-screen__row-heading::before {
        top: -23px;
    }

    .first-screen__groups {
        margin-bottom: 104px;
    }
}


@media screen and (max-width: 1023.98px) {
    .first-screen__block {
        padding: 23px 15px;
        min-height: 400px;
    }

    .first-screen__back {
        border-radius: 16px;
        min-height: 400px;
    }

    .first-screen__group {
        gap: 5px;
    }

    .first-screen__group-text__list {
        font-size: 16px;
    }

    .first-screen__row-heading__text {
        font-size: 32px;
        padding: 0 12px;
        padding-top: 11px;
        letter-spacing: -1px;
    }

    .first-screen__row-heading {
        margin-left: -15px;
        margin-bottom: -23px;
    }

    .first-screen__row-heading__text::after {
        width: 18px;
        height: 18px;
        right: -17px;
    }

    .first-screen__row-heading::before {
        width: 18px;
        height: 18px;
        top: -17px;
    }

    .first-screen__back {
        margin-bottom: 16px;
    }

    .first-screen__row-link__item {
        max-width: 100%;
    }

    .first-screen__row-link__item-img {
        margin-bottom: -5px;
    }

    .first-screen__group {
        justify-content: flex-start;
    }

    .first-screen {
        margin-top: 140px;
    }

    .first-screen__group {
        justify-content: flex-start;
    }

    .first-screen__group-text__list {
        min-width: fit-content;
    }

    body .first-screen__group-text__list .first-screen__group-text__list-item {
        font-size: 15px;
    }

    .first-screen__group-text, body p.first-screen__group-text__list-item {
        font-size: 15px;
    }

    .first-screen__groups {
        width: fit-content;
        margin-left: auto;
    }

    .first-screen__group-text {
        min-width: 140px;
    }

    .first-screen__row-link__item-title {
        max-width: 150px;
        margin-left: auto;
        margin-right: auto;
    }
}


@media screen  and (max-width: 440px) {
    .first-screen__row-heading__text {
        font-size: 25px;
    }

}
