/* ===== BANNERS SLIDER ===== */

:root {
    --banners-max-width: 1728px;
    --banner-radius: 18px;
    --banner-max-height: 600px;
}

/* Секция */
.banners {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Общий контейнер = стрелки + баннер */
.banners__inner {
    width: 100%;
    max-width: calc(var(--banners-max-width) + var(--slider-arrow-width) * 2);
    margin: 0 auto;
    padding: 20px 0;
    display: grid;
    grid-template-columns: var(--slider-arrow-width) 1fr var(--slider-arrow-width);
    grid-template-rows: 1fr auto;
    align-items: center;
    position: relative;
    box-sizing: border-box;
}

/* Viewport */
.banners__viewport {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 1540px;
    max-height: var(--banner-max-height);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Track */
.banners__track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.banners__track::-webkit-scrollbar {
    display: none;
}

/* Слайд */
.banners__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

/* Маска-рамка поверх слайда */
.banners__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/local/templates/my/images/slidebar/mask_1920.png") center / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 4;
}

/* ===== ПАПИРУС ФОН ===== */
.banners__bg {
    display: block;
    width: 100%;
    height: 100%;
}

.banners__bg-img {
    width: 100%;
    height: 100%;
    max-height: var(--banner-max-height);
    object-fit: cover;
    display: block;
}

/* ===== КОНТЕНТ ===== */
.banners__content {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 520px;
    max-width: 45%;
    padding: 48px;
    box-sizing: border-box;
    z-index: 2;
    color: #222;
}

.banners__label {
    color: #363636;
    font-family: "tt-commons-pro", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 120%;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.banners__title {
    font-family: "PT Astra Serif", serif;
    font-size: 56px;
    font-style: italic;
    font-weight: 400;
    line-height: 120%;
    color: #0B0B0B;
}

.banners__subtitle {
    font-family: "PT Astra Serif", serif;
    font-size: 56px;
    font-style: italic;
    font-weight: 700;
    line-height: 120%;
    color: #0B0B0B;
}

.banners__desc {
    color: #0B0B0B;
    margin-top: 25px;
    font-family: "tt-commons-pro", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
}

.banners__btn {
    display: inline-flex;
    text-transform: uppercase;
    min-width: 175px;
    padding: 16px 24px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    background: #005C67;
    color: #fff;
    border-radius: 4px;
    border: 1px solid #005C67;
    font-family: "tt-commons-pro", sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    letter-spacing: 1.12px;
    line-height: 12.6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.banners__btn:hover {
    background: none;
    border: 1px solid #005C67;
    color: #005C67;
}

.banners__btn:active {
    background: #F6881B;
    border: 1px solid #F6881B;
    color: #fff;
}

/* ===== ДЕКОР-КАРТИНКА ===== */
.banners__decor {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
    max-height: 100%;
    max-width: 55%;
}

.banners__decor-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--banner-max-height);
    object-fit: contain;
}

/* Десктоп: показываем только desktop */
.banners__decor-img--desktop {
    display: block;
}

.banners__decor-img--tablet {
    display: none;
}

.banners__decor-img--mobile {
    display: none;
}

/* ===== SPACER (для вылета декора на планшете/мобилке) ===== */
.banners__decor-spacer {
    display: none;
    width: 100%;
    height: 0;
}

/* ===== СТРЕЛКИ — по бокам, по центру высоты баннера ===== */
.banners__arrow {
    width: var(--slider-arrow-width);
    height: 56px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 30;
    background-image: url("/local/templates/my/images/icons/slide-arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: filter 0.3s ease;
    grid-row: 1;
    align-self: center;
}

.banners__arrow--prev {
    grid-column: 1;
    justify-self: end;
    transform: rotate(180deg);
}

.banners__arrow--next {
    grid-column: 3;
    justify-self: start;
}

.banners__arrow:hover,
.banners__arrow:active {
    filter: brightness(0) saturate(100%) invert(65%) sepia(56%) saturate(2670%) hue-rotate(0deg) brightness(102%) contrast(95%);
}

.banners__arrow.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== ПАГИНАЦИЯ — снизу по центру ===== */
.banners__pagination {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.banners__dot {
    position: relative;
    width: 15px;
    height: 14px;
    border: none;
    padding: 0;
    background: var(--slider-dot-gray);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.banners__dot:hover {
    opacity: 0.8;
}

.banners__dot.is-active {
    width: 63px;
    background: transparent;
    border-radius: 999px;
}

.banners__dot::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 14px;
    background: var(--slider-dot-red);
    border-radius: 999px;
    z-index: 2;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.banners__dot.is-active::before {
    opacity: 1;
    transform: scaleX(1);
}

.banners__dot::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 0;
    width: 37px;
    height: 14px;
    background: var(--slider-dot-gray);
    border-radius: 999px;
    z-index: 1;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.banners__dot.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.banners__dot.is-reanimate {
    animation: sliderDotReanimate 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.banners__nav {
    display: contents;
}

/* =============================================
   RESPONSIVE
   ============================================= */
/* =============================================
   RESPONSIVE
   ============================================= */

/* ===== 1400px ===== */
/* =============================================
   RESPONSIVE
   ============================================= */

/* ===== 1400px ===== */
@media (max-width: 1400px) {
    :root {
        --banner-max-height: 520px;
    }
    
    .banners__content {
        left: 80px;
        width: 480px;
        padding: 40px;
    }
    
    .banners__title {
        font-size: 48px;
    }
    
    .banners__subtitle {
        font-size: 48px;
    }
}

/* ===== 1200px ===== */
@media (max-width: 1200px) {
    :root {
        --banner-max-height: 450px;
    }
    
    .banners__content {
        left: 60px;
        width: 420px;
        padding: 32px;
    }
    
    .banners__title {
        font-size: 40px;
    }
    
    .banners__subtitle {
        font-size: 40px;
    }
    
    .banners__desc {
        font-size: 14px;
        margin-top: 16px;
    }
}

/* ===== 1024px — планшет ===== */
@media (max-width: 1024px) {

        .banners__title,
    .banners__subtitle,
    .banners__desc {
        width: 100%;
        text-align: left;
    }

    .banners {
        overflow: visible;
    }

            .banners__nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 340px;
        margin-top: 20px;
    }
    
    .banners__inner {
        padding: 0 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .banners__viewport {
        max-width: 750px;
        max-height: none;
        overflow: hidden;
    }
    
    .banners__slide {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
        height: 1000px;
    }
    
    /* Маска планшетная 750×1000 */
    .banners__slide::after {
        background-image: url("/local/templates/my/images/slidebar/mask_plan.png");
        background-size: 100% 100%;
    }
    
    /* Папирус увеличен чтобы края не видны */
    .banners__bg {
        position: absolute;
        inset: -30px;
        width: calc(100% + 60px);
        height: calc(100% + 60px);
    }
    
    .banners__bg-img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
    }
    
    /* Контент сверху */
    .banners__content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 440px;
        min-width: 440px;
        max-width: 60%;
        padding: 110px 0 0 0;
        text-align: center;
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }
    
    /* Шрифты как на десктопе */
    .banners__title {
        font-size: 56px;
    }
    
    .banners__subtitle {
        font-size: 56px;
    }
    
    .banners__desc {
        font-size: 16px;
        margin-top: 0;
    }
    
    .banners__btn {
        margin-top: 0;
        align-self: flex-start;
    }
    
    /* Декор снизу */
    .banners__decor-img--desktop {
        display: none;
    }
    
    .banners__decor-img--tablet {
        display: block;
    }
    
    .banners__decor-img--mobile {
        display: none;
    }
    
    .banners__decor {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
        display: flex;
        justify-content: center;
        max-width: 90%;
        max-height: none;
        z-index: 2; /* Под контентом (z-index: 3) */
    }
    
    .banners__decor-img {
        max-height: 440px;
        max-width: 100%;
    }
    
    /* Стрелки и пагинация в ряд */
    .banners__arrow {
        grid-row: auto;
        grid-column: auto;
        align-self: center;
        justify-self: auto;
    }
    
    .banners__arrow--prev {
        order: 1;
        transform: rotate(180deg);
    }
    
    .banners__pagination {
        order: 2;
        margin: 0 40px;
        grid-column: auto;
        grid-row: auto;
    }
    
    .banners__arrow--next {
        order: 3;
    }
    
    /* Навигация flex-row */
    .banners__inner {
        flex-wrap: wrap;
    }
    
    .banners__viewport {
        order: 0;
        width: 100%;
    }
    
    .banners__decor-spacer {
        display: none;
    }
    
    /* Навигация в отдельный контейнер через псевдо-flex */
    .banners__arrow,
    .banners__pagination {
        margin-top: 20px;
    }
}

/* ===== 850px ===== */
@media (max-width: 850px) {
    .banners__inner {
        padding: 0 16px;
    }
    
    .banners__viewport {
        max-width: 650px;
    }
    
    .banners__slide {
        height: 870px;
    }
    
    .banners__content {
        padding-top: 90px;
    }
    
    .banners__title {
        font-size: 48px;
    }
    
    .banners__subtitle {
        font-size: 48px;
    }
    
    .banners__decor-img {
        max-height: 380px;
    }
}

/* ===== 768px ===== */
@media (max-width: 768px) {
    .banners__viewport {
        max-width: 580px;
    }
    
    .banners__slide {
        height: 775px;
    }
    
    .banners__content {
        padding-top: 80px;
    }
    
    .banners__title {
        font-size: 42px;
    }
    
    .banners__subtitle {
        font-size: 42px;
    }
    
    .banners__decor-img {
        max-height: 320px;
    }
}

/* ===== 580px — мобилка ===== */
@media (max-width: 580px) {

        .banners__title,
    .banners__subtitle,
    .banners__desc {
        width: 100%;
        text-align: left;
    }
    .banners__inner {
        padding: 0 8px;
    }
    
    .banners__viewport {
        max-width: 100%;
    }
    
    .banners__slide {
     height: 580px; /* Фиксированная высота вместо min-height */
        min-height: auto;
         aspect-ratio: auto; 
    }
    
    /* Маска мобильная 390×580 */
    .banners__slide::after {
        background-image: url("/local/templates/my/images/slidebar/mask_mob.png");
    }
    
    /* Декор мобильный */
    .banners__decor-img--desktop {
        display: none;
    }
    
    .banners__decor-img--tablet {
        display: none;
    }
    
    .banners__decor-img--mobile {
        display: block;
    }
    
    .banners__content {
        width: 270px;
        min-width: 270px;
        max-width: 75%;
        padding-top: 75px;
        gap: 15px;
         z-index: 2;
         align-items: flex-start;
    }
    
    .banners__title {
        font-size: 32px;
    }
    
    .banners__subtitle {
        font-size: 32px;
    }
    
    .banners__desc {
        font-size: 14px;
    }
    
    /* Кнопка на всю ширину контента */
    .banners__btn {
        width: 100%;
        align-self: stretch;
    }
    
     .banners__decor {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1; /* Под контентом */
        max-width: 100%;
    }
    
     .banners__decor-img {
        max-height: 300px;
        max-width: 100%;
    }
    
    .banners__arrow {
        height: 40px;
    }
    
    .banners__arrow,
    .banners__pagination {
        margin-top: 16px;
    }
    
    .banners__pagination {
        margin: 16px 20px 0;
    }

    
}

/* ===== 480px ===== */
@media (max-width: 480px) {

    .banners__slide {
     height: 580px; /* Фиксированная высота вместо min-height */
        min-height: auto;
         aspect-ratio: auto; 
    }
    
    .banners__content {
        padding-top: 60px;
    }

         .banners__decor-img {
        max-height: 300px;
    }
    
    

}


/* ===== 400px ===== */
@media (max-width: 400px) {
       .banners__slide {
     height: 480px; /* Фиксированная высота вместо min-height */
        min-height: auto;
         aspect-ratio: auto; 
    }
    
    .banners__content {
        width: 260px;
        min-width: 260px;
        padding-top: 65px;
        gap: 12px;
    }
    
    .banners__btn {
        padding: 12px 16px;
 
        min-width: 150px;
    }
    
    .banners__decor-img {
        max-height: 300px;
    }
}

/* ===== 360px ===== */
@media (max-width: 360px) {
     .banners__slide {
     height: 475px; /* Фиксированная высота вместо min-height */
        min-height: auto;
         aspect-ratio: auto; 
    }
    
    .banners__content {
        width: 240px;
        min-width: 240px;
        padding-top: 50px;
        gap: 10px;
    }
    
    .banners__btn {
        padding: 10px 14px;

        min-width: 140px;
    }
    
    .banners__decor-img {
        max-height: 280px;
    }
}

/* ===== 340px ===== */
@media (max-width: 340px) {
      .banners__slide {
     height: 480px; /* Фиксированная высота вместо min-height */
        min-height: auto;
         aspect-ratio: auto; 
    }
    
    .banners__content {
        width: 220px;
        min-width: 220px;
        padding-top: 45px;
        gap: 8px;
    }
    
    .banners__btn {
        padding: 8px 12px;

        min-width: 120px;
    }
    
    .banners__decor-img {
        max-height: 200px;
    }
}