/* ═══════════════════════════════════════
   GALLERY & LIGHTBOX — Komboa Kenya
   ═══════════════════════════════════════ */

/* ─── MASONRY GRID ──────────────────── */
.gallery-grid {
    columns: 3;
    column-gap: 12px;
}
@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform .4s ease;
}
.gallery-item:hover img {
    transform: scale(1.03);
}
.gallery-item__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
    padding: 24px 14px 12px;
    font-size: .82rem;
    line-height: 1.4;
    opacity: 0;
    transition: opacity .3s ease;
}
.gallery-item:hover .gallery-item__caption {
    opacity: 1;
}

/* ─── ALBUM CARDS ───────────────────── */
.gallery-album {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-album:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.gallery-album__image {
    position: relative;
    overflow: hidden;
}
.gallery-album__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-album:hover .gallery-album__image img {
    transform: scale(1.05);
}
.gallery-album__count {
    position: absolute;
    bottom: 10px; right: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.gallery-album__body {
    padding: 16px;
}
.gallery-album__body h4 {
    font-size: 1rem;
    color: #212529;
    margin-bottom: 4px;
}
.gallery-album__body p {
    font-size: .82rem;
    color: #6c757d;
    margin: 0;
}

/* ─── LIGHTBOX ──────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.lightbox.is-open {
    display: flex;
    animation: lbFadeIn .2s ease;
}
.lightbox__content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox__content img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.lightbox__caption {
    color: rgba(255,255,255,.8);
    font-size: .9rem;
    margin-top: 12px;
    text-align: center;
    max-width: 600px;
}
.lightbox__close,
.lightbox__nav {
    position: fixed;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background .2s;
    z-index: 10;
}
.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255,255,255,.25);
}
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.5);
    font-size: .8rem;
    font-weight: 600;
}

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── MODAL OVERLAY (public pages) ──── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.is-open {
    display: flex;
    animation: lbFadeIn .2s ease;
}
.modal-overlay .modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: modalSlideUp .25s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
