/* Box-Sizing Reset */
* {
    box-sizing: border-box;
}

/* Vorschaubilder – mobil nehmen sie die volle Breite */
.lightbox-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    cursor: pointer;
    max-width: 100%;
}

/* Container für Bild + evtl. Figure */
.lightbox-item > figure {
    display: block;
    margin: 0 auto;
}

/* Lightbox Overlay */
.lightbox-modal {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.9);
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: white;
}

/* Modal sichtbar machen */
.lightbox-modal.show {
    opacity: 1;
    pointer-events: all;
    z-index: 999
}

/* Bild in der Lightbox */
.lightbox-modal img {
    width: auto;
    max-width: 100vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
}

/* Close-Button */
.lightbox-modal .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Figcaption (falls nötig) */
.lightbox-item figcaption,
.lightbox-modal figcaption {
    text-align: center;
    font-size: 12px;
    margin-top: 0.5rem;
}

/* -------- Desktop Anpassungen -------- */
@media (min-width: 768px) {
    /* Vorschaubilder auf Desktop kleiner */
    .lightbox-item img {
        max-width: 250px;
    }

    .lightbox-modal img {
        max-width: 90vw;
        max-height: 90vh;
    }
}
