/*------------------------------------*\
    
    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 {
    display: flex;
    flex-wrap: wrap;
}

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

.half-and-half-image {
    height: 250px;
    padding-left: 22px;
}

.half-and-half-image img {
    top: 0;
    left: 0;
}

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

.image-block-left .half-and-half-image {
    padding-left: 0;
    padding-right: 22px;
}

.video-image {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.video-image .fluid-width-video-wrapper {
    padding-top: 0 !important;
    height: 100%;
}

.play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all ease-in-out 0.4s;
}

.play-btn svg {
    width: 80px;
    transition: all ease-in-out 0.4s;
}

.half-video__cover {
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: var(--color-primary);
}

.half-and-half-image img,
.half-video,
.half-video__cover,
.image-block-right .rll-youtube-player, 
.image-block-right .video-image {
    border-radius: 40px 0 0 40px;
}

.image-block-left .half-and-half-image img,
.image-block-left .half-video,
.image-block-left .half-video__cover,
.image-block-left .rll-youtube-player,
.image-block-left .video-image {
    border-radius: 0 40px 40px 0;
}

.half-and-half-text__wrapper {
    position: relative;
}

.half-and-half-text__wrapper,
.half-and-half-text__wrapper * {
    transition: max-height .3s ease-in-out;
    -webkit-transition: max-height .3s ease-in-out;
    -moz-transition: max-height .3s ease-in-out;
}

.half-and-half-text__wrapper.hidden-content {
    max-height: 520px; 
    overflow: hidden;
}

.half-and-half-text__wrapper.show-full-content,
.half-and-half-text__wrapper.show-full-content *   {
    max-height: 100%;
} 

.half-and-half .half-and-half-text__wrapper.hidden-content:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.half-and-half.bg-light-blue .half-and-half-text__wrapper.hidden-content:before {
    background: linear-gradient(to top, rgba(234,248,252,1) 0%, rgba(234,248,252,.65) 15%, rgba(234,248,252,0) 35%);
}

.half-and-half.bg-dark-blue .half-and-half-text__wrapper.hidden-content:before {
    background: linear-gradient(to top, rgba(10,24,49,1) 0%, rgba(10,24,49,.65) 15%, rgba(10,24,49,0) 35%);
}

.half-and-half.bg-blue .half-and-half-text__wrapper.hidden-content:before {
    background: linear-gradient(to top, rgba(32,56,100,1) 0%, rgba(32,56,100,.65) 15%, rgba(32,56,100,0) 35%);
}

.js-custom-readmore.btn-tertiary {
    padding: 0 35px 0 0;
}

.js-custom-readmore.btn-tertiary:after {
    transform: translate(0,-50%) rotate(90deg);
    right: 12px;
}

.show-full-content .js-custom-readmore.btn-tertiary:after {
    transform: translate(0,-50%) rotate(-90deg);
}


@media ( min-width: 600px ) {
    .half-and-half-image {
        height: 350px;
    }
}


@media (min-width: 768px) {
    
    .half-and-half-image {
        height: 404px;
        padding-left: 52px;
    }

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

    .image-block-left .half-and-half-image {
        padding-left: 0;
        padding-right: 52px;
    }
    
    .play-btn svg {
        width: 93px;
    }
}

@media (min-width: 1200px) {

    .half-and-half-image, 
    .half-and-half-text {
        flex: 0 0 50%;
    }

    .image-block-left {
        flex-direction: row-reverse;
    }
    
    .half-and-half-image {
        height: 500px;
        padding-left: 16px;
    }

    .image-block-left .half-and-half-image {
        padding-left: 0;
        padding-right: 16px;
    }

    .half-and-half-image img {
        position: absolute;
    }

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

    .image-block-right .half-and-half-text {
        padding: 10px 85px 10px 32px;
    }

    .half-and-half-text__wrapper,
    .half-and-half-text__readmore {
        max-width: 565px;
        margin-left: auto;
    }

    .image-block-left .half-and-half-text__wrapper,
    .image-block-left .half-and-half-text__readmore {
        max-width: 565px;
        margin-left: 60px;
        padding: 0 32px;
    }

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

    .video-image:hover svg {
        width: 110px;
    }

}