/* ============================================================
 * GALERIE
 * ============================================================ */

.galerie {
    width: 100%;
    margin: 2rem 0;
}

.galerie-header {
    margin-bottom: 1.5rem;
}

.galerie-header h2 {
    margin-bottom: .25rem;
}

.galerie-ort {
    margin: 0;
    opacity: .75;
}

/* ------------------------------------------------------------
 * Hinweis zur Bild-Großansicht
 * ------------------------------------------------------------ */

.galerie-hinweis {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;

    margin: 0.75rem 0 1.25rem;

    color: #666;
    font-size: 0.9rem;
    line-height: 1.45;
}

.galerie-hinweis span:first-child {
    flex-shrink: 0;
}

/* ------------------------------------------------------------
 * Galerie – Disclaimer
 * ------------------------------------------------------------ */

.galerie-disclaimer {
    margin: 1rem 0 1.5rem;
    padding: 0.9rem 1.2rem;

    border-left: 4px solid #3db2e2;
    border-radius: 0 6px 6px 0;

    background: rgba(61, 178, 226, 0.08);

    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.galerie-disclaimer-titel {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #2c3e50;
}

.galerie-disclaimer p {
    margin: 0;
}

.galerie-zeilenumbruch {
    grid-column: 1 / -1;
    height: 1px;
    margin: 0;
    padding: 0;
    visibility: hidden;
}

.galerie-heading {
    grid-column: 1 / -1;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.4rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C3E50;
    border-bottom: 2px solid #3db2e2;
}

/* ============================================================
 * GRID
 * ============================================================ */

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}


/* ============================================================
 * GALERIE-BILDER
 * ============================================================ */

.galerie-item {
    margin: 0;
}

.galerie-bild-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.galerie-bild-button img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;

    transition:
        transform .2s ease,
        opacity .2s ease;
}

.galerie-bild-button:hover img {
    transform: scale(1.02);
    opacity: .92;
}


/* ============================================================
 * UNTERTEXT
 * ============================================================ */

.galerie-item figcaption {
    margin-top: .5rem;
    font-size: .95rem;
    line-height: 1.4;
}


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

.galerie-lightbox {

    position: fixed;
    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 4rem 6rem 3rem;

    background: rgba(0, 0, 0, .94);

    box-sizing: border-box;
}

.galerie-lightbox.is-open {
    display: flex;
}


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

.lightbox-content {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    width: auto;

    max-width: 92vw;

    max-height: 92vh;

    margin: 0 auto;

    text-align: center;

    box-sizing: border-box;
}


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

.lightbox-content img {

    display: block;

    width: auto;

    height: auto;

    max-width: 88vw;

    max-height: 76vh;

    margin: 0 auto;

    object-fit: contain;

    border-radius: 4px;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, .7);
}


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

.lightbox-description {

    width: 100%;
    max-width: 900px;
    margin: 1rem auto 0;
    padding: 0 .5rem;
    color: #f5f5f5;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, .9);
    box-sizing: border-box;
    white-space: pre-line;

}


/* ============================================================
 * SCHLIESSEN
 * ============================================================ */

.lightbox-close {

    position: fixed;

    top: 1rem;
    right: 1.25rem;

    z-index: 10001;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 3.5rem;
    height: 3.5rem;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, .65);

    color: #fff;

    font-size: 2.4rem;
    line-height: 1;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.lightbox-close:hover {

    background: rgba(255, 255, 255, .2);

    transform: scale(1.08);
}


/* ============================================================
 * VOR / ZURÜCK
 * ============================================================ */

.lightbox-prev,
.lightbox-next {

    position: fixed;

    top: 50%;

    z-index: 10001;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 4.5rem;
    height: 7rem;

    margin: 0;

    padding: 0;

    border: none;
    border-radius: 8px;

    background: rgba(0, 0, 0, .65);

    color: #fff;

    font-size: 4rem;
    font-weight: normal;

    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background .2s ease,
        transform .2s ease;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {

    background: rgba(255, 255, 255, .2);

    transform: translateY(-50%) scale(1.05);
}


/* ============================================================
 * BODY WÄHREND LIGHTBOX
 * ============================================================ */

body.lightbox-open {
    overflow: hidden;
}
body.lightbox-open .back-button {
    display: none !important;
}

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

@media (max-width: 900px) {

    .galerie-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .galerie-lightbox {
        padding: 4rem 5rem 2rem;
    }

    .lightbox-content img {
        max-width: 86vw;
        max-height: 73vh;
    }
}


/* ============================================================
 * MOBILE
 * ============================================================ */

@media (max-width: 600px) {

    .galerie-grid {
        grid-template-columns: 1fr;
    }

    .galerie {
        margin-top: 1rem;
    }

    .galerie-lightbox {
        padding: 4rem 3.5rem 1.5rem;
    }

    .lightbox-content {
        max-width: 100%;
        max-height: 100%;
    }

    .lightbox-content img {
        max-width: 88vw;
        max-height: 67vh;
    }

    .lightbox-description {
        max-width: 88vw;
        font-size: .9rem;
        line-height: 1.45;
        margin-top: .75rem;
    }

    .lightbox-close {

        top: .5rem;
        right: .5rem;

        width: 3rem;
        height: 3rem;

        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {

        width: 3rem;
        height: 5rem;

        font-size: 2.7rem;
    }

    .lightbox-prev {
        left: .25rem;
    }

    .lightbox-next {
        right: .25rem;
    }
}
