/* Grid-Layout für zeilenweise Darstellung (Links nach Rechts) */
        .gallery-masonry {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-top: 40px;
        }
        
        .gallery-item {
            cursor: pointer;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            /* Eine feste Höhe sorgt für absolut gerade und aufgeräumte Zeilen */
            height: 250px; 
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Füllt das Kästchen perfekt aus, ohne das Bild zu verzerren */
            display: block;
            transition: transform 0.3s ease;
        }

        .gallery-item:hover img {
            transform: scale(1.03);
        }

        /* Responsives Verhalten der Galerie: Von 3 auf 2 auf 1 Spalte */
        @media (max-width: 992px) {
            .gallery-masonry { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 576px) {
            .gallery-masonry { grid-template-columns: 1fr; }
        }

        /* Lightbox Modal Styles (ab hier bleibt alles wie vorher) */

        /* Lightbox Modal Styles */
        .lightbox-modal {
            display: none;
            position: fixed;
            z-index: 9999;
            padding-top: 50px;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(5px);
        }

        .lightbox-content {
            margin: auto;
            display: block;
            max-width: 90%;
            max-height: 85vh;
            object-fit: contain;
            border-radius: 4px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.5);
            animation: zoomIn 0.3s ease;
        }

        @keyframes zoomIn {
            from {transform:scale(0.9); opacity:0;}
            to {transform:scale(1); opacity:1;}
        }

        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            transition: 0.3s;
        }

        .lightbox-prev, .lightbox-next {
            cursor: pointer;
            position: absolute;
            top: 50%;
            width: auto;
            padding: 20px;
            margin-top: -50px;
            color: white;
            font-weight: bold;
            font-size: 40px;
            transition: 0.3s;
            user-select: none;
            background-color: rgba(0,0,0,0.3);
            border-radius: 3px;
        }

        .lightbox-next { right: 2%; }
        .lightbox-prev { left: 2%; }

        .lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover {
            color: #d4af37;
            background-color: rgba(0,0,0,0.8);
        }