/* ==========================================================================
   REFERENZEN GRID
   Kein Wrapper-Div noetig: .referenz-item floatet direkt im umgebenden
   Content-Container, egal was sonst noch in der Spalte steht.
   ========================================================================== */

.content-container::after {
    content: "";
    display: table;
    clear: both;
}

.referenz-item {
    position: relative;
    float: left;
    width: 33.3333%;
    padding: 2px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}

@media only screen and (max-width: 991px) {
    .referenz-item {
        width: 50%;
    }
}

@media only screen and (max-width: 600px) {
    .referenz-item {
        width: 100%;
    }
}

.referenz-item-teaser {
    display: block;
    width: 100%;
    height: auto;
}

.referenz-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(175, 153, 127, 0.92); /* #af997f */
    color: #fff;
    opacity: 0;
    transform: translateY(100%);
    transition: all .4s cubic-bezier(.19, 1, .22, 1);
}

.referenz-item:hover .referenz-item-overlay {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.referenzen-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
}

.referenzen-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.referenzen-lightbox img#referenzen-lightbox-image {
    max-width: min(90%, 1100px);
    max-height: 80vh;
}

.referenzen-lightbox-caption {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10vh;
    width: min(90%, 1100px);
    padding: 20px 40px;
    background: rgba(175, 153, 127, 0.92);
    color: #fff;
    box-sizing: border-box;
}


/* i / X Button oben rechts */

.button-description {
    font-size: 22px;
    line-height: 70px;
    position: absolute;
    z-index: 100;
    top: 0;
    right: 0;
    overflow: hidden;
    width: 70px;
    height: 70px;
    cursor: pointer;
    text-align: center;
    color: #fff;
}

.button-description .content-visible,
.button-description .content-hidden {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    transition: all .6s cubic-bezier(.19, 1, .22, 1);
    background: #af997f;
}

.button-description .content-visible {
    left: 0;
}

.button-description.active .content-visible {
    left: 300%;
}

.button-description .content-hidden {
    left: 300%;
}

.button-description.active .content-hidden {
    left: 0;
}


/* Rechtes Info-Panel (KUNDE / KATEGORIE / URL) */

.container-info {
    position: absolute;
    z-index: 50;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    width: 32.8%;
    transition: all .6s cubic-bezier(.19, 1, .22, 1);
    transform: translateX(100%);
    background: #111;
}

.container-info.active {
    transform: translateX(0);
}

.container-info ul {
    margin: 20px 40px 0 89px;
    padding: 0;
    list-style: none;
}

.container-info ul li {
    margin-bottom: 50px;
}

.container-info ul li:last-child {
    margin-bottom: 0;
}

.container-info ul li h5 {
    font-weight: 300;
    margin-bottom: .5em;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #af997f;
}

.container-info ul li p,
.container-info ul li a {
    color: #fff;
    line-height: 1.7em;
}


/* Zurueck-Pfeil (schliesst komplette Lightbox) */

.referenzen-lightbox-close {
    position: fixed;
    z-index: 100;
    top: 50%;
    left: 0;
    width: 60px;
    height: 100px;
    transform: translateY(-50%);
    background: #af997f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 30px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media only screen and (max-width: 767px) {
    .container-info {
        width: 100%;
        transform: translateY(100%);
    }

    .container-info.active {
        transform: translateY(0);
    }

    .referenzen-lightbox img#referenzen-lightbox-image {
        max-width: 95%;
        max-height: 60vh;
    }

    .referenzen-lightbox-caption {
        width: 95%;
        bottom: 2vh;
    }
}
