/* ===== BILDERGALERIE STYLESHEET ===== */
/* Diese Datei ergänzt das bestehende style.css */

/* ===== GALERIE-GRID ===== */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Galerie-Item (Thumbnail-Container) */
.galerie-item {
    position: relative;
    overflow: hidden;
    background-color: #f5f2ec;
    border: 3px solid #e4d5b8;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.galerie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(153, 41, 37, 0.2);
    border-color: #992925;
}

/* Bild-Wrapper für einheitliche Höhe */
.galerie-item-image-wrapper {
    width: 100%;
    height: 200px; /* Einheitliche Höhe für alle Thumbnails */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild wird beschnitten, um Container zu füllen */
    display: block;
    transition: transform 0.3s ease;
}

.galerie-item:hover img {
    transform: scale(1.1);
}

/* Overlay beim Hover */
.galerie-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.galerie-item:hover::after {
    opacity: 1;
}

/* Bildunterschrift (optional) */
.galerie-item-caption {
    padding: 0.8rem;
    background-color: #f5f2ec;
    text-align: center;
    font-size: 0.9rem;
    color: #333333;
    border-top: 1px solid #e4d5b8;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Lightbox-Bild */
.lightbox-image {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Schließen-Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    user-select: none;
}

.lightbox-close:hover {
    color: #992925;
}

/* Navigation (Vor/Zurück) */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    padding: 1rem;
    user-select: none;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(153, 41, 37, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Bildunterschrift in Lightbox */
.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.1rem;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    max-width: 80%;
    text-align: center;
}

/* ===== RESPONSIVE ANPASSUNGEN ===== */

/* Tablets */
@media (max-width: 768px) {
    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .galerie-item-image-wrapper {
        height: 180px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.5rem;
    }
    
    .lightbox-close {
        font-size: 2.5rem;
        right: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .galerie-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .galerie-item-image-wrapper {
        height: 250px;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 80%;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        bottom: 20px;
    }
}

/* Ladeanimation (optional) */
.galerie-item.loading {
    background: linear-gradient(90deg, #f5f2ec 25%, #e4d5b8 50%, #f5f2ec 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Keine Bilder vorhanden */
.galerie-empty {
    text-align: center;
    padding: 3rem;
    color: #505050;
    font-style: italic;
}
