/* ============================================
   GALLERY LIGHTBOX — Fullscreen Image Viewer
   ============================================ */

.gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.gallery-item::after {
    content: '\f065';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    color: #fff;
    font-size: 24px;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
    z-index: 3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    pointer-events: none;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(53, 93, 75, 0.4);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
    border-radius: 15px;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox Overlay */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    cursor: zoom-out;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Image */
.gallery-lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.85);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}

.gallery-lightbox.active img {
    transform: scale(1);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.15);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg) scale(1.1);
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.15);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

/* Counter */
.lightbox-counter {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 2px;
}

/* Body lock when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
    .gallery-lightbox img {
        max-width: 95vw;
        max-height: 85vh;
    }
}
