


/* Galerie */
.image-gallery {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.break {
    flex-basis: 100%;
}

/* Bild-Element nur innerhalb der Galerie */
.image-gallery .item {
    flex: 0 0 calc(25% - 20px);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.image-gallery .item img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.image-gallery .item:hover {
    z-index: 999;
}

.image-gallery .item:hover img {
    transform: scale(2);
}


/* ----------------------------- */
/* LIGHTBOX OVERLAY */
/* ----------------------------- */
.lightbox {
    display: none;                 /* Start: unsichtbar */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;

    /* Kein Flex-Stretch! */
    justify-content: center;
    align-items: center;

    margin-top: 100px;
}

/* ----------------------------- */
/* KLICKZONEN */
/* ----------------------------- */
.lightbox-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 50%;
    cursor: pointer;
    z-index: 9000;
}

.zone-left { left: 0; }
.zone-right { right: 0; }

/* ----------------------------- */
/* LIGHTBOX-INHALT */
/* ----------------------------- */
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;

    /* verhindert Flex-Stretch */
    display: flex;
    flex-direction: column;
    align-items: center;

    z-index: 10000;
}

/* ----------------------------- */
/* BILD */
/* ----------------------------- */
.lightbox-inner img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 80vh;

    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);

    transition: transform 0.3s ease;
}


/* ----------------------------- */
/* CAPTION */
/* ----------------------------- */
#lightbox-caption {
    margin-top: 12px;
    font-size: 1rem;
    text-align: center;
}

/* ----------------------------- */
/* BUTTONS */
/* ----------------------------- */
.lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-nav.prev { left: -60px; }
.lightbox-nav.next { right: -60px; }



.zoom-lens {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 8%;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none;
    display: none; /* Start: unsichtbar */
    background-repeat: no-repeat;
    background-size: 300%; /* Vergrößerung */
    z-index: 20000 !important;
}

.lightbox-hint,
.gallery-hint {
    margin-top: 5px auto 0 auto;
    font-size: clamp(0.6rem, 1.1vw, 0.8rem);
    color: darkgrey;
    text-align: center;
    //line-height: 1.4;
    max-width: 90%;
}
.lightbox-hint::before {
    content: "Navigation: Pfeile oder ← →  /    Beenden: Esc";
  }

  /* Responsiv */
@media (max-width: 900px) {
    .item { width: calc(50% - 20px); }
}

@media (max-width: 600px) {
    .item { width: 100%; }
    .zoom-lens {        display: none !important;    }
    .lightbox-hint::before {
        content: "Navigation: links/rechts Wischen   <br>   Schließen: Nach unten wischen";
      }

}
