/* =========================================================
   МЕНЕДЖЕР УНИКАЛЬНЫХ ШАПОК
   Frontend Design Engine

   Этап 1 новой системы дизайна шапок.

   ВАЖНО:
   - файл подключается production design layer этапа 7;
   - Big остаётся безопасным CSS fallback-профилем;
   - global settings переопределяют :root variables через uh-design-settings;
   - unique rules получают локальные классы:
       .uh-header-size-big
       .uh-header-size-mini
       .uh-header-show-logo
   ========================================================= */


/* =========================================================
   ГЛОБАЛЬНЫЕ DESIGN VARIABLES — DEFAULTS
   ========================================================= */

:root {

    /* --------------------- */
    /* ОБЩИЕ НАСТРОЙКИ ШАПКИ */
    /* --------------------- */

    --uh-header-margin-top: 40px;
    --uh-header-margin-bottom: 0px;
    --uh-header-radius: 25px;

    /* --------------- */
    /* ДИЗАЙН ЛОГОТИПА */
    /* --------------- */

    --uh-logo-radius: 100%;
    --uh-logo-border-width: 4px;
    --uh-logo-border-color: #ffffff;
    --uh-logo-background: #ffd600;
    --uh-logo-shadow-color: rgba(0, 0, 0, 0.15);
    --uh-logo-padding: 0px;

    /* ---------------- */
    /* ВИДИМОСТЬ ШАПОК */
    /* ---------------- */

    --uh-header-mobile-visibility: flex;

    /* -------------------------------- */
    /* ВИДИМОСТЬ ОДИНОЧНОГО ЛОГОТИПА */
    /* -------------------------------- */

    --uh-standalone-logo-visibility: none;
    --uh-standalone-logo-mobile-visibility: none;
    --uh-login-logo-visibility: flex;
    --uh-login-logo-mobile-visibility: flex;
	
	/* --------------------------------- */
	/* ВИДИМОСТЬ ЛОГОТИПА НА ОБЩЕЙ ШАПКЕ */
	/* --------------------------------- */
	
	/* Логотип на общей шапке - в школе - ПК - Показывать/Скрыть (на мобиле всегда скрыт) */
	--uh-general-logo-open-school-pc-visibility: flex;

	/* Логотип на общей шапке - на странице входа - ПК - Показывать/Скрыть (на мобиле всегда скрыт) */
	--uh-general-logo-closed-school-pc-visibility: flex;

    /* =====================================================
       БАЗОВЫЙ РАЗМЕРНЫЙ ПРОФИЛЬ ОБЩЕЙ ШАПКИ — BIG

       PHP design layer переопределяет эти variables
       согласно global setting general_size.
       ===================================================== */

    --uh-header-height-xl: 330px;
    --uh-header-height-lg: 281px;
    --uh-header-height-md: 231px;
    --uh-header-height-sm: 178px;
    --uh-header-mobile-ratio: 4.061 / 1;

    --uh-logo-height-xl: 150px;
    --uh-logo-height-lg: 150px;
    --uh-logo-height-md: 130px;
    --uh-logo-height-sm: 100px;

    --uh-logo-align-self: end;
    --uh-logo-container-margin: 0 0 30px 30px;
}


/* =========================================================
   ЛОКАЛЬНЫЕ РАЗМЕРНЫЕ ПРОФИЛИ UNIQUE HEADER
   ========================================================= */

/*
 * Явный Big-профиль нужен, чтобы unique header с size=big
 * не зависел от будущего глобального general_size.
 */
.site-content .brand-row.uh-header-size-big {
    --uh-header-height-xl: 330px;
    --uh-header-height-lg: 281px;
    --uh-header-height-md: 231px;
    --uh-header-height-sm: 178px;
    --uh-header-mobile-ratio: 4.061 / 1;

    --uh-logo-height-xl: 150px;
    --uh-logo-height-lg: 150px;
    --uh-logo-height-md: 130px;
    --uh-logo-height-sm: 100px;

    --uh-logo-align-self: end;
    --uh-logo-container-margin: 0 0 30px 30px;
}

.site-content .brand-row.uh-header-size-mini {
    --uh-header-height-xl: 165px;
    --uh-header-height-lg: 140px;
    --uh-header-height-md: 115px;
    --uh-header-height-sm: 88px;
    --uh-header-mobile-ratio: 8.121 / 1;

    --uh-logo-height-xl: 120px;
    --uh-logo-height-lg: 100px;
    --uh-logo-height-md: 80px;
    --uh-logo-height-sm: 60px;

    --uh-logo-align-self: center;
    --uh-logo-container-margin: 0 0 0 30px;
}


