/*------------------------------------*\
    
    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 img {
    width: 100%;
    height: 195px;
    display: block;
    object-fit: cover;
    -o-object-fit: cover;
}

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

.half-and-half {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.half-text-bg {
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.image-year {
    position: absolute;
    left: 0;
    bottom: -5px;
    font-size: 56px;
    line-height: 1em;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    padding-left: 22px;
    width: 100%;
}

.image-year::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: calc(100% - 303px);
    height: 10px;
    transform: translate(0, -50%);
    clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
    background: linear-gradient(to right,  rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.75) 25%,rgba(255,255,255,0.45) 100%);
}

.inner-half-and-half:before {
    display: none;
}

.innerpage-blocks.half-and-half.image-block-left {
    flex-direction: column-reverse;
}

.innerpage-blocks .half-and-half-text .half-and-half-text__wrapper {
    background-color: #fff;
    padding: 0 26px;
    margin-top: 70px;
    margin-bottom: -100px;
    padding-bottom: 20px;
}

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

    .half-and-half-text {
        padding: 40px 52px 70px;
    }

    .half-text-bg {
        position: absolute;
        right: 0;
        top: 80px;
        z-index: -1;
        width: 100%;
        height: 100%;
    }

    .image-year {
        bottom: -10px;
        font-size: 100px;
        padding-left: 52px;
    }

    .image-year::before {
        width: calc(100% - 555px);
        height: 16px;
        clip-path: polygon(7% 0%, 100% 0%, 100% 100%, 0% 100%);
        background: linear-gradient(to right,  rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.75) 25%,rgba(255,255,255,0.4) 100%);
    }

    .innerpage-blocks .half-and-half-text .half-and-half-text__wrapper {
        margin-bottom: -140px;
        padding-top: 20px;
        padding-bottom: 30px;
    }
}

@media (min-width: 1200px) {

    .half-and-half-image {
        width: calc(100% - 660px);
    }

    .half-and-half-text {
        width: 660px;
        padding: 100px 0;
    }

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

    .innerpage-blocks.half-and-half.image-block-left {
        flex-direction: row;
    }

    .innerpage-blocks .half-and-half-text .half-and-half-text__wrapper {
        padding: 78px 80px;
        margin-top: 0;
        margin-bottom: 0;
    }

    .half-and-half-text__wrapper {
        width: calc(100% + 276px);
        margin-left: -276px;
        background: #fff;
        padding: 78px 80px;
        color: #444444;
    }

    .half-and-half-text__wrapper p {
        padding-bottom: 15px;
    }

    .half-and-half-text__wrapper p:last-child {
        padding-bottom: 0;
    }

    .half-text-bg {
        top: 0;
        width: auto;
    }

    .half-and-half--homepage {
        padding-bottom: 60px;
        padding-top: 100px;
    }

    .image-year {
        bottom: -18px;
        font-size: 120px;
        padding-left: 66px;
    }

    .half-and-half--homepage:before {
        content: "";
        display: block;
        position: absolute;
        width: calc(100vw - 669px);
        height: 23px;
        clip-path: polygon(2.5% 0%, 100% 0%, 100% 100%, 0% 100%);
        background: rgb(255,255,255);
        background: linear-gradient(to right,  rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.75) 15%,rgba(163,171,205,0.4) 65%,rgba(57,76,147,0) 100%);
        right: 0;
        bottom: 138px;
        z-index: 1;
    }

    .image-year::before {
        display: none;
    }

    .read-more__content::before {
        height: 100px;
    }

    .inner-half-and-half {
        padding-bottom: 100px;
    }

    .half-and-half.right {
        flex-direction: row-reverse !important;
    }

    .right .half-and-half-text__wrapper {
        margin-left: unset;
        margin-right: -276px;
    }

    .right .half-text-bg {
        right: unset;
        left: 0;
    }


}

@media (min-width: 1200px) and (max-width: 1305px) {
    .image-year {
        font-size: 98px;
    }
}

@media (min-width: 1600px) {
    .image-year {
        font-size: 180px;
    }

    .half-and-half--homepage:before {
        width: calc(100vw - 976px);
    }
}