/*------------------------------------*\
    
    Half & Half Image + Text Block Customizations - Global Styling

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

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

.half-and-half {
    position: relative;
    z-index: 1;
}

.half-and-half__bg {
    position: absolute;
    z-index: -1;
    bottom: -75px;
    right: 0;
    width: 465px;
    max-width: initial;
}

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

.half-and-half-image, 
.half-and-half-text {
    position: relative;
    width: 100%;
}

.half-and-half-image {
    height: 220px;
}

.half-and-half-text {
    padding: 0 22px;
}

.half-and-half-text__wrapper {
    padding: 25px;
}

.half-and-half-text__wrapper .btn + .btn {
    margin: 0 0 0 20px;
}

.flex-opposite .half-and-half__bg {
    left: 0;
    right: auto;
    transform: scaleX(-1);
    bottom: 0;
}

@media (min-width: 768px) {
    .half-and-half__bg {
        bottom: -115px;
        width: 817px;
    }

    .half-and-half-image {
        height: 450px;
    }

    .half-and-half-text {
        padding: 0 52px;
    }
    
    .half-and-half-text__wrapper {
        padding: 35px 50px 50px;
    }

    .half-and-half-text__wrapper .btn + .btn {
        margin: 0 0 0 25px;
    }
    
}

@media (min-width: 1200px) {
    .half-and-half__bg {
        bottom: 0;
        width: 836px;
        overflow: hidden;
    }

    .home .half-and-half__bg {
        bottom: -150px;
    }

    .half-and-half.section-padding {
        overflow: hidden; 

        & .half-and-half__bg {
            bottom: 0;
        }
    }
    
    .half-and-half-text {
        width: calc(50% + 266px);
        padding: 50px 63px 50px 0;
    }
    
    .half-and-half-image img {
        position: absolute;
        height: 100%;
    }

    .half-and-half-image {
        height: auto;
        width: calc(50% - 266px);
    }

    .half-and-half-text__wrapper {
        max-width: 898px;
        padding: 50px 107px 50px 75px;
    }

   .image-block-right .half-and-half-text {
        width: calc(50% + 92px);
        padding: 50px 0 50px 63px;
    }

    .image-block-right .half-and-half-image {
        height: auto;
        width: calc(50% - 92px);
    }

    .image-block-right .half-and-half-text__wrapper {
        max-width: 724px;
        margin-left: auto;
        padding: 50px 65px;
    }

    .image-block-right.narrow .half-and-half-text__wrapper {
        margin-right: auto;
        margin-left: 0;
    }

    .image-block-right.narrow .half-and-half-text {
        padding: 50px 63px 50px 0;
    }

    .image-block-left.wide .half-and-half-text__wrapper,
    .flex-opposite.image-block-right.narrow .half-and-half-text__wrapper {
        margin-right: 0;
        margin-left: auto;
    }

    .image-block-left.wide .half-and-half-text,
    .flex-opposite.image-block-right.narrow .half-and-half-text {
        padding: 50px 0 50px 63px;
    }

    .flex-opposite-left.image-block-left.wide .half-and-half-text {
        padding: 50px 63px 50px 0;
    }

    .flex-opposite-left.image-block-left.wide  .half-and-half-text__wrapper {
        margin-right: auto;
        margin-left: 0;
    }

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

    .half-and-half__bg {
        aspect-ratio: 836 / 919 auto;
        width: auto;
        top: 0;
        bottom: -150px;
        height: calc(100% + 150px);
    }
}