/* ===== ДВУХКОЛОНОЧНОЕ ПОДМЕНЮ "ФАКУЛЬТЕТ" (и любое другое длинное) НА ДЕСКТОПЕ ===== */
@media (min-width: 992px) {

    /* Раскрытое подменю верхнего уровня в десктопном dropdown-меню */
    .grid-child.container-nav .metismenu-item.deeper > ul.mm-collapse.mm-show {
        display: block !important;
        column-count: 2 !important;
        column-gap: 20px !important;
        width: 700px !important;      /* подбери под реальную ширину текста пунктов */
        max-width: 90vw !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        padding: 10px 15px !important;
        box-sizing: border-box !important;
        white-space: normal !important;   /* разрешаем перенос строк */

    }
  /* Каждый пункт списка — не разрывать посередине между колонками,
       и не обрезать текст, если он не влезает в одну строку */
    .grid-child.container-nav .metismenu-item.deeper > ul.mm-collapse.mm-show > li {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        -webkit-column-break-inside: avoid !important;
        width: 100% !important;
    }
      /* Ссылки/кнопки внутри пунктов — текст переносится, а не обрезается многоточием */
    .grid-child.container-nav .metismenu-item.deeper > ul.mm-collapse.mm-show > li > a,
    .grid-child.container-nav .metismenu-item.deeper > ul.mm-collapse.mm-show > li > button {
        white-space: normal !important;
      }
  }
  @media (min-width: 992px) {
    .grid-child.container-nav .metismenu-item.deeper {
        position: static !important; /* чтобы dropdown позиционировался от всей навигации, а не от узкой кнопки */
    }
    .grid-child.container-nav .metismenu-item.deeper > ul.mm-collapse.mm-show {
        left: 50% !important;
        transform: translateX(-50%) !important; /* центрируем относительно кнопки */
    }
}

   
/*футтер*/
.footer-column h3 {
    font-size: 22px !important;
}
/* Жёстко фиксируем высоту текста анонса — обрезаем через line-clamp,
   чтобы верхняя карточка ВСЕГДА была одинаковой высоты в обеих колонках */
.fake-col-wrapper .jt-introtext {
    flex: none !important;          /* убираем resina-растяжение */
    height: 63px !important;        /* 3 строки * line-height 1.5 * 14px ≈ 63px */
    max-height: 63px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
}

/* Заголовок — тоже жёстко фиксируем количество строк (2), а не просто min-height */
.fake-col-wrapper .jt-title {
    height: 42px !important;       /* 2 строки при font-size ~16-18px */
    max-height: 42px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
}
/* Если карточка состоит только из фото и заголовка — растягиваем сам jt-inner,
   чтобы пустое место "съедалось" им, а не сдвигало соседний блок */
.fake-col-wrapper .slide:last-child .jt-inner {
    justify-content: flex-start !important;
}
/* ===== ВЫРАВНИВАНИЕ КАРТОЧЕК НОВОСТЕЙ В КОЛОНКАХ (fake-col-wrapper) ===== */

.owl-item .fake-col-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.fake-col-wrapper .slide {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;   /* каждая карточка в колонке тянется на равную долю высоты */
    height: auto !important;
}

.fake-col-wrapper .slide .jt-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1 1 auto !important;
}

