body {
    font-family: 'Helvetica', sans-serif;
    margin: 0;
    background-color: #f5f5f5;
}

.media-section {
    padding: 2em 1em;
    max-width: 1200px;
    margin: auto;
}

.media-section h2 {
    text-align: center;
    font-family: 'Libre Baskerville', serif;
    margin-bottom: 1em;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1em;
    align-items: stretch;
}

.media-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 500px; /* Feste Höhe für die Container */
}

.media-item img,
.media-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild füllt den Container aus, kann zuschneiden */
    border-radius: 8px;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-item img:hover {
    transform: scale(1.03);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .media-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto; /* Feste Höhe für die Container */
}
    
}