/*------------------------------------*\
    
    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;
}

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

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

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

.half-foreground-image {
    border-radius: var(--border-radius);
}

.half-and-half {
    padding: var(--section-margins) 22px;
}

.half-and-half-text {
    padding-bottom: var(--paragraph-spacing);
}

.video-bttn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    text-align: center;
}

.video-bttn div {
    text-align: center;
}

.video-bttn .sub-heading {
    color: var(--white);
}

.video-bttn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.3;
    background: var(--dark);
    border-radius: var(--border-radius);
}

.video-bttn svg {
    width: 113px;
    height: auto;
    display: block;
    transition: all .3s;
    margin: 0 auto 15px;
}

.video-bttn span {
    display: block;
}

.half-and-half--homepage {
    padding-bottom: 0;
}

.half-and-half--homepage .half-background-image {
    opacity: 0.2;
}

.half-and-half--homepage .half-foreground-image {
    position: absolute;
    top:  11px;
    left: 11px;
}

.half-and-half--homepage .half-and-half-image {
    margin-right: 11px;
}

.half-and-half-image, .half-and-half-text{
    padding-left: 0;
    padding-right: 0;
}

.half-and-half + .logo-carousel{
    overflow: hidden;
}

.video-bttn svg path {
    fill: var(--medium);
}

@media (min-width: 768px) {
    .half-and-half {
        padding: var(--section-margins) 52px;
    }

    .half-background-image {
        opacity: 0.2;
    }

    .half-foreground-image {
        position: absolute;
        top:  var(--paragraph-spacing);
    }

    .half-and-half-image {
        margin-bottom: var(--paragraph-spacing);
    }

    .image-block-right .half-foreground-image {
        left:  var(--paragraph-spacing);
    }

    .image-block-right .half-and-half-image {
        margin-right: var(--push-small);
    }

    .image-block-left .half-foreground-image {
        right:  var(--paragraph-spacing);
    }

    .image-block-left .half-and-half-image {
        margin-left: var(--push-small);
    }

    .video-bttn svg {
        width: 129px;
        margin-bottom: 30px;
    }

    .video-bttn {
        top:  var(--paragraph-spacing);
    }

    .image-block-right .video-bttn {
        left:  var(--paragraph-spacing);
    }

    .image-block-left .video-bttn {
        right:  var(--paragraph-spacing);
        left: auto;
    }

    .half-and-half--homepage {
        padding-bottom: 0;
    }

    .half-and-half--homepage .half-and-half-image {
        margin-right: -30px;
        width: calc(100% + 52px);
        margin-bottom: 0;
    }

    .half-and-half--homepage .half-foreground-image {
        top:  var(--paragraph-spacing);
        left: 22px;
    }
   

}
    
@media (min-width: 1200px) {

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

    .half-and-half .flex-row {
        justify-content: space-between;
    }
    
    .half-and-half-image {
        width: calc(50% - 92px);
    } 

    .image-block-right .half-and-half-image {
        margin-left: 92px;
    } 

    .image-block-left .half-and-half-image {
        margin-right: 92px;
    } 

    .half-and-half-text {
        width: 50%;
    }
    
    .half-and-half-image img {
        position: absolute;
    }

    .half-and-half {
        padding: 0;
    }

    .half-and-half-image {
        margin-bottom: 0;
    }

    .image-block-right .half-and-half-image {
        margin-right: 0;
    }

    .image-block-left .half-and-half-image {
        margin-left: 0;
    }

    .half-and-half-text {
        padding: 130px 63px;
    }

    .image-block-right .half-and-half-text {
        padding-right: 17px;
    }

    .image-block-left .half-and-half-text {
        padding-left: 17px;
    }

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

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

    .half-and-half-image__contained {
        height: 477px;
        position: relative;
        max-width: 614px;
        margin: 100px 32px;
    }

    .half-and-half-image__contained img {
        position: relative;
        left: 0 !important;
        top: 0;
    }

    .image-block-left .half-and-half-image__contained {
        margin-left: auto;
    }

    .half-and-half--contained {
        align-items: center;
    }

    .half-and-half--contained .half-background-image {
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .half-and-half--contained .half-and-half-image{
        position: initial;
        align-self: baseline;
        position: sticky;
        top: 36px;
    }

    .half-and-half--contained.image-block-right .half-background-image {
        right: 0;
    }

    .half-and-half--contained.image-block-left .half-background-image {
        left: 0;
    }

    .video-bttn svg {
        margin-bottom: 15px;
    }

    .video-bttn:hover svg {
        transform: scale(1.05);
    }

    .half-and-half--contained .video-bttn {
        top:  0;
    }

    .half-and-half--contained.image-block-right .video-bttn {
        left:  0;
    }

    .half-and-half--contained.image-block-left .video-bttn {
        right: 0;
    }

    .half-and-half--homepage {
        padding-bottom: 0;
    }

    .half-and-half--homepage .half-and-half-image {
        margin-right: 0;
        width: calc(50% - 92px);
    }
    .half-and-half--homepage .half-foreground-image {
        left: var(--paragraph-spacing);
    }

}
