/* ══════ PROJECT CARD PHOTO COUNT ══════ */
.project-card__count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    position: absolute;
    bottom: 12px;
    right: 12px;
}

/* ══════ GALLERY LIGHTBOX ══════ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Close button */
.gallery-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.gallery-lightbox__close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Nav arrows */
.gallery-lightbox__prev,
.gallery-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.gallery-lightbox__prev { left: 16px; }
.gallery-lightbox__next { right: 16px; }

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
    background: rgba(0, 102, 204, 0.3);
    border-color: rgba(0, 170, 255, 0.4);
    transform: translateY(-50%) scale(1.08);
}

/* Main image */
.gallery-lightbox__content {
    position: relative;
    z-index: 5;
    max-width: 85vw;
    max-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transition: opacity 0.3s;
}

.gallery-lightbox__img.loading {
    opacity: 0.3;
}

/* Info bar */
.gallery-lightbox__info {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding: 0 20px;
}

.gallery-lightbox__title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.gallery-lightbox__counter {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Thumbnails */
.gallery-lightbox__thumbs {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 0 20px;
    overflow-x: auto;
    max-width: 90vw;
    scrollbar-width: none;
}

.gallery-lightbox__thumbs::-webkit-scrollbar { display: none; }

.gallery-lightbox__thumb {
    width: 56px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.3s;
    flex-shrink: 0;
}

.gallery-lightbox__thumb:hover {
    opacity: 0.8;
}

.gallery-lightbox__thumb.active {
    border-color: #00AAFF;
    opacity: 1;
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-lightbox__prev,
    .gallery-lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .gallery-lightbox__prev { left: 8px; }
    .gallery-lightbox__next { right: 8px; }

    .gallery-lightbox__content {
        max-width: 95vw;
        max-height: 55vh;
    }

    .gallery-lightbox__img {
        max-height: 55vh;
        border-radius: 8px;
    }

    .gallery-lightbox__thumb {
        width: 44px;
        height: 33px;
    }

    .gallery-lightbox__close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }
}
