/* Gallery-specific styles (uses variables from app.css) */

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

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 16px;
    }
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    background: #fff;
    aspect-ratio: 3 / 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery-item:hover img {
    transform: scale(1.07);
}

.gallery-item__hits {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: .72rem;
    background: rgba(10, 37, 64, .72);
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Lightbox overlay */
.lb {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(6, 15, 26, .92);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wichtig: hidden muss display:flex ueberschreiben, sonst ist das Overlay
   immer sichtbar und verdeckt die Galerie. */
.lb[hidden] {
    display: none;
}

.lb__figure {
    margin: 0;
    max-width: 92vw;
    max-height: 90vh;
    text-align: center;
}

.lb__img {
    max-width: 92vw;
    max-height: 80vh;
    margin-inline: auto;
    border-radius: 6px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.lb__cap {
    color: #dbe7f4;
    margin-top: 10px;
    font-size: .95rem;
    min-height: 1.2em;
}

.lb__close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 2.2rem;
    line-height: 1;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
}

.lb__play {
    position: absolute;
    top: 14px;
    right: 62px;
    font-size: 1.4rem;
    line-height: 1;
    background: rgba(255, 255, 255, .14);
    border: 0;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.lb__play:hover {
    background: rgba(255, 255, 255, .28);
}

.lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 1.6rem;
    width: 52px;
    height: 64px;
    border-radius: 10px;
}

.lb__nav:hover {
    background: rgba(255, 255, 255, .25);
}

.lb__prev {
    left: 12px;
}

.lb__next {
    right: 12px;
}

.lb__counter {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: #cfe0f2;
    font-size: .85rem;
}

@media (max-width: 600px) {
    .lb__nav {
        width: 44px;
        height: 56px;
        font-size: 1.3rem;
    }
}

/* Gallery catalogue */
.gallery-cats {
    display: grid;
    gap: 26px;
}

.gallery-cats h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}