/* Стили для увеличения изображений - Lightbox версия */

/* Kadence блоки - скрываем overflow */
figure.wp-block-kadence-image {
    overflow: hidden !important;
}

/* Изображения с курсором плюс */
.enlarge-image {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.enlarge-image:hover {
    opacity: 0.9;
}

/* Lightbox модальное окно */
.enlarge-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(245 245 245 / 75%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    cursor: zoom-out;
}

/* Когда lightbox открыт */
.enlarge-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0.98;
}

/* Изображение внутри lightbox */
.enlarge-lightbox-content {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.2s ease-in-out, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: zoomIn 0.3s ease-out;
    border-radius: 0;
    cursor: zoom-out;
    zoom: 1.2;
}

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

/* Кнопка закрытия */
.enlarge-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333;
}

.enlarge-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.enlarge-close:active {
    transform: rotate(90deg) scale(0.95);
}

.enlarge-close svg {
    width: 24px;
    height: 24px;
}

/* Адаптивность для планшетов */
@media only screen and (max-width: 1024px) {
    .enlarge-lightbox.active {
        padding: 50px 15px 15px;
    }
    
    .enlarge-lightbox-content {
        max-width: 100%;
        height: 100%;
    }
}

/* Адаптивность для мобильных устройств */
@media only screen and (max-width: 768px) {
    .enlarge-lightbox.active {
        padding: 40px 10px 10px;
    }
    
    .enlarge-lightbox-content {
        max-width: 100%;
        height: 100%;
    }
    
}

/* Очень маленькие экраны */
@media only screen and (max-width: 480px) {
    .enlarge-lightbox.active {
        padding: 30px 5px 5px;
    }
    
    .enlarge-lightbox-content {
        max-width: 100%;
        height: 100%;
    }
    
}
