/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Child theme for Hello Elementor
Author: Custom
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* =========================================
   ELEMENTOR LIGHTBOX
   ========================================= */

/* Блокируем прокрутку основной страницы,
   когда открыт Lightbox */
html.lightbox-open,
body.lightbox-open {
    overflow: hidden !important;
}

/* Lightbox на весь экран */
.dialog-type-lightbox {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Контейнер Lightbox */
.dialog-type-lightbox .dialog-widget-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    background: rgba(0, 0, 0, 0.9);
}

/* Слайд — самостоятельная область прокрутки */
.elementor-lightbox .swiper-slide {
    width: 100% !important;
    height: 100vh !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Контейнер изображения */
.elementor-lightbox .swiper-zoom-container {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

/* Само изображение */
.elementor-lightbox .elementor-lightbox-image {
    width: 80% !important;
    max-width: 80% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
}

/* Убираем горизонтальный overflow */
html,
body {
    overflow-x: hidden;
}





/* =========================================
   IMAGE GRID LOADER
   ========================================= */

.image-loading {
    position: relative;
    overflow: hidden;
}

/* =========================================
   SPINNER
   ========================================= */

.image-loading::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 32px;
    height: 32px;

    margin: -16px 0 0 -16px;

    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;

    animation: image-spinner 0.8s linear infinite;

    z-index: 10;
    pointer-events: none;
}


/* =========================================
   IMAGE
   ========================================= */

.image-loading img {
    opacity: 0;
}

.image-loaded img {
    opacity: 1;

    animation: image-fade-in 1s ease forwards;
}


/* =========================================
   HIDE SPINNER
   ========================================= */

.image-loaded::before {
    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes image-fade-in {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes image-spinner {

    to {
        transform: rotate(360deg);
    }

}



