/*------------------------------------*\
    
    Contained Image + Text Block Customizations - Global Styling

    The styles you add to this file will be applied to the 'Contained Image + Text' block. 
    If there is any reasons why you would need to style them separately,
    please create a block-specific stylesheet for it (don't forget to register that block-specific stylesheet in acf-start-blocks.php)

\*------------------------------------*/

.flex-row {
    display: flex;
    flex-wrap: wrap;
}

.image-text .flex-row {
    align-items: center;
    align-items: flex-start;
}

.image-text--homepage {
    position: relative;
    z-index: 1;
    padding-bottom: 42px;
}

.image-text__bg {
    z-index: -1;
    position: absolute;
    bottom: 0;
    max-width: inherit;
    left: 50%;
    width: 460px;
    transform: translate(-50%, 0);
}

.image-text__text {
    padding-bottom: 31px;
}

.image-text__img-flex {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
    justify-content: center;
}

.image-text__img-left,
.image-text__img-right {
    width: 50%;
    padding: 0 5px;
}

.image-text__img-left {
    height: 257px;
}

.image-text__img-top {
    height: 112px;
}

.image-text__img-bottom {
    height: 135px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .image-text--homepage {
        padding-bottom: 60px;
    }

    .image-text__text {
        padding-bottom: 34px;
    }

    .image-text__img-flex {
        margin: 0 -10px;
    }
    
    .image-text__img-left,
    .image-text__img-right {
        padding: 0 10px;
    }
    
    .image-text__img-left {
        height: auto;
        max-width: 500px;
    }
    
    .image-text__img-right {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin: -10px 0;
    }
    
    .image-text__img-top,
    .image-text__img-bottom {
        height: 50%;
        flex: 1;
        padding: 10px 0;
        margin: 0;
    }

    .image-text__bg {
        width:100%;
    }
    
}

@media (min-width: 1200px) {

    .image-text--homepage {
        padding: 100px 0;
    }

    .image-text__text {
        padding-bottom: 0;
        padding-left: 56px;
    }

    .image-text--right .image-text__text {
        padding-right: 56px;
        padding-left: calc(var(--bs-gutter-x) * .5);
    }

    .flex-opposite {
        flex-direction: row-reverse;
    }

    .image-text__img-left {
        height: auto;
    }

    .image-text__img-right {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin: -10px 0;
    }
    
    .image-text__img-top,
    .image-text__img-bottom {
        height: 50%;
        flex: 1;
        padding: 10px 0;
        margin: 0;
    }

    .image-text--homepage .container {
        position: relative;
    }

    .image-text__bg {
        width: 858px;
        bottom: -100px;
        transform: translate(0, 0);
        left: -253px;
    }
}