/* ===== GALERIE STYLES ===== */

/* Galerie-Stile - CLS optimiert aber funktional */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    flex: 1 1 calc(25% - 20px);
    box-sizing: border-box;
    max-width: 400px;
    min-width: 250px;
    aspect-ratio: 3/2; /* CLS-Optimierung */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Responsive Galerie */
@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 100%;
    }
    
    .gallery {
        gap: 15px;
        padding: 15px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

.modal-content, .close {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-title {
    position: static;
    display: block;
    margin: 0 auto 20px auto;
    padding: 10px 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 8px;
    font-size: 24px;
    font-family: 'ProgressFont', Arial, sans-serif;
    letter-spacing: 0.1em;
    text-align: center;
}
