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

.half-and-half-image {
    height: 282px;
    position: relative;
}

.half-and-half-image__wrap::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border: 2px solid var(--color-foreground);
    z-index: 1;
}

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

.half-and-half-text {
    padding: 70px 23px 48px;
    color: #333333;
}


.half-and-half-image__wrap {
    height: 100%;
    position: relative;
}

.half-and-half-image__half-image {
    height: 160px;
    position: relative;
}

.half-and-half-image__double {
    margin-top: 5px;
    height: 117px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.half-and-half-image__double__image {
    width: calc(50% - 2.5px);
    position: relative;
    height: 100%;
}

.half-and-half-text__wrapper .read-more__content::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30px;
    left: 0;
    bottom: 0;
    background: linear-gradient(to bottom,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
}

.bg-gray .half-and-half-text__wrapper .read-more__content::after {
    background: linear-gradient(to bottom,  rgba(255,255,255,0) 0%,rgba(240,242,242,1) 100%);
}

.bg-dark-green .half-and-half-text__wrapper .read-more__content::after {
    background: linear-gradient(to bottom,  rgba(1,36,37,0) 0%,rgba(1,36,37,1) 100%);
}


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

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

.half-and-half-image--double {
    height: 329px;
}

.half-and-half-image__bottom {
    height: 164px;
    margin-top: 5px;
    position: relative;
}

.half-and-half-image__wrap {
    background: #fff;
}

.bg-dark-green .half-and-half-text,
.bg-dark-green .expand {
    color: #fff;
}

.half-and-half-image--full {
    height: 173px;
}

.half-and-half-image__full-image {
    position: relative;
    height: 100%;
}

@media (min-width: 768px) {

    .half-and-half-text__wrapper .read-more__content::after {
        display: none;
    }

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

    .half-and-half-text__wrapper .btn + .btn {
        margin-left: 16px;
        margin-top: 0;
    }

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

    .half-and-half-image--double {
        height: 674px;
    }
    
    
    .half-and-half-image__wrap::before {
        left: 18px;
        top: 18px;
        width: calc(100% - 36px);
        height: calc(100% - 36px);
    }
    
    .half-and-half-text {
        padding: 80px 52px 55px;
    }

    .half-and-half-image__half-image {
        height: 332px;
    }

    .half-and-half-image__double {
        margin-top: 10px;
        height: 240px;
    }
    
    .half-and-half-image__double__image {
        width: calc(50% - 5px);
    }

    .half-and-half-image__bottom {
        height: 332px;
        margin-top: 10px;
    }

    .half-and-half-image--full {
        height: 354px;
    }
    
}

@media (min-width: 1200px) {
    
    
    .half-and-half-text {
        width: 50%;
        padding: 100px 63px;
    }

    .half-and-half-image {
        width:50%;
        height: auto;
    }

    
    .half-and-half-image img {
        position: absolute;
    }
    
    .flex-opposite {
        flex-direction: row-reverse;
    }

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

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

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

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

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

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

    
    .half-and-half-image__wrap::before {
        left: 20px;
        top: 20px;
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        z-index: 1;
    }

    .half-and-half-image__half-image {
        height: calc(50% - 5px);
    }

    .half-and-half-image__double,
    .half-and-half-image__bottom {
        height: calc(50% - 5px);
    }

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

}