/* =========================================================
   ШАПКА КАК БАННЕР + ЛОГОТИП НА НЕЙ
   ========================================================= */

/* --------------- */
/* БЛОК ВСЕЙ ШАПКИ */
/* --------------- */

.site-content .brand-row {
    display: flex;

    /* Выравнивание логотипа на шапке — слева. */
    justify-content: left;
    justify-self: center;

    border-radius: var(--uh-header-radius);
    padding: 0;

    margin:
        var(--uh-header-margin-top)
        0
        var(--uh-header-margin-bottom)
        0;

	/* Корректировка - нужно "!important", если Логотип загружен, но опция "Включить шапки для страниц" НЕ активна */
	/* Иначе изображение некорректно вписывается в шапку */
    background-size: cover !important;
    /* background-size: cover; */
}


/* Закругление шапки — на смартфоне. */
@media (max-width: 767px) {

    .site-content .brand-row {
        border-radius: calc(var(--uh-header-radius) / 2);
    }
}


/* ------------------------------------------------ */
/* БЛОК ШАПКИ, КОГДА ОБЩАЯ ШАПКА MEMBERLUX ВЫКЛЮЧЕНА */
/* ------------------------------------------------ */

.site-content .brand-row[style*="background: transparent;"],
.site-content .brand-row[style*="background-image: url('')"] {
    height: auto;

    /* Одиночный логотип выравнивается по центру. */
    justify-content: center;

    /* Сохраняем проверенное поведение исходных дополнений. */
    background-image: none !important;
}


/*
 * На смартфоне высота блока одиночного логотипа
 * ограничивается его мобильным размером.
 */
@media (max-width: 767px) {

    .site-content .brand-row[style*="background: transparent;"],
    .site-content .brand-row[style*="background-image: url('')"] {
        max-height: 100px;
    }
}


/* ---------------------------------------------------- */
/* ШИРИНА И ВЫСОТА ШАПКИ — НА РАЗНЫХ ЭКРАНАХ */
/* ---------------------------------------------------- */

