.grouped-media-text-block{
    position: relative;
    background-color: var(--wp--preset--color--x-light-grey);
    width:100vw;
    overflow-x: hidden;
    .wp-block-heading{
        margin-bottom: 33px;
        font-size: clamp(24.034px, 1.502rem + ((1vw - 3.2px) * 1.426), 36px);
    }
    .wp-block-buttons{
      margin-top:35px;
    }
    .acf-innerblocks-container{
        padding-top:48px;
    }
}

.page-hero-block:not(.added-calculator):not(.type-simple):not(.extended-type) ~ .grouped-media-text-block{
    margin-top: -263px !important;
        .grouped-media-text-wrapper {
            .grouped-row:nth-child(1) {
                .grouped-txt-inner {
                    padding-top: 140px;
                }
            }
        }
        .acf-innerblocks-container{
            width:60%;
        }
}

.page-hero-block.extended-type ~ .grouped-media-text-block{
    margin-top: -263px !important;
    .acf-innerblocks-container{
        padding-top:90px;
        padding-bottom: 10px;
        width:25%;
    }
}

.grouped-row{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    position: relative;
        &:before{
            content: '';
            position: absolute;
            top:0;
            left:50%;
            bottom:0;
            width:50vw;
            background-color: var(--wp--preset--color--tertiary);
        }
        .grouped-media, .grouped-txt{
            flex-basis: 50%;
            flex-grow: 0;
            flex-shrink: 0;
            position: relative;
            align-self: stretch;
        }
        .grouped-txt{
            flex-basis: 50%;
            flex-grow: 0;
            flex-shrink: 0;
            position: relative;
        }
        .grouped-txt-inner{
            padding:96px 86px;
            box-sizing: border-box;
            min-height: 385px;
        }
        .img-holder{
            width:100%;
            height: 100%;
            border-radius: 100px 0 0 0;
            overflow: hidden;
            position: absolute;
            top:0;
            left:0;
            right:0;
            bottom:0;
            img{
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
        .video-link{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .is-testimonial{
            .grouped-title{
                margin-bottom:8px;
            }
            .grouped-subtitle{
                font-family: var(--wp--preset--font-family--playfair-display);
                font-weight: 400;
                font-size: 20px;
                line-height: 28px;
                font-style: italic;
                color: var(--wp--preset--color--white);
                margin-bottom:25px;
            }
            .grouped-tagline{
                font-family: var(--wp--preset--font-family--outfit);
                font-weight: 400;
                font-size: 28px;
                line-height: 36px;
                color: var(--wp--preset--color--white);
            }
        }
}

.grouped-media-text-wrapper {
    .grouped-row:nth-child(even) {
        flex-direction: row-reverse;
            .img-holder{
                border-radius: 0 100px 0 0;
            }
    }
    .grouped-row:nth-child(odd) {
        .grouped-title, .grouped-description{
            color:var(--wp--preset--color--white);
        }
    }
    .grouped-row:nth-child(1) {
        .grouped-txt{
            background-color: var(--wp--preset--color--tertiary);
        }
    }
    .grouped-row:nth-child(2) {
        .grouped-txt{
            background-color: var(--wp--preset--color--white);
            *{
                color: var(--wp--preset--color--tertiary);
            }
            .grouped-subtitle{
                color: var(--wp--preset--color--secondary);
            }
        }
    }
    .grouped-row:nth-child(3) {
        &:before{
            left:initial;
            right:50%;
        }
        &:not(:last-child){
            .grouped-txt{
                background-color: var(--wp--preset--color--white);
                    *{
                        color: var(--wp--preset--color--tertiary);
                    }
                    .grouped-subtitle{
                        color: var(--wp--preset--color--secondary);
                    }
            }
            .img-holder{
                border-radius: 0 !important;
            }
        }
    }
    .grouped-row:nth-child(4) {
        &:before{
            left:initial;
            right:50%;
        }
        .img-holder{
            border-radius: 0 0 100px 0 !important;
        }
        .grouped-txt{
            border-radius: 0 0 0 100px !important;
        }
    }
    .grouped-row:last-child {
        .img-holder{
            border-radius: 0 0 0 100px;
        }
        .grouped-txt{
            border-radius: 0 0 100px 0;
            overflow: hidden;
            background-color: var(--wp--preset--color--secondary);
            *{
                color: var(--wp--preset--color--white);
            }
        }
    }
}

@media (max-width: 990px){
    .grouped-media-text-block{
        .second-row{
            padding-left:0 !important;
            padding-right:0 !important;
        }
    }
    .page-hero-block.extended-type ~ .grouped-media-text-block{
        .acf-innerblocks-container{
            width:45%;
        }
    }
}

@media (max-width: 767px){
    .page-hero-block.extended-type ~ .grouped-media-text-block{
        margin-top: 0 !important;
        .acf-innerblocks-container{
            padding-top:30px;
            padding-bottom: 0;
            width:100%;
            text-align: center;
        }
    }
    .page-hero-block:not(.added-calculator):not(.type-simple):not(.extended-type) ~ .grouped-media-text-block{
        margin-top: 0 !important;
            .grouped-media-text-wrapper {
                .grouped-row:nth-child(1) {
                    .grouped-txt-inner {
                        padding-top: 96px;
                    }
                }
            }
            .acf-innerblocks-container{
                width:100%;
            }
    }
    .grouped-row{
        .grouped-txt-inner{
            padding:46px !important;
        }
        & .is-testimonial {
            .grouped-title {
                font-size: 32px;
                line-height: 1;
            }
            .grouped-tagline {
                font-size: 24px;
                line-height: 32px;
            }
        }
    }
}

@media (max-width: 580px){
    .grouped-row{
        flex-direction: column !important;
            .img-holder{
                width:100%;
                height: auto;
                aspect-ratio:1/0.65 ;
                position: static;
            }
            .grouped-txt-inner{
                padding:43px 25px !important;
                min-height: 185px;
            }
    }
    .grouped-row:last-child {
        .img-holder{
            border-radius:0 !important;
        }
    }
    .grouped-media-text-wrapper {
        & .grouped-row:nth-child(4) {
            .img-holder {
                border-radius: 0 !important;
            }
        }
    }
}
