/* Custom Modern Lightbox */
.custom-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-lightbox.visible {
    opacity: 1;
}

.custom-lightbox-img {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255,255,255,0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.custom-lightbox-img.switching {
    opacity: 0;
    transform: scale(0.92);
}

.custom-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(239,83,80,0.8), rgba(240,98,146,0.8));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(239,83,80,0.3);
}

.custom-lightbox-close:hover {
    background: linear-gradient(135deg, rgba(239,83,80,1), rgba(240,98,146,1));
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(239,83,80,0.5);
}

.custom-lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2.5;
    fill: none;
}

.custom-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, rgba(66,165,245,0.8), rgba(171,71,188,0.8));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(66,165,245,0.3);
}

.custom-lightbox-nav:hover {
    background: linear-gradient(135deg, rgba(66,165,245,1), rgba(171,71,188,1));
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(66,165,245,0.5);
}

.custom-lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2.5;
    fill: none;
}

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

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

.custom-lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 10;
    background: linear-gradient(135deg, rgba(66,165,245,0.6), rgba(171,71,188,0.6));
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.custom-lightbox-hint {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    z-index: 10;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .custom-lightbox-img {
        max-width: 95vw;
        max-height: 78vh;
        border-radius: 8px;
    }

    .custom-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .custom-lightbox-prev { left: 8px; }
    .custom-lightbox-next { right: 8px; }

    .custom-lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }

    .custom-lightbox-hint {
        display: none;
    }
}
