/*------------------------------------*\
    
    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)

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

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

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

.half-and-half-image {
    width: 100%;
}

.half-and-half-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    -o-object-fit: cover;
}

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

.half-and-half-text.right {
    margin-right: auto;
}

.half-and-half-text.left {
    margin-left: auto;
}

.half-and-half.white-bg {
    background-color: var( --color-white );
}

.half-text__subtitle {
    color: var( --color-white );
    background-color: var( --color-blue );
    border-radius: 0 13px 13px 0;
    font-size: 22px;
    line-height: 1em;
    margin: 0 0 15px 0;
    padding: 8px 56px 10px 0;
    position: relative;
    font-weight: 700;
    font-style: italic;
    display: inline-block;
    z-index: 1;
}

.half-text__subtitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3050px;
    width: 3051px;
    height: 100%;
    background-color: var( --color-blue );
    z-index: -1;
}

.half-and-half .bg-dark-blue {
    background: var( --color-blue );
    color: var( --color-white );
}

.half-and-half .bg-dark-blue h2,
.half-and-half .bg-dark-blue h3,
.half-and-half .bg-blue h2,
.half-and-half .bg-blue h3 {
    color: var( --color-white );
}

.half-and-half .bg-dark-blue .half-text__subtitle,
.half-and-half .bg-blue .half-text__subtitle,
.half-and-half .bg-gray .half-text__subtitle,
.half-and-half .bg-dark-blue .half-text__subtitle::before,
.half-and-half .bg-blue .half-text__subtitle::before,
.half-and-half .bg-gray .half-text__subtitle::before {
    color: var( --color-white );
    background-color: var( --color-light-blue-02 );
}

.half-and-half.bg-gray + .cta,
.image-text.bg-gray + .cta{
    background-color: var( --color-gray );
}

@media (min-width: 768px) {
    .half-and-half-image img {
        max-width: 100%;
        height: 309px;
        margin: 0 auto;
        display: block;
    }

    .half-and-half-text {
        padding: 100px 70px 100px 52px;
    }
}

    
@media (min-width: 1200px) {
    
    .half-and-half-image {
        position: relative;
        width: 47%;
    }

    .half-and-half-text {
        position: relative;
        width: 53%;
    }
    
    .half-and-half-image img {
        position: absolute;
        max-width: 863px;
        height: 100%;
    }

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

    .flex-opposite .half-and-half-text {
        padding: 100px 75px 100px 22px;
    }

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

    .half-and-half-text__wrapper {
       max-width: 645px;
    }

    .half-and-half-text.left .half-and-half-text__wrapper {
        float: right;
    }

    .image-block-left .half-text__subtitle {
        border-radius: 13px 0 0 13px;
        padding: 8px 0 10px 56px;
    }
    
    .image-block-left .half-text__subtitle::before {
        right: -3050px;
        left: auto;
    }

}
