.gallery {
    column-gap: 16px;
    margin-top: 50px;
}

@media (min-width: 992px) {
    .gallery {
        column-count: 4;
    }
}

@media (min-width: 481px) and (max-width: 991px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 2;
    }
}

.gallery article {
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
    break-inside: avoid;
    transition: opacity 0.3s ease;
}

.gallery article img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal {
    display: none; /* Sicherstellen, dass das Modal zunächst verborgen ist */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    text-align: center;
}

.modal-content {
    width: 100vw;
    height: 100vh;
    display: flex;
    display: -webkit-flex;
    display: -ms-flex; 
    align-content:center;
    -ms-flex-line-pack:center;
    align-items:center;
    -ms-flex-align:center;
    justify-content:center;
    -ms-flex-pack:center;
    background-color: #cce5ffb5; /* Heller Hintergrund mit Transparenz */
    backdrop-filter: blur(10px); /* Unschärfe-Effekt */
    -webkit-backdrop-filter: blur(10px); /* Unterstützung für Safari */
}

.modal img {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

img#modal-image {
    max-height: 80vh;
    width: auto;
    max-width: 80vw;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #000;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}