/* ============================================================
   Sven Gallery — strakke fotogallerij
   ============================================================ */

/* Wrap */
.sven-gallery-wrap {
    width: 100%;
    max-width: 100%;
    user-select: none;
}

/* ── Navigatie ───────────────────────────────────────────── */
.sven-gallery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #1c1c1c;
    margin-bottom: 0;
}

.sven-gallery-filter {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    outline-offset: 4px;
}

.sven-gallery-filter:hover {
    color: #111;
}

.sven-gallery-filter.active {
    color: #111;
    border-bottom-color: #111;
}

/* ── Grid ────────────────────────────────────────────────── */
.sven-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    background-color: #000;
}

/* ── Cel ─────────────────────────────────────────────────── */
.sven-gallery-cell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #111;
    cursor: pointer;
}

.sven-gallery-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.sven-gallery-cell img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.45s ease;
    will-change: opacity, transform;
}

.sven-gallery-cell img.loaded {
    opacity: 1;
}

.sven-gallery-cell:hover img {
    transform: scale(1.06);
}

/* Overlay */
.sven-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sven-gallery-cell:hover .sven-gallery-overlay {
    opacity: 1;
}

.sven-gallery-cell-title {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.sven-gallery-cell-cat {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.sven-lb-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 99998;
    cursor: zoom-out;
}

.sven-lb-backdrop.open {
    display: block;
}

.sven-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sven-lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.sven-lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(90vw, 1200px);
    max-height: 80vh;
}

.sven-lb-img-wrap img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

/* Lightbox knoppen */
.sven-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 4px 8px;
    font-weight: 200;
}

.sven-lb-close:hover { opacity: 1; }

.sven-lb-prev,
.sven-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 64px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    padding: 16px 12px;
    font-weight: 100;
    user-select: none;
}

.sven-lb-prev { left: 8px; }
.sven-lb-next { right: 8px; }
.sven-lb-prev:hover,
.sven-lb-next:hover { opacity: 1; }

/* Caption */
.sven-lb-caption {
    margin-top: 18px;
    text-align: center;
    pointer-events: none;
}

.sven-lb-title {
    display: block;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.06em;
}

.sven-lb-cat {
    display: block;
    color: #777;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 6px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .sven-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }

    .sven-gallery-filter {
        padding: 12px 18px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .sven-gallery-filter {
        padding: 10px 12px;
        letter-spacing: 0.08em;
    }

    .sven-lb-prev,
    .sven-lb-next {
        font-size: 44px;
    }
}
