.text-on-background-image-in-elements {
    margin: 0 auto;
    padding: 50px 0 100px;
}

.text-on-background-image-in-elements .elements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.text-on-background-image-in-elements .element {
    position: relative;
    color: #fff;
    background-repeat: no-repeat;
    background-size: cover;
}
.text-on-background-image-in-elements .element#element-0 {
    grid-row: span 2;
}

.text-on-background-image-in-elements .element img {
    max-width: 240px;
    position: absolute;
    top: 50px;
    right: 50px;
    z-index: 2;
}
.text-on-background-image-in-elements .element#element-0 img {
    max-width: 100%;
    position: static;
}

.text-on-background-image-in-elements .element .element-text {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 3;
    max-width: 276px;
}
.text-on-background-image-in-elements .element .element-text p {
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: -0.2px;
    margin: 0;
}
.text-on-background-image-in-elements .element#element-0 .element-text {
    max-width: calc(100% - 64px);
}
.text-on-background-image-in-elements .element#element-0 .element-text p {
    font-size: 40px;
    font-style: normal;
    font-weight: 500;
    line-height: 48px;
    letter-spacing: -0.4px;
}

@media screen and (max-width: 1799px) {
    .text-on-background-image-in-elements .element img {
        max-width: 170px;
    }
}

@media screen and (max-width: 1159px) {
    .text-on-background-image-in-elements .element img {
        max-width: 130px;
    }

    .text-on-background-image-in-elements .element .element-text p {
        font-size: 18px !important;
        font-style: normal;
        font-weight: 500;
        line-height: 26px;
        letter-spacing: -0.18px;
    }
    .text-on-background-image-in-elements .element#element-0 .element-text p {
        font-size: 28px !important;
        font-style: normal;
        font-weight: 500;
        line-height: 28px;
        letter-spacing: -0.28px;
    }
}

@media screen and (max-width: 991px) {
    .text-on-background-image-in-elements {
        padding: 32px 0 64px;
    }

    .text-on-background-image-in-elements .elements {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, max-content);
        gap: 16px;
    }
    .text-on-background-image-in-elements .element {
        min-height: 328px;
        grid-row: span 1 !important;
        padding: 16px;
    }
    .text-on-background-image-in-elements .element img {
        top: initial;
        right: 36px;
        bottom: 36px;
    }
    .text-on-background-image-in-elements .element#element-0 img {
        max-width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
    }
    .text-on-background-image-in-elements .element .element-text {
        position: relative;
        top: 0;
        left: 0;
    }
}

@media screen and (max-width: 480px) {
    .text-on-background-image-in-elements .element .element-text {
        max-width: 100% !important;
    }
}
