/* PE-Lightbox: Overlay nativo per immagini */
.pe-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.pe-lightbox--active {
    display: flex;
    opacity: 1;
}

.pe-lightbox__content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pe-lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pe-lightbox--active .pe-lightbox__image {
    transform: scale(1);
}

.pe-lightbox__caption {
    color: white;
    margin-top: 1.5rem;
    font-size: 1rem;
    text-align: center;
    font-family: var(--font-main);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Controlli */
.pe-lightbox__close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    transition: transform 0.2s;
}

.pe-lightbox__close:hover {
    transform: scale(1.2);
    color: var(--accent);
}

.pe-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
}

.pe-lightbox__nav:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.pe-lightbox__nav--prev { left: -80px; }
.pe-lightbox__nav--next { right: -80px; }

.pe-lightbox__nav svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .pe-lightbox__nav--prev { left: 10px; background: rgba(0,0,0,0.3); }
    .pe-lightbox__nav--next { right: 10px; background: rgba(0,0,0,0.3); }
    .pe-lightbox__close { top: 10px; right: 10px; z-index: 10002; }
}

@media (max-width: 768px) {
    .pe-lightbox__nav { width: 44px; height: 44px; }
    .pe-lightbox__nav svg { width: 20px; height: 20px; }
    .pe-lightbox__caption { font-size: 0.9rem; padding: 0 1rem; }
}
