/**
 * Стили для полноэкранного просмотра изображений (Lightbox)
 */

.gutenify-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gutenify-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gutenify-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gutenify-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gutenify-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 100000;
}

.gutenify-lightbox-close:hover {
    transform: rotate(90deg);
    opacity: 0.8;
}

.gutenify-lightbox-prev,
.gutenify-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100000;
    background-color: transparent;
    border-radius: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

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

.gutenify-lightbox-prev:hover,
.gutenify-lightbox-next:hover {
    opacity: 0.7;
    transform: translateY(-50%) scale(1.1);
}

.gutenify-lightbox-prev:active,
.gutenify-lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 768px) {
    .gutenify-lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .gutenify-lightbox-image {
        max-height: 85vh;
    }
    
    .gutenify-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 35px;
        width: 35px;
        height: 35px;
    }
    
    .gutenify-lightbox-prev,
    .gutenify-lightbox-next {
        font-size: 35px;
        width: auto;
        height: auto;
        padding: 10px;
    }
    
    .gutenify-lightbox-prev {
        left: 10px;
    }
    
    .gutenify-lightbox-next {
        right: 10px;
    }
}

/* Улучшение курсора для кликабельных изображений */
.wp-block-gallery img,
.wp-block-image img,
figure img {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.wp-block-gallery img:hover,
.wp-block-image img:hover,
figure img:hover {
    opacity: 0.9;
}

