/*------------------------------------*\
    
    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 {
    overflow: hidden;
}

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

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

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

.half-and-half-image:after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 25px;
    bottom: -1px;
    background-color: #fff;
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
}


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

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

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

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

.half-and-half.white-bg {
    background-color: #ffffff;
}

.half-and-half.gray-bg {
    background-color: #f7f7f7;
}

.bg-gray .half-and-half-image:after {
    background-color: #F3F3F5;
}

.bg-blue .half-and-half-image:after {
    background-color: #004B86;
}

.half-and-half-text-wrapper h2 {
    padding-bottom: 12px;
}

.bg-blue .half-and-half-image::after {
    transform: rotateY(180deg);
}

.half-and-half-bg-blue-btn .btn-primary {
    background: #F17503 !important;
}

.half-and-half-bg-blue-btn .btn-primary::after {
    color: #004B86;
}

.half-and-half-bg-blue-btn .btn-secondary {
    background: #1B78C1 !important;
}

.half-and-half-bg-blue-btn .btn-secondary::after {
    color: #fff;
}

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

    .half-and-half-image:after {
        height: 40px;
    }

    .half-and-half-text {
        padding: 40px 52px 85px;
    }
}
    
@media (min-width: 1200px) {
    
    .half-and-half-image, 
    .half-and-half-text {
        position: relative;
        flex: 0 0 50%;
    }
    
    .half-and-half-image img {
        position: absolute;
    }

    .half-and-half-image:after {
        height: calc(100% + 2px);
        width: 94px;
        right: -1px;
        left: unset;
        clip-path: polygon(100% 0, 0% 100%, 100% 100%);
        bottom: -1px;
    }

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

    .half-and-half-text-wrapper {
        max-width: 600px;
    }

    .half-and-half-image {
        height: auto;
    }

    .image-block-right.flex-row {
        flex-direction: row-reverse;
    }

    .image-block-right .half-and-half-image:after {
        right: unset;
        left: -1px;
        clip-path: polygon(100% 0, 0 0, 0 100%);
    }

    .image-block-right .half-and-half-text {
        padding: 100px 66px 100px 22px;
    }

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

    .bg-blue .half-and-half-image::after {
        transform: rotateY(0deg);
    }

    .half-and-half-bg-blue-btn .btn-primary:hover {
        background: #AE5402 !important;
    }

    .half-and-half-bg-blue-btn .btn-secondary:hover {
        background: #326A97 !important;
    }
}

