#top.single-zb_referenz #main > div:has(.entry-content-wrapper:empty){display: none;}

#top .__hero-referenz{
    position: relative
}
#top .__hero-referenz .content svg{
    width: 100vw;
    max-width: 1920px;
    height: auto;
    position: absolute;
    left: 50%;
    top: 10%; 
}

@media (max-width: 767px){
    #top .__hero-referenz .content svg{top: 30%;}
}

#top .__hero-referenz .content blockquote{
    max-width: 1160px;
        font-size: var(--step-6);
}
#top .__hero-referenz .content figure{
    aspect-ratio: 16/9;
    display: block;
    margin: 4em 0 0;
    overflow: hidden;
    border-radius: 2em;
    border-bottom-left-radius: 0;
    max-width: 1160px;
    position: relative;
}
#top .__hero-referenz .content figure img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#top .__hero-referenz:has(figure)::before{
    content: '';
    display: block;
    height: 30%;
    width: 100%;
    background: #fff;
    position: absolute;
    left: 0;
    bottom: 0;
    pointer-events: none;
}

#top ul.__referenz-details{
    max-width: 860px;
    list-style: none;
    margin: 1em 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5em 3em;
}
#top ul.__referenz-details > li{
    margin: 0;
    padding: .5em 0;
    font-size: var(--step--1);
    border-bottom: 2px solid var(--zb-secondary-color);
}
#top ul.__referenz-details > li b{
    font-size: var(--step-0);
    display: block;
    margin: 0 0 .5em 0;
}


#top .__details-wrap > div ul.__referenz-details{margin: 0 0 4em 0;}
#top .__details-wrap > div .avia-button{margin: 0 0 4em 0;}
#top .__details-wrap > div figure{
    aspect-ratio: 3/2;
    display: block;
    border-top-left-radius: 2em;
    overflow: hidden;
    width: 120%;
    max-width: 120%;
}
#top .__details-wrap > div figure img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 990px){
    #top .__details-wrap{display: flex; gap: 8em}
    #top .__details-wrap > div{flex-basis: 0; flex-grow: 1; max-width: 50%;}
    #top .__details-wrap > div:nth-child(2){align-self: flex-end;}
    #top .__details-wrap > div figure{width: calc(100% + 50px);}
}


#top .swiperReferenzV1 .swiper-slide{width: clamp(300px, 188.93px + 29.62vw, 728px);}
#top .swiperReferenzV1 .swiper-slide img{border-radius: clamp(1rem, 0.7405rem + 1.107vw, 2rem); aspect-ratio: 3/2; object-fit: cover;}


/* Referenz Element Preview */
#top .__referenz-preview{
    display: flex;
    gap: 2em;
    flex-direction: column;
    align-items: flex-start;
}
#top .__referenz-preview .av-special-heading{
    margin: 0;
}
#top .__referenz-preview > section{
    display: flex;
    gap: 4em;
    flex-direction: column;
    background-color: #fff;
    border-radius: 2em;
    border-bottom-right-radius: 0;
    padding: 3em 5%;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 36px #0000000d;
} 
#top .__referenz-preview > section *{color: var(--zb-primary-color);}


#top .__referenz-preview > section > figure .referenzSwiper .swiper-slide img{
    display: block;
    aspect-ratio: 5/4;
    object-fit: cover;
    border-radius: 2em;
    border-bottom-left-radius: 0;
}

#top .__referenz-preview > section > figure .referenzThumbSwiper {
    box-sizing: border-box;
    padding: 1em 0;
}

#top .__referenz-preview > section > figure .referenzThumbSwiper .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.4;
    cursor: pointer;
}

#top .__referenz-preview > section > figure .referenzThumbSwiper .swiper-slide-thumb-active {
    opacity: 1;
}

#top .__referenz-preview > section > figure .referenzThumbSwiper .swiper-slide img{
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: .5em;
}

@media (min-width: 990px){
    #top .__referenz-preview .av-special-heading{max-width: 50%;}
    #top .__referenz-preview > section{flex-direction: row;}
    #top .__referenz-preview > section > *{flex-basis: 0; flex-grow: 1; max-width: calc(50% - 2em);}
    #top .__referenz-preview > section > figure{margin-top: -20%;}
}


/* Referenzen Grid */
#top .__referenz-grid-container{
    display: flex;
    flex-direction: column;
    gap: 2em;
}

#top .__referenz-grid-filter button{
    cursor: pointer;
}

#top .__referenz-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
    gap: 2em 1em;
}

#top .__referenz-grid > article{
    background-color: #fff;
    padding: 2em;
    border-radius: 1em;
    border-bottom-right-radius: 0;
    border: 1px solid;
    color: var(--zb-primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: zbReferenzFadeIn .4s ease both;
}

#top .__referenz-grid > article.is-hidden {display: none;}

@keyframes zbReferenzFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    #top .__referenz-grid > article { animation: none; }
}

#top .__referenz-grid > article *{color: var(--zb-primary-color)}

#top .__referenz-grid > article figure{
    aspect-ratio: 5/4;
    position: relative;
    overflow: hidden;
    border-radius: 1em;
    border-bottom-left-radius: 0;
    margin: 0 0 1.5em 0;
}

#top .__referenz-grid > article figure a{
    display: block;
    height: 100%;
}

#top .__referenz-grid > article figure img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#top .__referenz-grid > article h3{
    font-size: var(--step-1);
    font-family: var(--primary-font);
    font-weight: 500 !important;
}

#top .__referenz-grid > article .avia-button{
    margin: auto 0 0;
    align-self: flex-end;
}

@media (max-width: 989px){
    #top .__referenz-grid-filter{
        display: flex;
        overflow: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    #top .__referenz-grid{
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 1em;
        scrollbar-width: none;
    }
    #top .__referenz-grid-filter::-webkit-scrollbar,
    #top .__referenz-grid::-webkit-scrollbar{
        display: none;
    }
    #top .__referenz-grid-filter > *{
        flex-shrink: 0;
    }
    #top .__referenz-grid > article{
        flex: 0 0 420px;
        max-width: 80%;
        scroll-snap-align: start;
        padding: 1em;
    } 
}