/* Container für Masonry */
#image-container {
    width: 100%;
    margin: 0 auto;
}

/* Jedes Grid-Item */
.grid-item {
    width: 48%; /* 2 Spalten */
    margin-bottom: 10px;
    display: block;
    float: left;
    padding-right: 10px;
}

/* Bild innerhalb des Grid-Items */
.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 1 !important; /* direkt sichtbar */
    transition: opacity 0.5s ease;
}

/* Modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: 0 auto;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Prev/Next Buttons */
.prev, .next {
    position: absolute;
    top: 50%;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
}

.prev { left: 20px; }
.next { right: 20px; }

/* Thumbnail Previews */
.preview-images {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.preview-images img {
    width: 60px;
    height: auto;
    margin: 2px;
    cursor: pointer;
}
