/* ========================================
   TECH SERVIZI v2 — Lightbox
   ======================================== */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
    -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .lightbox-overlay {
    background: rgba(10, 10, 10, 0.96);
}

/* ── Content protection ─────────────── */
img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
.gallery-img,
[data-lightbox],
.service-card,
.logo,
.about-visual img {
    pointer-events: auto;
}
.gallery-img img,
[data-lightbox] img,
.about-visual img {
    pointer-events: none;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-overlay.active img {
    transform: scale(1);
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--bg-off);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10000;
}
.lightbox-close:hover {
    background: var(--accent-glow);
    transform: scale(1.1);
}
.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}
.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }

/* Caption */
.lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: var(--font);
    text-align: center;
    max-width: 80vw;
    pointer-events: none;
}

/* Project cards clickable hint */
.gallery-img,
[data-lightbox] {
    cursor: zoom-in;
}
.project-card .img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}
.project-card .img:hover::after {
    background: rgba(0, 0, 0, 0.08);
}
