/* ============================================
   IMAGE LIGHTBOX STYLES
   ============================================ */

/* Лайтбокс overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Изображение в lightbox */
.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

/* Кнопка закрытия */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

/* Счетчик изображений */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Кнопки навигации */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 16px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Курсор для увеличения изображений в контенте */
.prose img {
    cursor: zoom-in;
}


/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 12px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}
