/* ===== Lightbox Gallery ===== */
#image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: default;
    -webkit-user-select: none;
    user-select: none;
}

#image-lightbox.active {
    display: flex;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent, #ff4d6a);
    transform: scale(1.1);
}

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

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

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Image container */
.lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 160px);
    max-height: calc(100% - 100px);
    position: relative;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transition: opacity 0.25s ease;
    -webkit-user-drag: none;
}

.lightbox-image-wrapper img.loading {
    opacity: 0.3;
}

/* Counter */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    z-index: 10;
    text-transform: uppercase;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav.prev {
        left: 8px;
    }

    .lightbox-nav.next {
        right: 8px;
    }

    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-image-wrapper {
        max-width: calc(100% - 80px);
        max-height: calc(100% - 80px);
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .lightbox-counter {
        bottom: 14px;
        font-size: 0.72rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .lightbox-nav {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
    }

    .lightbox-nav.prev {
        left: 4px;
    }

    .lightbox-nav.next {
        right: 4px;
    }

    .lightbox-image-wrapper {
        max-width: calc(100% - 56px);
    }
}
