/**
 * Бесконечная прокрутка галереи
 */

.vt-gallery-marquee {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    padding: 80px 0 60px;
}

.vt-gallery-marquee .vt-section-title {
    margin-bottom: 40px;
}

.vt-gallery-marquee__row {
    display: flex;
    margin-bottom: 20px;
}

.vt-gallery-marquee__row:last-child {
    margin-bottom: 0;
}

.vt-gallery-marquee__track {
    display: flex;
    gap: 20px;
    will-change: transform;
}

/* Анимация влево (верхний ряд) */
.vt-gallery-marquee__row--left .vt-gallery-marquee__track {
    animation: scrollLeft 80s linear infinite;
}

/* Анимация вправо (нижний ряд) */
.vt-gallery-marquee__row--right .vt-gallery-marquee__track {
    animation: scrollRight 80s linear infinite;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Фото в галерее */
.vt-gallery-marquee__image {
    flex-shrink: 0;
    width: 400px;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.vt-gallery-marquee__image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.vt-gallery-marquee__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.vt-gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.vt-gallery-lightbox--active {
    display: block;
}

.vt-gallery-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.vt-gallery-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.vt-gallery-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.vt-gallery-lightbox__content img {
    max-width: 100%;
    max-height: 90vh;
    height: auto;
    display: block;
    border-radius: 8px;
}

.vt-gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #212121;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    flex-shrink: 0;
}

.vt-gallery-lightbox__close:hover {
    background: white;
    transform: scale(1.1);
}

.vt-gallery-lightbox__counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10001;
}

.vt-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #212121;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    flex-shrink: 0;
}

.vt-gallery-lightbox__nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.vt-gallery-lightbox__nav svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.vt-gallery-lightbox__prev {
    left: 20px;
}

.vt-gallery-lightbox__next {
    right: 20px;
}

/* Адаптив */
@media (max-width: 768px) {
    .vt-gallery-marquee {
        padding: 40px 0;
    }

    .vt-gallery-marquee__row {
        margin-bottom: 15px;
    }

    .vt-gallery-marquee__track {
        gap: 15px;
    }

    .vt-gallery-marquee__image {
        width: 280px;
        height: 210px;
        border-radius: 12px;
    }

    .vt-gallery-lightbox__container {
        padding: 20px;
    }

    .vt-gallery-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 28px;
    }

    .vt-gallery-lightbox__counter {
        top: 20px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .vt-gallery-lightbox__nav {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .vt-gallery-lightbox__nav svg {
        width: 20px;
        height: 20px;
    }

    .vt-gallery-lightbox__prev {
        left: 10px;
    }

    .vt-gallery-lightbox__next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .vt-gallery-marquee__image {
        width: 240px;
        height: 180px;
    }
}
