

/* Start:/local/templates/exform/css/gallery-v2.css?17860484406578*/
/* ===== ГАЛЕРЕЯ V2 ===== */
.gallery-v2 {
    background: #313033;
    padding: 0px 0;
    color: #fff;
    margin-bottom: 0;
}

/* Стык галереи со следующим блоком (показатели «8 350+ / 30+»).
   Фон body белый, поэтому любой отступ или margin на стыке виден белой полосой.
   Красим саму секцию в тёмный и снимаем верхний margin — зазор закрывается,
   кто бы его ни создавал (padding секции, margin, обёртка композитного кеша). */
.gallery-v2 + .section {
    background: #313033;
    margin-top: 0;
}

.gallery-v2 + .section > .page-intro {
    margin-top: 0;
}

.gallery-v2__header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-v2__title {
    /* размер и насыщенность берём из глобального h1 (main.css):
       font-weight 400, 24px / 56px c 768px / 80px c 1000px */
    margin: 0 0 12px;
    color: #fff;
}

.gallery-v2__subtitle {
    /* размер берём из body (main.css): 16px, с 520px — 24px/1.6 */
    color: #fff;
    opacity: 0.5;
    max-width: 720px;
    margin: 0 auto;
}

/* Меню категорий */
.gallery-v2__nav {
    display: flex;
    gap: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 20px 0;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery-v2__nav::-webkit-scrollbar {
    display: none;
}

/* Оформление как у меню разделов выше (.page-intro .nav-menu__item в main.css):
   белые буквы, активный пункт — красный, без подчёркивания */
.gallery-v2__tab {
    flex-shrink: 0;
    padding: 10px 18px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
    font-family: inherit;
}

.gallery-v2__tab:hover {
    color: #e41e32;
}

.gallery-v2__tab.is-active {
    color: #e31e24;
}

/* Основное превью */
.gallery-v2__main {
    display: none;
    /* 1120px — как max-width у заголовков страниц (.page-intro__title в main.css) */
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 10px;
}

.gallery-v2__main.is-active {
    display: block;
    animation: galleryFadeIn 0.5s ease;
}

@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-v2__preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gallery-v2__arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-v2__arrow:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}

.gallery-v2__viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 3 / 2;
    background: #1a1a2e;
}

.gallery-v2__slide {
    display: none;
    width: 100%;
    height: 100%;
}

.gallery-v2__slide.is-active {
    display: block;
    animation: gallerySlideIn 0.4s ease;
}

@keyframes gallerySlideIn {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 1; filter: blur(0); }
}

.gallery-v2__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Миниатюры */
.gallery-v2__thumbs {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Прячем системный скроллбар, как у .gallery-v2__nav. Без этого правила
   мобильные WebKit-браузеры рисуют светлую полосу под миниатюрами. */
.gallery-v2__thumbs::-webkit-scrollbar {
    display: none;
}

/* Табы и миниатюры по центру. На мобильных остаётся flex-start:
   при overflow-x центрирование обрезает начало списка. */
@media (min-width: 769px) {
    .gallery-v2__nav,
    .gallery-v2__thumbs {
        justify-content: center;
    }
}

.gallery-v2__thumb {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.gallery-v2__thumb.is-active {
    border-color: #e31e24;
    opacity: 1;
}

.gallery-v2__thumb:hover {
    opacity: 0.8;
}

.gallery-v2__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Мобильные */
@media (max-width: 768px) {
    /* Стрелки поверх картинки, а не рядом с ней. Иначе они забирают
       по 52px с каждой стороны, картинка становится уже полосы миниатюр
       и та выглядит съехавшей относительно фото. */
    .gallery-v2__preview {
        position: relative;
        gap: 0;
    }

    .gallery-v2__arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 36px;
        height: 36px;
        background: rgba(0,0,0,0.35);
        border-color: rgba(255,255,255,0.35);
    }

    .gallery-v2__arrow--prev {
        left: 8px;
    }

    .gallery-v2__arrow--next {
        right: 8px;
    }

    .gallery-v2__viewport {
        aspect-ratio: 4 / 3;
    }

    .gallery-v2__thumb {
        width: 60px;
        height: 45px;
    }
}

/* Анимация смены цеха (Genie эффект) */
.gallery-v2__main.is-exiting {
    animation: galleryGenieOut 0.3s ease forwards;
}

@keyframes galleryGenieOut {
    to { 
        opacity: 0; 
        transform: scale(0.95); 
        filter: blur(4px); 
    }
}

/* End */
/* /local/templates/exform/css/gallery-v2.css?17860484406578 */
