/* Galerie Grid */
.cert-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start; /* Oder 'center' */
    margin: 30px 0;
}

.cert-item {
    width: 150px; /* Größe der Thumbnails im Text */
    text-align: center;
}

.cert-item img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    cursor: zoom-in;
    border-radius: 4px;
}

.cert-item img:hover {
    transform: scale(1.05);
}

.cert-caption {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.2;
}

/* Modal (Overlay) Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); /* Fast schwarzer Hintergrund für Fokus */
    backdrop-filter: blur(5px); /* Schöner Unschärfe-Effekt im Hintergrund */
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 85vh; /* Damit es auf den Screen passt */
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    margin-top: 5vh;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-family: sans-serif;
}

/* Animation beim Öffnen */
.modal-content, #modal-caption {  
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Schließen-Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2010;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile Anpassung */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}
