/* ============================================================
 * hbnr.css — нейрослайдер баннеров в шапке (v2).
 * Картинка всегда видна целиком, под шапкой сайта.
 * ============================================================ */

.hero-header-wrap{
    --hs-accent: #FED500;
    --hs-accent-ink: #0b0b0d;
}

/* Статичный текст на главной убран */
.p2-header-hero--home .p2-header-hero__content{ display: none !important; }

/* Обёртка подстраивается под активный слайд */
.hero-header-wrap.hbnr-host{
    height: var(--hero-h, auto) !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    transition: height .6s cubic-bezier(.22,1,.36,1);
}

/* ---------- Каркас ---------- */
.hbnr{
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--hbnr-top, 0px);
    z-index: 0;
    overflow: hidden;
    background: #05060a;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.hbnr__viewport{
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
}
.hbnr__viewport:active{ cursor: grabbing; }

.hbnr__track{
    display: flex;
    align-items: stretch;
    min-height: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform .62s cubic-bezier(.22,1,.36,1);
}

.hbnr__slide{
    display: block;
    min-width: 100%;
    min-height: 0;
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #05060a;
}

/* Размытая подложка на случай полей */
.hbnr__bg{
    position: absolute;
    inset: -60px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(46px) brightness(.42) saturate(1.15);
    transform: scale(1.1);
    pointer-events: none;
}

/* Картинка — всегда целиком */
.hbnr__slide picture{
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
.hbnr__img{
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    pointer-events: none;
    z-index: 1;
}

/* Мягкая тень снизу для читаемости управления */
.hbnr::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,.14) 45%, transparent);
    opacity: 0;
    transition: opacity .35s ease;
}
.hbnr:hover::after,
.hbnr:focus-within::after{ opacity: 1; }
@media (hover: none){ .hbnr::after{ opacity: 1; } }

/* ---------- Стрелки ---------- */
.hbnr__arrow{
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 56px;
    height: 56px;
    margin-top: -28px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 50%;
    background: rgba(10,10,12,.42);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,.28);
    transition: background .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.hbnr__arrow svg{
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}
.hbnr__arrow--prev{ left: 26px; }
.hbnr__arrow--next{ right: 26px; }

.hbnr__arrow:hover,
.hbnr__arrow:focus-visible{
    background: var(--hs-accent);
    border-color: var(--hs-accent);
    color: var(--hs-accent-ink);
    transform: translateY(-1px) scale(1.04);
    outline: none;
}
.hbnr__arrow:active{ transform: scale(.97); }

/* ---------- Пагинация ---------- */
.hbnr__dots{
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 6;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(10,10,12,.42);
    border: 1px solid rgba(255,255,255,.14);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.hbnr__dot{
    position: relative;
    width: 26px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.34);
    cursor: pointer;
    overflow: hidden;
    transition: width .35s cubic-bezier(.22,1,.36,1), background .25s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.hbnr__dot::after{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--hs-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.hbnr__dot:hover{ background: rgba(255,255,255,.55); }
.hbnr__dot.is-active{
    width: 56px;
    background: rgba(255,255,255,.22);
}
.hbnr__dot.is-active::after{ transform: scaleX(1); }
.hbnr__dot:focus-visible{
    outline: 2px solid var(--hs-accent);
    outline-offset: 3px;
}

/* Стрелка «вниз» — над пагинацией */
.hero-header-wrap .hero-video-block__scroll{
    z-index: 7 !important;
    bottom: 88px !important;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px){
    .hbnr__arrow{
        width: 50px;
        height: 50px;
        margin-top: -25px;
    }
    .hbnr__arrow--prev{ left: 16px; }
    .hbnr__arrow--next{ right: 16px; }
}

@media (max-width: 768px){
    .hbnr__arrow{
        width: 42px;
        height: 42px;
        margin-top: -21px;
        background: rgba(10,10,12,.52);
    }
    .hbnr__arrow svg{ width: 20px; height: 20px; }
    .hbnr__arrow--prev{ left: 10px; }
    .hbnr__arrow--next{ right: 10px; }
    .hbnr__dots{
        bottom: 14px;
        padding: 7px 10px;
        gap: 6px;
    }
    .hbnr__dot{ width: 18px; height: 3px; }
    .hbnr__dot.is-active{ width: 40px; }
    .hero-header-wrap .hero-video-block__scroll{ bottom: 68px !important; }
}

@media (max-width: 480px){
    .hbnr__arrow{
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }
    .hbnr__arrow svg{ width: 18px; height: 18px; }
    .hbnr__dot{ width: 14px; }
    .hbnr__dot.is-active{ width: 32px; }
    .hbnr__dots{ bottom: 10px; }
}

@media (prefers-reduced-motion: reduce){
    .hbnr__track,
    .hero-header-wrap.hbnr-host,
    .hbnr::after,
    .hbnr__dot,
    .hbnr__dot::after{ transition: none !important; }
}