/* Картинка — фиксированная высота, не сжимается */
.fake-col-wrapper .jt-imagecover {
    width: 100% !important;
    height: 200px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.fake-col-wrapper .jt-imagecover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Заголовок — одинаковый резерв места под 1-2 строки */
.fake-col-wrapper .jt-title {
    min-height: 48px !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
}

/* Текст описания — тянется, заполняя оставшееся место,
   благодаря чему обе карточки в колонке всегда одной высоты */
.fake-col-wrapper .jt-introtext {
    flex: 1 1 auto !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
}
@media (max-width: 991px) {

    /* Кнопки-разделители (например "Кафедры", "Учебный процесс", "Платное обучение"),
       встречающиеся ВНУТРИ уже открытого подменю на любом уровне вложенности —
       выравниваем по тому же левому краю, что и обычные ссылки-соседи */
    .grid-child.container-nav .collapse .mm-collapse.mm-show button.mod-menu__separator {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        text-align: left !important;
        padding: 8px 20px 8px 40px !important; /* тот же левый отступ 40px, что и у <a> рядом */
        font-size: 15px !important;
        font-weight: 400 !important;
        box-sizing: border-box !important;
        cursor: pointer !important;
        text-decoration: none !important;
        opacity: 0.9;
    }
}
/* ==========================================================================
   МОБИЛЬНОЕ МЕНЮ — ФИНАЛЬНАЯ ВЕРСИЯ
   ========================================================================== */
@media (max-width: 991px) {

    /* 1. Родительские контейнеры — колонка, логотип не "ездит" */
    .header,
    .header.container-header,
    .grid-child.container-nav {
        height: auto !important;
        min-height: unset !important;
        max-height: none !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-bottom: 10px !important;
        position: relative !important;
    }

    .grid-child.container-nav .navbar-brand {
        max-width: 100% !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 10px !important;
        display: block !important;
        order: 0 !important;
    }

    /* Кнопка-бургер — всегда видна */
    .grid-child.container-nav .navbar-toggler,
    .grid-child.container-nav button[data-bs-toggle="collapse"] {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        order: 1 !important;
        position: static !important;
        z-index: 10 !important;
    }

    /* 2. Обёртка меню — под логотипом, на всю ширину */
    .grid-child.container-nav .nav-content,
    .grid-child.container-nav .navbar-collapse,
    .grid-child.container-nav .collapse {
        display: flex !important;
        flex-direction: column !important;
        position: static !important;
        float: none !important;
        flex-grow: 0 !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        height: auto !important;
        order: 2 !important;
        background: transparent !important;
    }

    /* 3. Верхний список пунктов — зелёная панель */
    .grid-child.container-nav .collapse > ul {
        display: none !important;
        flex-direction: column !important;
        position: static !important;
        width: 100% !important;
        background: #0b2b26 !important;
        border-radius: 8px !important;
        margin-top: 10px !important;
        padding: 10px 0 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        box-sizing: border-box !important;
        list-style: none !important;
    }

    .grid-child.container-nav .collapse.show > ul {
        display: flex !important;
    }

   /* 4. Все вложенные подменю (любого уровня) скрыты по умолчанию,
          открываются классом mm-show, который ставит сама metismenu */
    .grid-child.container-nav .collapse .mm-collapse {
        display: none !important;
    }

    .grid-child.container-nav .collapse .mm-collapse.mm-show {
        display: flex !important;
        flex-direction: column !important;
        position: static !important;
        width: 100% !important;
        background: rgba(0, 0, 0, 0.25) !important;
        padding: 5px 0 !important;
        margin: 0 !important;
        list-style: none !important;
        box-shadow: none !important;
    }

    .grid-child.container-nav .collapse .mm-collapse.mm-show a {
        padding-left: 40px !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        opacity: 0.9;
    }

    /* 5. Пункты верхнего уровня — li как flex-строка: текст + стрелка в один ряд,
          единая логика и для <button class="mod-menu__separator">,
          и для пары <a> + отдельная <button class="mm-toggler-link"> */
    .grid-child.container-nav .collapse > ul > li {
        display: flex !important;
        align-items: stretch !important;
        width: 100% !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .grid-child.container-nav .collapse > ul > li:last-child {
      border-bottom: none !important;
    }

    /* Вариант "пункт = одна кнопка" (Факультет, Студенту, Абитуриенту) */
    .grid-child.container-nav .collapse > ul > li > button.mod-menu__separator {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        text-align: left !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
        cursor: pointer !important;
        text-decoration: none !important;
    }

    /* Вариант "пункт = ссылка + отдельная кнопка-стрелка" (Наука) */
    .grid-child.container-nav .collapse > ul > li > a {
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        color: #ffffff !important;
        background: transparent !important;
        text-align: left !important;
        padding: 12px 0 12px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
    }

    .grid-child.container-nav .collapse > ul > li > a + button.mm-toggler-link {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 20px !important;
        padding: 0 20px 0 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        box-sizing: content-box !important;
    }

    /* 6. Подсвечивание ссылок при наведении/фокусе */
    .grid-child.container-nav a:hover,
    .grid-child.container-nav a:focus,
    .grid-child.container-nav .active > a {
        background-color: rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important;
    }
}
/* ==========================================================================
   ЦВЕТ ТЕКСТА В МОБИЛЬНОМ МЕНЮ (СРАЗУ БЕЛЫЙ)
   ========================================================================== */
@media (max-width: 991px) {
    
    /* Красим все ссылки, текст и подзаголовки внутри мобильного меню в белый */
    .grid-child.container-nav .nav-content,
    .grid-child.container-nav .nav-content a,
    .grid-child.container-nav .nav-content .nav-link,
    .grid-child.container-nav .nav-content span,
    .grid-child.container-nav .nav-content li {
        color: #ffffff !important;
        opacity: 1 !important; /* Убираем возможную полупрозрачность */
    }

    /* Если у стрелочек (иконок раскрытия подменю) отдельный цвет, тоже делаем их белыми */
    .grid-child.container-nav .nav-content .metismenu-btn::after,
    .grid-child.container-nav .nav-content [class*="icon"],
    .grid-child.container-nav .nav-content .toggler {
        color: #ffffff !important;
        border-color: #ffffff !important; /* На случай, если стрелочка сделана через border */
    }
}
/* ==========================================================================
   УНИВЕРСАЛЬНЫЙ ФИКС ДЛЯ СТРАНИЦЫ АДМИНИСТРАЦИИ (БЕЗ ЛИШНИХ ОБЁРТОК)
   ========================================================================== */

/* Строка карточки руководства */
.blockrow {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 25px !important; /* Расстояние между картинкой и текстом */
    margin-bottom: 30px !important; /* Отступ между карточками деканов */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Обертка для картинки — ЖЕСТКИЙ ФИКС РАЗМЕРА */
.blockrow .blockimg {
    width: 160px !important;  /* Строгая ширина фото */
    height: 215px !important; /* Строгая высота фото */
    flex-shrink: 0 !important; /* Запрещаем картинке сжиматься */
    overflow: hidden !important;
    border-radius: 4px !important;
}

/* Сама картинка внутри обертки */
.blockrow .blockimg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Обрезает фото по пропорциям без искажения лица */
    object-position: center top !important; /* Держит фокус на лице */
}

/* Блок с текстом */
.blockrow .blocktext {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; /* Отступы между абзацами текста */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
    .blockrow {
        flex-direction: column !important; /* На телефонах картинка сверху, текст снизу */
        align-items: center !important;
        text-align: center !important;
    }
    .blockrow .blockimg {
        width: 180px !important; 
        height: 240px !important;
    }
}

/* ==========================================================================
   ФИКС СЕТКИ НОВОСТЕЙ (ЧТОБЫ КАРТОЧКИ НЕ "ГУЛЯЛИ")
   ========================================================================== */
@media (max-width: 991px) {
    
    /* 1. Превращаем каждый элемент слайда в flex-контейнер на всю высоту */
    .jtcs470 .owl-item,
    .jtcs470 .jt-item {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    /* 2. Ограничиваем обертку картинки, чтобы они все были строго одинаковыми */
    .jtcs470 .jt-imagecover {
        width: 100% !important;
        height: 180px !important; /* Фиксированная высота для мобильных */
        flex-shrink: 0 !important;
        overflow: hidden !important;
    }

    .jtcs470 .jt-imagecover img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 3. Центрируем и выпрямляем блок с текстовым содержимым */
    .jtcs470 .jt-title, 
    .jtcs470 .jt-introtext {
        display: block !important;
    }

    /* Заголовкам (датам) даем одинаковое пространство */
    .jtcs470 .jt-title,
    .jtcs470 a.jt-title {
        min-height: 44px !important; /* Резервируем место под 2 строки даты/заголовка */
        margin-top: 10px !important;
        margin-bottom: 8px !important;
    }

    /* Текст описания заставляем занимать все оставшееся место, 
       либо ограничиваем его, чтобы он не распирал карточку */
    .jtcs470 .jt-introtext {
        font-size: 14px !important;
        line-height: 1.4 !important;
        min-height: 60px !important; /* Выравнивает высоту текстового блока */
        margin-bottom: 15px !important;
    }
}
@media (max-width: 991px) {

    /* li верхнего уровня — центрируем содержимое по вертикали */
    .grid-child.container-nav .collapse > ul > li {
        align-items: center !important;
    }

    /* Кнопка-стрелка "Наука" — без растяжения, со своей высотой,
       стрелка внутри центрируется и по горизонтали, и по вертикали */
    .grid-child.container-nav .collapse > ul > li > a + button.mm-toggler-link {
        flex: 0 0 auto !important;
        align-self: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: auto !important;
        width: 40px !important;
        padding: 12px 20px 12px 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        box-sizing: border-box !important;
    }
}
/* ЯВНОЕ ОТОБРАЖЕНИЕ ПОИСКА НА ВСЕХ СТРАНИЦАХ */
.container-below-top {
    justify-content: space-between !important;
}

.container-below-top .mod-finder,
.container-below-top form:not(.mod-languages form) {
    display: flex !important;
    order: 2 !important;
}

.container-below-top input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 200px !important;
}

/* Убираем предыдущие скрытия на этой странице */
body.com_content.view-article .container-below-top .awesomplete,
body.com_content.view-category .container-below-top .awesomplete {
    display: block !important;
}
/* ===== КРАСИВАЯ НАВИГАЦИЯ МАГИСТРАТУРЫ ===== */
.magistracy-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px auto;
    padding: 0;
    max-width: 900px;
}

.magistracy-nav__item {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Trebuchet MS', Geneva, sans-serif;
    font-size: 25px !important;  /* Добавлено !important */
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: #333;
    background: #f5f7fa;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.magistracy-nav__item:hover {
    background: #2c5aa0;
    color: #fff;
    transform: translateY(-2px);
}

.magistracy-nav__item--active {
    background: #2c5aa0;
    color: #fff;
}


/* ===== УМНЫЙ ПОИСК: ТОЛЬКО КНОПКА ===== */

/* Скрываем поле ввода */
.container-below-top .mod-finder .awesomplete {
    display: none !important;
}

/* ИЛИ если поле не в обёртке awesomplete */
.container-below-top .mod-finder .mod-finder__search input {
    display: none !important;
}

/* Убираем лишний контейнер */
.container-below-top .mod-finder .mod-finder__search {
    width: auto !important;
}
/* ===== ОФОРМЛЕНИЕ ВЕРХНЕЙ ПАНЕЛИ (below-top) ===== */

/* Добавляем тёмный фон для верхней панели */
.container-below-top {
    display: flex !important;
    justify-content: flex-end !important; /* Было flex-end → теперь влево */
    align-items: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    padding: 10px 0px !important;
      max-width: 1200px !important; /* Ограничиваем ширину */
    border-radius: 8px !important; /* Все углы скруглены одинаково */

    background: #0b2b26!important; /* Тёмный фон как у шапки */
    margin-bottom: 0 !important;
    border-bottom: none !important; /* Убираем белую линию */
}

/* Блок выбора языка */
.container-below-top .mod-languages {
    order: 1 !important;
}

.container-below-top .mod-languages ul {
    display: flex !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.container-below-top .mod-languages li {
    margin: 0 !important;
}

.container-below-top .mod-languages a {
    padding: 5px 10px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    color: #ffffff !important; /* Белый текст на тёмном фоне */
}

.container-below-top .mod-languages .lang-active a {
    background: #1e5a9b !important;
    color: #ffffff !important;
    border-radius: 4px !important;
}

/* Поиск */
.container-below-top .mod-finder {
    order: 2 !important;
    flex: 1 !important;
    max-width: 100px !important;
}

.container-below-top .mod-finder .mod-finder__search {
    display: flex !important;
    width: 100% !important;
}

.container-below-top .mod-finder input {
    flex: 1 !important;
    padding: 8px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px 0 0 4px !important;
    font-size: 14px !important;
    background: #ffffff !important;
}

.container-below-top .mod-finder button {
    padding: 8px 12px !important;
    background: #8eb69b !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important; /* Все углы скруглены одинаково */
    cursor: pointer !important;
}

/* Расписание и Образовательный портал (если это ссылки) */
.container-below-top .quick-links {
    order: 3 !important;
    display: flex !important;
    gap: 15px !important;
}

.container-below-top .quick-links a {
    color: #ffffff !important; /* Белый текст на тёмном фоне */
    text-decoration: none !important;
    font-size: 14px !important;
    padding: 5px 10px !important;
}

.container-below-top .quick-links a:hover {
    text-decoration: underline !important;
    color: #e0e4e8 !important;
}



/* ===== СОЦИАЛЬНЫЕ СЕТИ В ЛЕВОЙ КОЛОНКЕ ===== */

.sidebar-social {
    margin-top: 20px;
    padding-top: 0; /* Убираем отступ сверху */
    border-top: none !important; /* Убираем линию */
    text-align: center;
}

.sidebar-social h3 {
    font-size: 14px;
    font-weight: 600;
    color: #016531 !important; 
    margin: 10px 0 12px 0;
}

.sidebar-social h3:first-of-type {
    margin-top: 0;
}

.sidebar-social-icons,
.sidebar-student-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sidebar-social-icons img,
.sidebar-student-icons img {
    transition: transform 0.3s ease;
}

.sidebar-social-icons img:hover,
.sidebar-student-icons img:hover {
    transform: scale(1.1);
}
/* Футер */
/*body.has-sidebar-left .container-footer {
    grid-column: 1 / 3 !important;
}*/

/* ===== ВЕРТИКАЛЬНЫЕ КАРТОЧКИ В ЛЕВОЙ КОЛОНКЕ ===== */
.container-sidebar-left .faculty-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.container-sidebar-left .faculty-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    background: #ffffff !important;
    border: 1px solid #eaeef2 !important;
    border-radius: 12px !important;
    padding: 12px !important;
    text-decoration: none !important;
}

.container-sidebar-left .faculty-card__image-wrapper {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.container-sidebar-left .faculty-card__image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.container-sidebar-left .faculty-card__content {
    padding: 0 !important;
    flex: 1 !important;
}

.container-sidebar-left .faculty-card__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e5a9b !important;
    margin: 0 !important;
}

/* Дополнительные ссылки */
.container-sidebar-left .extra-links {
    margin-top: 20px !important;
    padding-top: 15px !important;
}

.container-sidebar-left .extra-links a {
    display: block !important;
    padding: 10px 15px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    color: #016531 !important;
    text-decoration: none !important;
    margin-bottom: 8px !important;
    border: 1px solid #eaeef2 !important;
}

.container-sidebar-left .extra-links a:hover {
    background: #016531 !important;
    color: #ffffff !important;
}


/* Убираем нижний отступ у шапки */ 
.header.container-header {
    margin-bottom: 0 !important;
}
/* Уменьшить шрифт заголовка "СТУДЕНЧЕСКИЙ СОВЕТ В СОЦИАЛЬНЫХ СЕТЯХ" */
.footer-column.social-column h3:last-of-type,
.footer-column.social-column h3:nth-of-type(2) {
    font-size: 16px !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    line-height: 1.3 !important;
}
/* ===== ВОЗВРАЩАЕМ ИСХОДНЫЕ ГРАНИЦЫ ДЛЯ КОНТЕНТА ===== */

/* Ограничиваем ширину основного контента */
.container-component,
.container-banner,
.container-bottom-a,
.container-bottom-c {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
}

/* Возвращаем отступы, чтобы контент не прилипал к краям */
.container-component {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

/* Текст не должен вылезать */
/*.container-component p,
.container-component div,
.container-component h1,
.container-component h2,
.container-component h3,
.container-component h4,
.container-component h5,
.container-component h6,
.container-component table,
.container-component ul,
.container-component ol {
    max-width: 100% !important;
    overflow-x: auto !important;
    word-wrap: break-word !important;
}*/

/* Таблицы не вылезают за границы */
.container-component table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
}

/* Восстанавливаем отступы для левой колонки */
.container-sidebar-left {
    padding: 20px 15px !important;
    box-sizing: border-box !important;
}

/* Возвращаем отступы для сетки */
.site-grid {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* ===== СЕТКА 2×2 ДЛЯ СЛАЙДЕРА ===== */


/* Картинки */
.jtcs470 .jt-imagecover {
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
}

.jtcs470 .jt-imagecover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Отключаем навигацию */
.jtcs470.owl-carousel .owl-nav,
.jtcs470.owl-carousel .owl-dots {
    display: none !important;
}


/* Footer */
  .container-footer {
    background: #235347 !important; /* Светло-серый фон */

  }
.footer-columns-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    width: 100%;
}

.footer-column {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.footer-column a {
    text-decoration: none;
    color: inherit;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* --Адаптивность --*/
@media (max-width: 992px) {
    .footer-columns-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer-columns-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Для копирайта */
.footer-module-wrapper {
    width: 100%;
}



/* --- Header Styles --- */
.header {
    background: #235347;
    padding-left: 30px;
    padding-right: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* ОСНОВНОЙ КОНТЕЙНЕР ДЛЯ ЛОГОТИПА И МЕНЮ */
.grid-child.container-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    height: 100px;
    margin: 0 auto;
    padding: 10px 0;
}

/* ЛОГОТИП СЛЕВА */
.grid-child.container-nav .navbar-brand {
    flex-shrink: 0;
    max-width: 350px;
    width: auto;
}

/* КОНТЕЙНЕР ДЛЯ МЕНЮ И ПОИСКА СПРАВА */
.grid-child.container-nav .nav-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

/* ПОИСК В НАВИГАЦИИ */
.grid-child.container-nav .container-search {
    margin-left: 20px;
}

/* ВЕРХНИЕ ПАНЕЛИ */
.container-topbar {
    display: flex;
}

.container-below-top {
    display: flex;
    justify-content: flex-end;
   
}

/* ===== SEARCH MODULE STYLES ===== */
.js-finder-searchform label.finder {
    display: none !important;
}

.js-finder-searchform input::placeholder {
    color: #999 !important;
}

.js-finder-searchform .mod-finder__search {
    display: flex;
}

.js-finder-searchform .form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

.js-finder-searchform .btn {
    border-radius: 0 4px 4px 0;
    margin-left: -1px;
    background-color: #495057;
    color: #ffffff;
    border-color: #495057;
}

/* Адаптивность для мобильных 
@media (max-width: 991px) {
    .grid-child.container-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grid-child.container-nav .nav-content {
        justify-content: center;
        margin-top: 15px;
        flex-direction: column;
    }
    
    .grid-child.container-nav .navbar-brand {
        text-align: center;
    }
    
    .grid-child.container-nav .container-search {
        margin-left: 0;
        margin-top: 10px;
    }
}




/* Стили для модуля bottom-a (новостной слайдер) */
.container-bottom-a {
    margin: 30px 0;
    padding: 0 15px;
}

.container-bottom-a .card {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

/* Стили для JT Content Slider в позиции bottom-a */
.container-bottom-a {
    margin: 30px 0;
    padding: 0 15px;
}

/* Основной контейнер слайдера */
.jt-content-slider {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Заголовок "ПОСЛЕДНИЕ НОВОСТИ" */
.jt-content-slider .slider-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a6b 100%);
    color: #ffffff;
    padding: 20px 25px;
    font-family: 'Arial', sans-serif;
}

.jt-content-slider .slider-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.jt-content-slider .slider-header .news-subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 5px;
    display: block;
    color: rgba(255, 255, 255, 0.9);
}

/* Контейнер слайдов */
.jt-content-slider .slider-container {
    padding: 0;
}

/* Отдельный слайд */
.jt-content-slider .slider-item {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
    position: relative;
}

.jt-content-slider .slider-item:last-child {
    border-bottom: none;
}

.jt-content-slider .slider-item:hover {
    background-color: #f8f9fa;
}

/* Заголовки статей в слайдере */
.jt-content-slider .item-title {
    color: #2c5aa0;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.jt-content-slider .item-title a {
    color: inherit;
    text-decoration: none;
}

.jt-content-slider .item-title a:hover {
    color: #1e3a6b;
    text-decoration: underline;
}

/* Текст статьи */
.jt-content-slider .item-introtext {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.jt-content-slider .item-introtext p {
    margin-bottom: 10px;
}

/* Даты и метки */
.jt-content-slider .item-date {
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
}

/* Категории */
.jt-content-slider .item-category {
    background: #28a745;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

/* Кнопка "Подробнее" */
.jt-content-slider .readmore {
    color: #2c5aa0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}

.jt-content-slider .readmore:hover {
    color: #1e3a6b;
    text-decoration: underline;
}

/* Особый стиль для выделенных статей */
.jt-content-slider .featured-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #28a745;
}

.jt-content-slider .featured-item .item-title {
    color: #28a745;
}

/* Кнопки навигации слайдера */
.jt-content-slider .slick-prev,
.jt-content-slider .slick-next {
    background: #2c5aa0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    z-index: 1;
}

.jt-content-slider .slick-prev:hover,
.jt-content-slider .slick-next:hover {
    background: #1e3a6b;
}

.jt-content-slider .slick-prev:before,
.jt-content-slider .slick-next:before {
    color: #ffffff;
}

/* Точки (индикаторы) слайдера */
.jt-content-slider .slick-dots {
    bottom: -30px;
}

.jt-content-slider .slick-dots li button:before {
    color: #2c5aa0;
    font-size: 10px;
}

.jt-content-slider .slick-dots li.slick-active button:before {
    color: #1e3a6b;
}

/* Стили для изображений в слайдере */
.jt-content-slider .item-image {
    margin-bottom: 15px;
}

.jt-content-slider .item-image img {
    border-radius: 4px;
    width: 100%;
    height: auto;
}

/* Адаптивность 
@media (max-width: 768px) {
    .container-bottom-a {
        margin: 20px 0;
        padding: 0 10px;
    }
    
    .jt-content-slider .slider-header {
        padding: 15px 20px;
    }
    
    .jt-content-slider .slider-header h2 {
        font-size: 20px;
    }
    
    .jt-content-slider .slider-item {
        padding: 20px;
    }
    
    .jt-content-slider .item-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .jt-content-slider .slider-header h2 {
        font-size: 18px;
    }
    
    .jt-content-slider .slider-item {
        padding: 15px;
    }
    
    .jt-content-slider .slider-header .news-subtitle {
        font-size: 12px;
    }
}
/* Стиль для блоков персоналий 
@media (width >= 577px){
  .blockrow {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  }
}
@media (width <= 576px){
  .blockrow {
  display: block;
  flex-direction: column;
  flex-wrap: nowrap;
}
}
@media (width >= 992px){
.blockimg{
  float: left;
  width:30%; 
  padding: 20px; 
  text-align: center; 
  }
.blocktext{
  float: left;
  width:70%; 
  padding: 20px; 
  text-align: left; 
  }
}
@media (width <= 991px){
.blockimg{
  float: left;
  width:50%; 
  padding: 20px; 
  text-align: center; 
  }
.blocktext{
  float: left;
  width:50%; 
  padding: 20px; 
  text-align: left; 
  }
}
@media (width <= 576px){
.blockimg{
  float: left;
  width:100%; 
  padding: 20px; 
  text-align: center; 
  }
.blocktext{
  float: left;
  width:100%; 
  padding: 20px; 
  text-align: left; 
  }
}

/* Стиль для блоков истории 
@media (width >= 577px){
  .history-block {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
  }
}
@media (width <= 576px){
  .history-block {
    display: block;
    flex-direction: column;
    flex-wrap: nowrap;
    margin-bottom: 30px;
  }
}

/* Изображения одинакового размера */
.history-img img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #ddd;
}

/* Адаптивность для изображений 
@media (width >= 992px){
  .history-img{
    float: left;
    width:30%; 
    padding: 20px; 
    text-align: center; 
  }
  .history-text{
    float: left;
    width:70%; 
    padding: 20px; 
    text-align: left; 
  }
}
@media (width <= 991px) and (width >= 577px){
  .history-img{
    float: left;
    width:50%; 
    padding: 20px; 
    text-align: center; 
  }
  .history-img img {
    width: 180px;
    height: 180px;
  }
  .history-text{
    float: left;
    width:50%; 
    padding: 20px; 
    text-align: left; 
  }
}
@media (width <= 576px){
  .history-img{
    float: left;
    width:100%; 
    padding: 20px; 
    text-align: center; 
  }
  .history-img img {
    width: 150px;
    height: 150px;
  }
  .history-text{
    float: left;
    width:100%; 
    padding: 20px; 
    text-align: left; 
  }
}

/* Стиль ссылок */
.history-text h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.history-text h3 a:hover {
  color: #e74c3c;
  text-decoration: underline;
}

/* Стиль описания */
.history-text p {
  color: #666;
  line-height: 1.5;
  margin-top: 10px;
}

/*--style table--*/
table {
    width: 100%; 
    border-collapse: collapse;
    border: 1px solid #999;
   }
   td, th {
    padding: 5px; 
    border: 1px solid #999; 
    text-align: center;
   }
   tbody tr:nth-child(even) {
    background: #fcf8e3; /* Зебра */
   }
   table tr:first-child {
    background-color: #dff0d8;
}
/*--обучение на факультете--*/
.faculty-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    margin: 20px auto !important;
    padding: 0 20px !important;
    max-width: 1200px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.faculty-card {
    text-decoration: none !important;
    background: #ffffff !important;
    border: 1px solid #eaeef2 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 5px 15px rgba(0, 40, 80, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 320px !important;
}

.faculty-card__image-wrapper {
    width: 100% !important;
    height: 180px !important;
    overflow: hidden !important;
    background-color: #f8f9fa !important;
}

.faculty-card__image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

.faculty-card:hover {
    transform: translateY(-5px) !important;
    border-color: #1e5a9b !important;
    box-shadow: 0 15px 30px rgba(30, 90, 155, 0.15) !important;
}

.faculty-card:hover .faculty-card__image-wrapper img {
    transform: scale(1.08) !important;
}

.faculty-card__content {
    padding: 20px 18px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: left !important;
}

.faculty-card__title {
    color: #1e5a9b !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    display: block !important;
    width: 100% !important;
}

.faculty-card__subtitle {
    color: #2c3e50 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
}

/* Для планшетов 
@media (max-width: 900px) {
    .faculty-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Для мобильных 
@media (max-width: 640px) {
    .faculty-cards {
        grid-template-columns: 1fr !important;
        padding: 0 15px !important;
    }
    
    .faculty-card {
        max-width: 450px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    .faculty-card__image-wrapper {
        height: 200px !important;
    }
}

/* ===== FIX MOBILE MENU ===== 
@media (max-width: 768px){

    /* контейнер меню 
    .grid-child.container-nav{
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 10px 0;
    }

    /* блок где лежит меню 
    .grid-child.container-nav .nav-content{
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    /* само меню 
    .container-nav ul,
    .container-nav .navbar-nav{
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    /* пункты меню 
    .container-nav li{
        width: 100%;
    }

    /* ссылки меню 
    .container-nav a{
        display: block;
        width: 100%;
        white-space: normal;
        word-break: break-word;
        text-align: left;
        padding: 10px 15px;
    }

    /* убираем смещение вправо 
    .container-below-top{
        justify-content: flex-start;
    }
}*/

.h1small>h1,.h1 {font-size:1em;}
/* !!!!!!!!!!!!!!Ссылки "Расписание занятий" / "Образовательный портал" — идут первыми (левее) */

/* ===== ПОЛНЫЙ ФИКС ВЕРХНЕЙ ПАНЕЛИ: ССЫЛКИ СЛЕВА, ПОИСК СПРАВА ===== */

/* Настраиваем общий контейнер как флекс, прижимаем к правому краю и добавляем отступ справа */
.grid-child.container-below-top {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 20px !important;
    padding-right: 15px !important; /* ВОТ ЭТОТ ОТСТУП отодвинет поиск от правого края плашки */
}

/* Находим тег поиска и принудительно даем ему самый высший приоритет справа */
.grid-child.container-below-top search {
    order: 99 !important; 
    margin-left: 0 !important;
}

/* Находим блок, в который Joomla завернула твои ссылки ("Расписание" и "Портал") */
.grid-child.container-below-top > div:not(search) {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    order: 1 !important; 
}

/* Если внутри этого дива модули ссылок перепутались местами, задаем им правильный порядок */
#mod-custom484 { order: 1 !important; } 
#mod-custom485 { order: 2 !important; }