/* ---------------------------------------------------------
   KATEGORIEN (linke Karte)
--------------------------------------------------------- */

/* Wrapper für die gesamte Kategorie-Liste */
.gallery-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Erste Ebene */
.gallery-category-list-level {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Kategorie-Links */
.gallery-category-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    background: #eee;
    margin-bottom: 6px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

/* Hover */
.gallery-category-list a:hover {
    background: #ddd;
}

/* Aktive Kategorie */
.gallery-category-list .cat-item.active > a {
    background: #ffcc00;
    font-weight: bold;
}

/* Unterkategorien standardmäßig verstecken */
.gallery-category-list li ul {
    display: none;
    padding-left: 15px; /* leichte Einrückung */
}

/* Geöffnete Unterkategorien */
.gallery-category-list li.cat-item.open > ul {
    display: block;
}

/* Linke Karte sticky machen */
.grid-secondary > article:first-child {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* ---------------------------------------------------------
   GALERIE-GRID (rechte Karte)
--------------------------------------------------------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.gallery-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* ---------------------------------------------------------
   LIGHTBOX
--------------------------------------------------------- */

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

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
    color: #fff;
}

/* ---------------------------------------------------------
   LAYOUT: Linke Karte schmal, rechte groß
--------------------------------------------------------- */

.grid-gallery {
    display: grid;
    grid-template-columns: 260px 1fr; /* Links fix, rechts flexibel */
    gap: 20px;
    align-items: start;
}

/* Mobile Ansicht */
@media (max-width: 800px) {
    .grid-gallery {
        grid-template-columns: 1fr;
    }
}