@media (min-width: 1400px) {

    .site-content .brand-row {
        width: 1340px;
        height: var(--uh-header-height-xl);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {

    .site-content .brand-row {
        width: 1142px;
        height: var(--uh-header-height-lg);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {

    .site-content .brand-row {
        width: 941px;
        height: var(--uh-header-height-md);
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    .site-content .brand-row {
        width: 720px;
        height: var(--uh-header-height-sm);
    }
}

@media (max-width: 767px) {

    .site-content .brand-row {
        width: calc(100% - 30px);
        aspect-ratio: var(--uh-header-mobile-ratio);
    }
}


/* --------------- */
/* ВИДИМОСТЬ ШАПОК */
/* --------------- */

/*
 * Видимость общей и уникальной шапки на смартфоне.
 * Глобальная настройка действует на обе разновидности.
 */
@media only screen and (max-width: 767px) {

    .site-content .brand-row,
    .site-content .unique-shapka {
        display: var(--uh-header-mobile-visibility) !important;
    }
}


/* ------------------------------------------------------ */
/* ОДИНОЧНЫЙ ЛОГОТИП — ШКОЛА */
/* ------------------------------------------------------ */

/* СЦЕНАРИЙ - КОГДА ОПЦИЯ "ВКЛЮЧИТЬ ШАПКИ ДЛЯ СТРАНИЦ" - НЕ АКТИВНА */

/* Также применяется и для страницы, где есть "woocommerce-checkout" */

body:not(:has([class*="login-tabs"]))
.site-content .brand-row[style*="background: transparent;"],
body.woocommerce-checkout:has([class*="login-tabs"])
.site-content .brand-row[style*="background: transparent;"] {
    display: var(--uh-standalone-logo-visibility) !important;
}


@media only screen and (max-width: 767px) {

    body:not(:has([class*="login-tabs"]))
    .site-content .brand-row[style*="background: transparent;"],
    body.woocommerce-checkout:has([class*="login-tabs"])
    .site-content .brand-row[style*="background: transparent;"] {
        display: var(--uh-standalone-logo-mobile-visibility) !important;
    }
}

/* СЦЕНАРИЙ - КОГДА ОПЦИЯ "ВКЛЮЧИТЬ ШАПКИ ДЛЯ СТРАНИЦ" - АКТИВНА */

/* Также применяется и для страницы, где есть "woocommerce-checkout" */

body:not(:has([class*="login-tabs"]))
.site-content .brand-row[style*="background-image: url('')"],
body.woocommerce-checkout:has([class*="login-tabs"])
.site-content .brand-row[style*="background-image: url('')"] {
    display: var(--uh-standalone-logo-visibility) !important;
}


@media only screen and (max-width: 767px) {

    body:not(:has([class*="login-tabs"]))
    .site-content .brand-row[style*="background-image: url('')"],
    body.woocommerce-checkout:has([class*="login-tabs"])
    .site-content .brand-row[style*="background-image: url('')"] {
        display: var(--uh-standalone-logo-mobile-visibility) !important;
    }
}


/* ------------------------------------------------------ */
/* ОДИНОЧНЫЙ ЛОГОТИП — СТРАНИЦА ВХОДА ЗАКРЫТОЙ ШКОЛЫ */
/* ------------------------------------------------------ */

body:has([class*="login-tabs"])
.site-content .brand-row[style*="background: transparent;"],
body:has([class*="login-tabs"])
.site-content .brand-row[style*="background-image: url('')"] {
    display: var(--uh-login-logo-visibility) !important;
}


@media only screen and (max-width: 767px) {

    body:has([class*="login-tabs"])
    .site-content .brand-row[style*="background: transparent;"],
    body:has([class*="login-tabs"])
    .site-content .brand-row[style*="background-image: url('')"] {
        display: var(--uh-login-logo-mobile-visibility) !important;
    }
}


/*
 * Если нет ни общей шапки, ни логотипа,
 * скрываем пустой блок целиком.
 */
body:not(:has([class*="brand-logo"]))
.site-content .brand-row[style*="background: transparent;"],
body:not(:has([class*="brand-logo"]))
.site-content .brand-row[style*="background-image: url('')"] {
    display: none !important;
}


/* ------------------ */
/* КОНТЕЙНЕР ЛОГОТИПА */
/* ------------------ */

.site-content .brand-row .container {
    width: auto;
    max-width: fit-content;
    padding: 0;

    margin: var(--uh-logo-container-margin);
    align-self: var(--uh-logo-align-self);
}


/* Контейнер одиночного логотипа */
.site-content .brand-row[style*="background: transparent;"] .container,
.site-content .brand-row[style*="background-image: url('')"] .container {
    width: 100%;
    max-width: fit-content;
    padding: 0;
    margin: 0;
    align-self: center;
}


/* ---------------------------------------------------- */
/* ЛОГОТИП НА UNIQUE HEADER — DESKTOP */
/* ---------------------------------------------------- */

/*
 * Default unique-rule behavior: логотип скрыт.
 * frontend.js добавляет .uh-header-show-logo,
 * если rule.show_logo = 1.
 */
.site-content .brand-row.unique-shapka .container {
    display: none !important;
}

.site-content .brand-row.unique-shapka.uh-header-show-logo .container {
    display: flex !important;
}


/* ---------------------------------------------------- */
/* ЛОГОТИП НА UNIQUE HEADER — MOBILE */
/* ---------------------------------------------------- */

/*
 * На смартфоне логотип unique header всегда скрыт,
 * независимо от rule.show_logo.
 */
@media (max-width: 767px) {

    .site-content .brand-row.unique-shapka .container,
    .site-content .brand-row.unique-shapka.uh-header-show-logo .container {
        display: none !important;
    }
}


/* ---------------------------------------------------- */
/* ЛОГОТИП НА ОБЩЕЙ ШАПКЕ — MOBILE */
/* ---------------------------------------------------- */

/*
 * Сохраняем исходное поведение дополнений:
 * обычный логотип общей шапки на смартфоне скрыт.
 */
@media (max-width: 767px) {

    .site-content .brand-row .container {
        display: none !important;
    }
}



/* Но одиночный логотип при отключённой общей шапке показывается внутри контейнера */

.site-content .brand-row[style*="background: transparent;"] .container,
.site-content .brand-row[style*="background-image: url('')"] .container {
	display: flex !important;
}

/* Но одиночный логотип при отключённой общей шапке на смартфоне снова показывается внутри контейнера */
 
@media (max-width: 767px) {

    .site-content .brand-row[style*="background: transparent;"] .container,
    .site-content .brand-row[style*="background-image: url('')"] .container {
        display: flex !important;
        /* display: block !important; */
    }
}


/* ================================= */
/* ВИДИМОСТЬ ЛОГОТИПА НА ОБЩЕЙ ШАПКЕ */
/* ================================= */

/* Когда общая шапка отключена: */
/* NOT: background: transparent */

/* Когда общая шапка не загружена, но сама шапка активирована: */
/* NOT: background-image: url('') */

/* ------------------------------------------------------ */
/* ВИДИМОСТЬ ЛОГОТИПА НА ОБЩЕЙ ШАПКЕ — ШКОЛА - ПК */
/* ------------------------------------------------------ */

body:not(:has([class*="login-tabs"])) .site-content .brand-row:not(.unique-shapka):not([style*="background: transparent;"]) .container,
body:not(:has([class*="login-tabs"])) .site-content .brand-row:not(.unique-shapka):not([style*="background-image: url('')"]) .container,

/* Корректировка - применяем этот же стиль и для страницы оплаты, где есть woocommerce */

body.woocommerce-checkout .site-content:has([class*="woocommerce"]) .brand-row:not(.unique-shapka):not([style*="background: transparent;"]) .container,
body.woocommerce-checkout .site-content:has([class*="woocommerce"]) .brand-row:not(.unique-shapka):not([style*="background-image: url('')"]) .container {

    display: var(--uh-general-logo-open-school-pc-visibility);
    /* display: flex; */
	/* display: none; */
}

/* ---------------------------------------------------------------------- */
/* ВИДИМОСТЬ ЛОГОТИПА НА ОБЩЕЙ ШАПКЕ — СТРАНИЦА ВХОДА ЗАКРЫТОЙ ШКОЛЫ - ПК */
/* ---------------------------------------------------------------------- */

body:has([class*="login-tabs"]) .site-content .brand-row:not(.unique-shapka):not([style*="background: transparent;"]) .container,
body:has([class*="login-tabs"]) .site-content .brand-row:not(.unique-shapka):not([style*="background-image: url('')"]) .container {
    display: var(--uh-general-logo-closed-school-pc-visibility);
    /* display: flex; */
	/* display: none; */
}

/* ------------------------------------ */
/* КОНТЕЙНЕР ВНУТРИ КОНТЕЙНЕРА ЛОГОТИПА */
/* ------------------------------------ */

.site-content .brand-row .container .row {
    width: 100%;
    margin: 0;
}


/* ---------------- */
/* ОБЁРТКА ЛОГОТИПА */
/* ---------------- */

.site-content .brand-row .flex-logo-wrap {
    padding: 0;
    margin: 0;
    min-height: unset;
    justify-content: flex-start;

    display: flex;
    align-items: center;
    width: auto;
}


/* --------------- */
/* ДИЗАЙН ЛОГОТИПА */
/* --------------- */

.site-content .brand-row .flex-logo-wrap span.wpm_default_header .brand-logo,
.site-content .brand-row .flex-logo-wrap a.wpm_default_header .brand-logo {
    display: block;
    margin: 0 auto;
    width: auto;
    max-width: 100%;

    border-radius: var(--uh-logo-radius);
    border:
        var(--uh-logo-border-width)
        solid
        var(--uh-logo-border-color);

    background-color: var(--uh-logo-background);

    box-shadow:
        5px
        10px
        25px
        0
        var(--uh-logo-shadow-color);

    padding: var(--uh-logo-padding);
}


/* ------------------------------------------------------ */
/* РАЗМЕР ЛОГОТИПА НА ОБЩЕЙ И УНИКАЛЬНОЙ ШАПКЕ */
/* ------------------------------------------------------ */

@media (min-width: 1400px) {

    .site-content .brand-row .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row .flex-logo-wrap a.wpm_default_header .brand-logo {
        max-height: var(--uh-logo-height-xl);
        height: var(--uh-logo-height-xl);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {

    .site-content .brand-row .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row .flex-logo-wrap a.wpm_default_header .brand-logo {
        max-height: var(--uh-logo-height-lg);
        height: var(--uh-logo-height-lg);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {

    .site-content .brand-row .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row .flex-logo-wrap a.wpm_default_header .brand-logo {
        max-height: var(--uh-logo-height-md);
        height: var(--uh-logo-height-md);
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    .site-content .brand-row .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row .flex-logo-wrap a.wpm_default_header .brand-logo {
        max-height: var(--uh-logo-height-sm);
        height: var(--uh-logo-height-sm);
    }
}


/* ------------------------------------------------------ */
/* РАЗМЕР ОДИНОЧНОГО ЛОГОТИПА — DESKTOP */
/* ------------------------------------------------------ */

.site-content .brand-row[style*="background: transparent;"]
.flex-logo-wrap span.wpm_default_header .brand-logo,
.site-content .brand-row[style*="background: transparent;"]
.flex-logo-wrap a.wpm_default_header .brand-logo,
.site-content .brand-row[style*="background-image: url('')"]
.flex-logo-wrap span.wpm_default_header .brand-logo,
.site-content .brand-row[style*="background-image: url('')"]
.flex-logo-wrap a.wpm_default_header .brand-logo {
    max-height: 200px;
    height: 200px;
}


/* ------------------------------------------------------ */
/* РАЗМЕР ОДИНОЧНОГО ЛОГОТИПА — MOBILE */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

    .site-content .brand-row[style*="background: transparent;"]
    .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row[style*="background: transparent;"]
    .flex-logo-wrap a.wpm_default_header .brand-logo,
    .site-content .brand-row[style*="background-image: url('')"]
    .flex-logo-wrap span.wpm_default_header .brand-logo,
    .site-content .brand-row[style*="background-image: url('')"]
    .flex-logo-wrap a.wpm_default_header .brand-logo {
        max-height: 100px;
        height: 100px;
    }
}


/* =========================================================
   SLIDER V1 — FRONTEND RUNTIME
   ========================================================= */

/*
 * Внешним контейнером остаётся существующая .brand-row.
 * Slider добавляет только декоративные фоновые слои.
 */
.site-content .brand-row.unique-shapka.uh-header-mode-slider {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/*
 * Существующий Memberlux content остаётся над Slider layers.
 */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
> :not(.uh-slider) {
    position: relative;
    z-index: 2;
}

.site-content .brand-row.unique-shapka.uh-header-mode-slider .uh-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;

    --uh-slider-transition-duration: 800ms;
    --uh-slider-easing: ease-in-out;
}

.site-content .brand-row.unique-shapka.uh-header-mode-slider .uh-slider__slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;

    background-size: cover;

    transform: none;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);

    will-change: opacity, transform, clip-path;
    pointer-events: none;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider__slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}


/* ---------------- */
/* ЭФФЕКТ — FADE */
/* ---------------- */

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--fade
.uh-slider__slide.is-next {
    z-index: 2;
    opacity: 0;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--fade
.uh-slider__slide.is-next.is-entering {
    opacity: 1;
    transition:
        opacity
        var(--uh-slider-transition-duration)
        var(--uh-slider-easing);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--fade
.uh-slider__slide.is-active.is-leaving {
    z-index: 1;
    opacity: 1;
}


/* ----------------- */
/* ЭФФЕКТ — SLIDE */
/* ----------------- */

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide
.uh-slider__slide.is-next {
    z-index: 2;
    opacity: 1;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide
.uh-slider__slide.is-next.is-entering,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide
.uh-slider__slide.is-active.is-leaving {
    transition:
        transform
        var(--uh-slider-transition-duration)
        var(--uh-slider-easing);
}

/* Новый слайд приходит слева, текущий уходит вправо. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-left
.uh-slider__slide.is-next {
    transform: translate3d(-100%, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-left
.uh-slider__slide.is-next.is-entering {
    transform: translate3d(0, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-left
.uh-slider__slide.is-active.is-leaving {
    transform: translate3d(100%, 0, 0);
}

/* Новый слайд приходит справа, текущий уходит влево. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-right
.uh-slider__slide.is-next {
    transform: translate3d(100%, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-right
.uh-slider__slide.is-next.is-entering {
    transform: translate3d(0, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-right
.uh-slider__slide.is-active.is-leaving {
    transform: translate3d(-100%, 0, 0);
}

/* Новый слайд приходит сверху, текущий уходит вниз. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-top
.uh-slider__slide.is-next {
    transform: translate3d(0, -100%, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-top
.uh-slider__slide.is-next.is-entering {
    transform: translate3d(0, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-top
.uh-slider__slide.is-active.is-leaving {
    transform: translate3d(0, 100%, 0);
}

/* Новый слайд приходит снизу, текущий уходит вверх. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-bottom
.uh-slider__slide.is-next {
    transform: translate3d(0, 100%, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-bottom
.uh-slider__slide.is-next.is-entering {
    transform: translate3d(0, 0, 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--slide.uh-slider--from-bottom
.uh-slider__slide.is-active.is-leaving {
    transform: translate3d(0, -100%, 0);
}


/* --------------- */
/* ЭФФЕКТ — CUT */
/* --------------- */

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut
.uh-slider__slide.is-next {
    z-index: 2;
    opacity: 1;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut
.uh-slider__slide.is-next.is-entering {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);

    transition:
        clip-path
        var(--uh-slider-transition-duration)
        var(--uh-slider-easing),
        -webkit-clip-path
        var(--uh-slider-transition-duration)
        var(--uh-slider-easing);
}

/* Раскрытие нового слайда от левого края. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-left
.uh-slider__slide.is-next {
    clip-path: inset(0 100% 0 0);
    -webkit-clip-path: inset(0 100% 0 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-left
.uh-slider__slide.is-next.is-entering {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

/* Раскрытие нового слайда от правого края. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-right
.uh-slider__slide.is-next {
    clip-path: inset(0 0 0 100%);
    -webkit-clip-path: inset(0 0 0 100%);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-right
.uh-slider__slide.is-next.is-entering {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

/* Раскрытие нового слайда от верхнего края. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-top
.uh-slider__slide.is-next {
    clip-path: inset(0 0 100% 0);
    -webkit-clip-path: inset(0 0 100% 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-top
.uh-slider__slide.is-next.is-entering {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

/* Раскрытие нового слайда от нижнего края. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-bottom
.uh-slider__slide.is-next {
    clip-path: inset(100% 0 0 0);
    -webkit-clip-path: inset(100% 0 0 0);
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-bottom
.uh-slider__slide.is-next.is-entering {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}


/* --------------------------------------------------------- */
/* ЭФФЕКТ — CUT / МЯГКИЙ КРАЙ                             */
/* --------------------------------------------------------- */

/*
 * Hard остаётся существующим clip-path Cut без изменений.
 * Soft/Very Soft только переопределяют incoming slide отдельной
 * mask-gradient веткой. Ширина feather постоянна весь transition.
 */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-soft {
    --uh-cut-softness: 15%;
    --uh-cut-progress-end: 115%;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-very-soft {
    --uh-cut-softness: 35%;
    --uh-cut-progress-end: 135%;
}

.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-soft
.uh-slider__slide.is-next,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-very-soft
.uh-slider__slide.is-next {
    --uh-cut-progress: 0%;

    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);

    mask-mode: alpha;
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
}

/*
 * Feather не уменьшается к концу анимации.
 * Progress проходит до 115%/135%, поэтому мягкая зона полностью
 * уходит за пределы header и новый слайд становится непрозрачным на 100%.
 */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-soft
.uh-slider__slide.is-next.is-entering,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--softness-very-soft
.uh-slider__slide.is-next.is-entering {
    --uh-cut-progress: var(--uh-cut-progress-end);

    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);

    transition:
        --uh-cut-progress
        var(--uh-slider-transition-duration)
        var(--uh-slider-easing);
}

/* Слева направо: мягкая ПРАВАЯ граница incoming area. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-left.uh-slider--softness-soft
.uh-slider__slide.is-next,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-left.uh-slider--softness-very-soft
.uh-slider__slide.is-next {
    mask-image: linear-gradient(
        to right,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
}

/* Справа налево: мягкая ЛЕВАЯ граница incoming area. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-right.uh-slider--softness-soft
.uh-slider__slide.is-next,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-right.uh-slider--softness-very-soft
.uh-slider__slide.is-next {
    mask-image: linear-gradient(
        to left,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to left,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
}

/* Сверху вниз: мягкая НИЖНЯЯ граница incoming area. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-top.uh-slider--softness-soft
.uh-slider__slide.is-next,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-top.uh-slider--softness-very-soft
.uh-slider__slide.is-next {
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
}

/* Снизу вверх: мягкая ВЕРХНЯЯ граница incoming area. */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-bottom.uh-slider--softness-soft
.uh-slider__slide.is-next,
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--cut.uh-slider--from-bottom.uh-slider--softness-very-soft
.uh-slider__slide.is-next {
    mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 calc(var(--uh-cut-progress) - var(--uh-cut-softness)),
        transparent var(--uh-cut-progress),
        transparent 100%
    );
}


/* ------------------- */
/* ЭФФЕКТ — INSTANT */
/* ------------------- */

/*
 * Instant не использует transition classes:
 * JS атомарно меняет единственный is-active после полного HOLD.
 */
.site-content
.brand-row.unique-shapka.uh-header-mode-slider
.uh-slider--instant
.uh-slider__slide.is-active {
    opacity: 1;
}
