/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(var(--primary-rgb), .96);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity .3s ease;
}
.lightbox.active {
    display: flex;
    opacity: 1;
}
.lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: lb-in .3s ease;
}
@keyframes lb-in {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}
.lb-close, .lb-nav {
    position: absolute;
    background: rgba(var(--on-dark-rgb), .1);
    color: var(--on-dark);
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background .2s, transform .2s;
    backdrop-filter: blur(6px);
}
.lb-close:hover, .lb-nav:hover {
    background: var(--accent);
    transform: scale(1.08);
}
.lb-close {
    top: 24px;
    right: 24px;
    width: 48px; height: 48px;
}
.lb-close svg { width: 22px; height: 22px; }
.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
}
.lb-nav svg { width: 26px; height: 26px; }
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

.lb-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--on-dark);
    background: rgba(0, 0, 0, .5);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: .95rem;
    backdrop-filter: blur(6px);
}
.lb-counter {
    position: absolute;
    top: 24px;
    left: 24px;
    color: rgba(var(--on-dark-rgb), .7);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
}

@media (max-width: 900px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .g-item.g-wide { grid-column: span 2; }
    .g-item.g-tall { grid-row: span 2; }
    .security-wrap { grid-template-columns: 1fr; gap: 40px; }
    .lb-nav { width: 44px; height: 44px; }
    .lb-prev { left: 12px; }
    .lb-next { right: 12px; }
    .lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
    .lb-caption { bottom: 20px; font-size: .82rem; padding: 8px 16px; }
    .loc-photo-overlay { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (max-width: 500px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
    .g-item.g-wide, .g-item.g-tall { grid-column: auto; grid-row: auto; }
    .security-list { grid-template-columns: 1fr; }
}

