/*------------------------------------*\
    
    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;
    width: 100%;
    z-index: 1;
}

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

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

.half-and-half__pattern {
    position: absolute;
    width: 345px;
    height: auto;
    top: 15px;
    left: 15px;
    z-index: -1;
}

.half-and-half__pattern path {
    fill: var(--off-white);
}

.bg-grey .half-and-half__pattern path {
    fill: var(--off-white-darker);
}

.bg-blue .half-and-half__pattern path {
    fill: #243554;
}

.video-bttn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31,47,77,0.5);
}

.video-bttn__icon {
    width: 77px;
    height: 77px;
    position: relative;

    svg {
        width: 100%;
        height: auto;
        transform: scale(1);
        transition: all .3s;
        position: relative;
        z-index: 1;
    }

    &:before, 
    &:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        border-radius: 50%;
        animation: pulse 1.5s infinite;
    }

    &:before {
        background-color: rgba(255, 255, 255, 0.15);
    }

    &:after {
        background-color: rgba(255, 255, 255, 0.3);
        animation-delay: 0.25s;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

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

    .half-and-half__pattern {
        width: 512px;
        top: 36px;
        left: 25px;
    }

    .video-bttn__icon {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 1200px) {

    .flex-opposite {
        flex-direction: row-reverse;
    }
    
    .half-and-half-image, 
    .half-and-half-text {
        width: 50%;
    }

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

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

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

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

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

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

    .half-and-half__pattern {
        width: 590px;
        top: 50%;
        left: 50px;
        transform: translate(0, -50%);
    }

    .image-block-left .half-and-half__pattern {
        left: auto;
        right: 50px;
    }

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

}
