.masonry-gallery-container {
    margin: 0 auto;
    padding: 10px;
}

.masonry-gallery-container .gallery-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.masonry-gallery-container .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.masonry-gallery-container .gallery-item:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.masonry-gallery-container .gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.masonry-gallery-container .gallery-item:hover .caption {
    opacity: 1;
}

.masonry-gallery-container[data-animation="fade-in"] .gallery-item {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.masonry-gallery-container[data-animation="slide-in"] .gallery-item {
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideIn {
    to { transform: translateY(0); opacity: 1; }
}

/* Magnific Popup Overrides */
.mfp-content .mfp-figure {
    max-width: 90%;
    margin: auto;
}

.mfp-title {
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

/* Preview Styling */
.masonry-gallery-preview {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    margin: 0 auto 20px;
    padding: 10px;
    max-height: 200px;
    align-items: center;
    justify-content: center;
}

.masonry-gallery-preview .preview-item {
    flex: 0 0 auto;
    margin-right: 10px;
}

.masonry-gallery-preview .preview-image {
    /* max-width: 250px; */
    /* min-height: 200px; */
    height: 200px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .masonry-gallery-preview .preview-image {
        max-height: 150px; /* Kleinere Bilder auf Mobile */
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .masonry-gallery-preview .preview-image {
        max-height: 200px; /* Mittlere Größe für Tablets */
    }
}