/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox__container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-10px);
}

.lightbox__image {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
    position: absolute;
    top: -25px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close:hover {
    opacity: 0.7;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 20px 20px;
    border-radius: 50%;
    transition: background 0.2s ease, opacity 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox__nav--prev {
    left: -80px;
}

.lightbox__nav--next {
    right: -80px;
}

.lightbox__counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Курсор для элементов, которые открывают lightbox */
.lightbox-trigger {
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .lightbox__container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox__image {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox__close {
        top: -15px;
        right: -30px;
        padding: 8px;
    }

    .lightbox__close svg {
        width: 18px;
        height: 18px;
    }

    .lightbox__nav {
        padding: 12px 16px;
    }

    .lightbox__nav svg {
        width: 10px;
        height: 10px;
    }

    .lightbox__nav--prev {
        left: -60px;
    }

    .lightbox__nav--next {
        right: -60px;
    }

    .lightbox__counter {
        bottom: -40px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .lightbox__image {
        max-width: 98vw;
        max-height: 85vh;
    }

    .lightbox__nav--prev {
        left: 10px;
        top: 10px;
        transform: none;
    }

    .lightbox__nav--next {
        right: 10px;
        top: 10px;
        transform: none;
    }

    .lightbox__close {
        top: 10px;
        right: 10px;
        padding: 6px;
    }

    .lightbox__close svg {
        width: 16px;
        height: 16px;
    }

    .lightbox__nav svg {
        width: 8px;
        height: 8px;
    }

    .lightbox__counter {
        bottom: 10px;
    }
}
