/* Скрываем лишние пункты на экранах меньше 960 пикселей */
@media screen and (max-width: 980px) {
    /* Находим нужный список меню */
    nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list.t-menu__list > li:nth-child(n+2):not(:last-child) {
        display: none; /* Прячем всё, что не первый и не последний пункт */
    }
    nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list.t-menu__list > li:last-child a{
        font-size: 16px !important;
    }
    .t1261__panel.t1261__panel_static {
        padding: 0 !important;
    }
}

nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list.t-menu__list > li:nth-child(n+2) {
        padding: 0.4em 1.4em;  /* Внутренние отступы для "кнопки" */
    }

/* Делаем первую ссылку похожей на кнопку */
nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list.t-menu__list > li:first-child a{ /* Сохраняем вид при активности */
    display: flex;
    align-items: center; /* Выравнивание по вертикали */
    padding: 0.4em 1.4em; /* Внутренние отступы кнопки */
    border-radius: 10px;
    background-color: #3b82f6; /* Ваш выбранный цвет */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px !important;
}

nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list > li:first-child a,
nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list > li:first-child a::before,
nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list > li:first-child a::after {
    color: white !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    content: none !important;
}
/* Эффект при наведении */
nav.t1261__menu:not(.t1261__menu_mobile) > ul.t1261__menu-list.t-menu__list > li:first-child a:hover {
    background-color: #2c69d6; /* Немного темнее исходного цвета */
}

@media screen and (min-width: 981px) {
    /* 1. Белый текст у ссылки с data-menu-item-number=1 */
    #rec2992056201 a[data-menu-item-number="1":not(t-menusub__link-item)].t-menu__link-item.t-active:not(.t978__menu-link),
    #rec5137273901 a[data-menu-item-number="1":not(t-menusub__link-item)].t-menu__link-item.t-active:not(.t978__menu-link),
    a[data-menu-item-number="1"] {
        color: white !important;
    }
}


/* ============================================================
   ДЕСКТОП (> 640px): 12 колонок, высота ≤ 320px, contain
   ============================================================ */
@media screen and (min-width: 641px) {
    #carousel_3039577101 .t-slds__container {
        width: 100%;
        max-width: 1200px;      /* ширина .t-container = 12 колонок */
        margin-left: auto;
        margin-right: auto;
    }

    #carousel_3039577101 .t-slds__item,
    #carousel_3039577101 .t-slds__container {
        height: 320px;
        max-height: 320px;
        overflow: hidden;
    }

    /* Если слайды —  */
    #carousel_3039577101 .t-slds__container img,
    #carousel_3039577101 .t-slds__item img {
        display: block;
        width: 100%;
        height: 320px;
        object-fit: contain;
        object-position: center center;
    }

    /* Если слайды — background-image */
    #carousel_3039577101 .t-slds__bgimg {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        height: 320px;
        max-height: 320px;
    }
}

/* ============================================================
   МОБИЛЬНЫЕ / ПЛАНШЕТ (<= 640px): вписываем целиком
   ============================================================ */
@media screen and (max-width: 640px) {
    /* 1. Сбрасываем фиксированные высоты, которые ставит Tilda */
    #carousel_6026621101,
    #carousel_6026621101 .t-slds__container,
    #carousel_6026621101 .t-slds__item,
    #carousel_6026621101 .t-slds__slide {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
    }

    /* 2. Если слайды реализованы как тег  */
    #carousel_6026621101 img {
        display: block !important;
        width: 100% !important;
        height: auto !important;       /* Высота считается от ширины */
        object-fit: contain !important; /* Вписываем целиком */
        object-position: center top !important;
    }

    /* 3. Если слайды реализованы как background-image (часто в GL19) */
    #carousel_6026621101 .t-slds__bgimg {
        background-size: contain !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        
        /* Задаем пропорции контейнера, чтобы он не схлопнулся в 0 */
        /* Если ваши баннеры широкие (как на скрине), 16/9 или 2/1 — то, что нужно */
        width: 100% !important;
        aspect-ratio: 16 / 9; 
        height: auto !important;
    }
}