/* **************** */
/*                  */
/*  Шаблон 2018     */
/*  Модернизированный */
/*                  */
/* **************** */

/*--------------------------------------------------------*/
/* Настройки темы и переменных (:root)                     */
/*--------------------------------------------------------*/
:root {
    --primary: #4F46E5;         /* Индиго (акцент: кнопки, ссылки) */
    --primary-hover: #4338CA;
    --dark-bg: #0F172A;         /* Глубокий графит (для меню) */
    --body-bg: #F8FAFC;         /* Светлый нейтральный фон */
    --card-bg: #FFFFFF;         /* Белый фон блоков */
    --text-main: #1E293B;       /* Основной текст (Slate 800) */
    --text-muted: #64748B;      /* Второстепенный текст */
    --border-color: #E2E8F0;    /* Тонкие рамки */
}

/*--------------------------------------------------------*/
/* Шрифты и глобальные правила                            */
/*--------------------------------------------------------*/
/* Правильное и безопасное подключение шрифта Inter */
@import url('https://googleapis.com');

* {
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
}

/* 
   Назначаем шрифт Inter основному контенту.
   Мы полностью убрали отсюда тег span и ссылки 'a', чтобы они не ломали дату и верхнюю строку.
*/
body, #layout, p, h1, h2, h3, h4, td {
    font-family: 'Inter', sans-serif !important;
}

/* 
   БЕЗОПАСНАЯ ЗОНА ДЛЯ ВЕРХНЕЙ СТРОКИ:
   Полностью сохраняем оригинальный шрифт и кодировку платформы edu.by,
   чтобы дата отображалась корректно, а иконка слабовидящих вернулась на место.
*/
#top_bar, #top_bar * {
    font-family: Tahoma, Arial, sans-serif !important;
}

body {
    background: var(--body-bg) !important; 
    color: var(--text-main);
    width: 100%; 
    height: 100%; 
    overflow-y: scroll;
}


/* Базовые элементы */
a, img { border: 0; }
a:link { color: #004E88; }
a:visited { color: #002F52; }
a:hover { text-decoration: underline; color: #005C9C; }

/* Возвращаем браузерный маркер для списков, который использовался в оригинале */
ul { list-style-position: inside; list-style-type: square; }
ul ul { margin-left: 1.6em; list-style-type: square; }

hr { 
    color: var(--border-color); 
    background-color: var(--border-color); 
    border: 0; 
    height: 2px; 
    clear: both;
}

table { border-collapse: collapse; border-color: var(--border-color); width: 100%; }
table td { vertical-align: middle; }
.content_box table p { margin: 0.4em auto 0.6em; }
iframe { max-width: 100%; }

/*--------------------------------------------------------*/
/* Глобальная разметка                                    */
/*--------------------------------------------------------*/
body, #layout {
    font-size: 16px; 
}

#layout {
    background: var(--card-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); 
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-repeat: no-repeat;
    background-size: 100%; 
}

#layout > div.wrapper { padding: 0; }
.wrapper { padding: 0 10px; }

/* ФИКС СДВИГА ИКОНКИ СЛАБОВИДЯЩИХ (Запрещаем сброс внутренних полей в топ-баре) */
#top_bar * {
    box-sizing: content-box !important;
}
#top_bar a {
    display: inline-block !important;
}

#scroll_up {
    display: none; 
    position: fixed; 
    bottom: 30px; 
    right: 40px; 
    height: 50px; 
    width: 50px; 
    padding: 0 !important;
    border-radius: 50% !important; 
    background: var(--primary) !important;
    color: #fff !important;
    line-height: 50px; 
    text-align: center; 
    cursor: pointer; 
    box-shadow: 0 0 0 0 rgba(from var(--primary) r g b / 0.4);
    animation: pulse-blue 2s infinite;
    z-index: 1000;
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(from var(--primary) r g b / 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(from var(--primary) r g b / 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(from var(--primary) r g b / 0); }
}

#scroll_up:hover { opacity: 1; }

/*--------------------------------------------------------*/
/* Шапка и Логотип                                        */
/*--------------------------------------------------------*/
#header {
    clear: both; 
    position: relative; 
    background: var(--card-bg) !important;
    box-shadow: inset 0 -10px 20px -10px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary);
}

#header > .wrapper { padding: 0; }

#top_bar { 
    line-height: 22px; 
    padding: 2px 10px; 
    font-size: 12px; 
    background-color: var(--body-bg); 
    border-bottom: solid 1px var(--border-color); 
    text-align: right; 
}
#top_bar > div { display: inline-block; height: 22px; line-height: 22px; }

#logo { padding: 15px 30px 15px; max-height: 300px; overflow: hidden; background: transparent !important; }
#logo_image { float: left; text-align: center; }
#logo_image img { display: inline-block; width: auto; height: 140px; max-height: 140px; margin: 5px 0; }
#logo_block { float: left; display: table; height: 150px; max-width: 100%; width: 65%; margin-left: 20px; }
#logo_block_content { padding: 12px 0; display: table-cell; vertical-align: middle; }
#logo_block p { margin-bottom: 1em; }

#logo img {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0,78,136,0.2));
}
#logo img:hover { transform: scale(1.05); }


/*--------------------------------------------------------*/
/* Главное горизонтальное меню                            */
/*--------------------------------------------------------*/
#h_menu {
    clear: both; 
    width: 100%; 
    text-align: center; 
    line-height: 2.4em; 
    background: #A0CCEC !important; /* Оригинальный голубой фон */
}

#h_menu ul { list-style-type: none; display: inline; }
#h_menu li { display: inline-block; color: #000000 !important; position: relative; }
#h_menu li:hover { background-color: #288AC8 !important; color: #fafafa !important; }
#h_menu li a, #h_menu li span { display: block; padding: 0 0.6em; text-decoration: none; min-width: 32px; color: inherit; }
              
#h_menu li.parent_active, .menu_active, .home-icon-active { background: #288AC8; color: #fafafa; position: relative; }
.home-icon { display: inline-block; width: 0; }
.home-icon a { position: relative; }

/* Настройка выпадающего меню */
#h_menu .level_0 ul { 
    visibility: hidden; 
    position: absolute; 
    width: 260px; 
    margin: 0; 
    z-index: 999; 
    opacity: 0; 
    transform: translateY(10px);
    transition: visibility 0.5s, opacity 0.3s ease-in, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
}
#h_menu li:hover > ul { visibility: visible; opacity: 1; transform: translateY(0); }

/* Настройка отдельных уровней */
#h_menu .level_1 { 
    left: 0; 
    background: #D1ECFF !important; /* Светло-голубой фон выпадающего списка */
    font-size: 0.9em; 
    line-height: 1.1em;
}
#h_menu .level_0 > li:last-child ul { left: initial; right: 0; }
#h_menu .level_1 li { display: block; text-align: left; color: #000000 !important; }
#h_menu .level_1 li:hover { background-color: #288AC8 !important; color: #fafafa !important; }
#h_menu .level_1 li > span, #h_menu .level_1 li > a { padding: 0.5em 0.8em; }
#h_menu .level_2 { left: 100%; top: 0; background: #288AC8; }

#h_menu li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
#h_menu li:hover a::after { width: 100%; }


/*--------------*/
/* Выбор языков */
/*--------------*/

   #lng {height: 22px; line-height: 22px; float: left; font-size: 12px; }
   #lng > span, #lng > a {padding: 0 0.3em; }
       #lng > span:hover, #lng > a:hover {background: #288AC8; }
       #lng > span span {margin: 0 0.6em; }
       #lng img {height: 16px; width: auto; display: block; float: left; margin: 3px 0;}

.lng_active {background-color: #a0ccec;}


/*---------------------------------*/
/* Блок настройки шрифта (в шапке) */
/*---------------------------------*/

#font_size_changer {float: left; margin-right: 50px;}
#font_size_changer a {display: inline-block; width: 2.2em; text-align: center; font-size: 12px; cursor: pointer; float: left; text-decoration: none; font-weight: bold; }
#font_size_changer a:hover {background-color: #288AC8; color: #fff; }
.fs_active {background-color: #288AC8; }


/*---------------------------*/
/* RSS ссылка / карта сайта  */
/*---------------------------*/
#rss_top_link, #site_map_link, #date_time {overflow: hidden;display:inline-block; }
   #rss_top_link a, #site_map_link a {display: inline-block; overflow: hidden; width: 3em; text-align: center; text-decoration: none; }
#site_map_link a {width: auto; padding: 0 0.5em; }
   #rss_top_link a:hover, #site_map_link a:hover {background-color: #288AC8; color: #fff; }

/*--------------------------------------------------------*/
/* Центральная часть и Сетка Контента                     */
/*--------------------------------------------------------*/
#aside { margin-top: .5em; }
#body { clear: both; margin-top: .5em; line-height: 1.6; color: var(--text-main); }
#body > .wrapper { padding: 0; }

.content_box, .form_structure {
    background: var(--card-bg);
    border: none !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    border-radius: 8px !important;
}

.aside_box {
    border: none !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.content_box:hover, .aside_box:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
}







/*--------------------------------------------------------*/
/* Центральная часть и Сетка Контента                     */
/*--------------------------------------------------------*/
#aside { margin-top: .5em; }
#body { clear: both; margin-top: .5em; line-height: 1.6; color: var(--text-main); }
#body > .wrapper { padding: 0; }

.content_box, .form_structure {
    background: var(--card-bg);
    border: none !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    border-radius: 8px !important;
}

.aside_box {
    border: none !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.content_box:hover, .aside_box:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
}
/* Анимация появления блоков */
.content_box, .aside_box {
    animation: fadeInUp 0.6s ease backwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.aside_box > .wrapper { overflow: hidden; } 
.aside_box > h3 { 
    margin: 0; 
    padding: 0.5em 0.75em; 
    background: #F1F5F9 !important; 
    color: #1E293B;
    border-bottom: 2px solid #2563EB; 
    font-size: 1.1em;
}
.aside_box img { max-width: 220px; }

.content_box { clear: both; margin: 20px 0; } 
.content_box:first-child { margin-top: 0; }
#region_2_default .content_box { padding: 0 10px 3em 20px; }
#breadcrumbs { font-size: 0.8em; padding: 0.5em 10px; }

.content_box h1 {
    letter-spacing: -0.5px; 
    border-left: 5px solid var(--primary); 
    padding-left: 15px;
    font-size: 1.8em; 
    margin: 0 0 1em;
}
.content_box p, .content_box h2, .content_box h3 { margin-bottom: 1em; }

/* Карточки статей (.excerpt) */
.excerpt {
    background: var(--card-bg);
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    padding: 1.5em !important;
    margin-bottom: 1.5em !important;
    transition: all 0.3s ease;
    clear: both;
    overflow: hidden;
}
.excerpt:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 24px rgba(from var(--primary) r g b / 0.15);
    transform: translateX(5px); 
}
.excerpt:last-child { border-bottom: none; }

.excerpt_preview { display: block; float: left; min-height: 70px; width: 100px; padding: 5px; margin-right: 15px; }
.excerpt_preview img { max-width: 100px; height: auto; display: block; margin: 0 auto; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.excerpt_content { margin-left: auto; overflow-x: auto; }
.excerpt_content h3 { margin: 0; font-size: 1em; }
.excerpt_content h2 { margin-bottom: 0.5em; font-size: 1.2em; }


/* Записи и списки */
.post { margin-bottom: 1em; overflow-x: auto; }
.post_content { margin-bottom: 2em; overflow-x: auto; }
.post h2 { font-size: 1.5em; margin: 0.5em 0 1em; }
.post h3 { font-size: 1.2em; margin: 0.5em 0 1em; }

/* Стрелочки будут появляться ТОЛЬКО внутри контейнера .post_content и .content_box */
.content_box .post_content ul, .post ul { list-style: none !important; padding-left: 20px; margin: 0.5em 0 1em; }
.content_box .post_content ul li, .post ul li { position: relative; margin-bottom: 8px; list-style-type: none !important; }
.content_box .post_content ul li::before, .post ul li::before {
    content: "➔" !important; 
    position: absolute;
    left: -20px;
    color: var(--primary);
    font-size: 0.8em;
    transition: transform 0.2s;
    display: inline-block !important;
}
.content_box .post_content ul li:hover::before, .post ul li:hover::before { transform: translateX(3px); }
.post ol { padding-left: 2em; margin: 0.5em 0 1em; }

.post img {
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    border-radius: 4px;
    margin: 10px;
    max-width: 100%;
}

.news-post h3 { margin: 0 0 0.2em; font-size: 1em; color: #333; }
.news-post h1 { margin: 0 0 0.5em; }
.anno { color: var(--primary); font-weight: bold; margin-bottom: 1.6em; }
.date { display: block; font-size: 0.9em; color: var(--primary); font-weight: bold; }
.title, .name, .nazv { display: block; clear: both; font-weight: bold; }

/* Таблицы в контенте */
.content_box .tbl { margin: 0.5em auto; vertical-align: middle; }
.content_box .tbl thead { background-color: #F8FAFC !important; border-bottom: 2px solid #E2E8F0 !important; }
.content_box .tbl td { border: 1px solid var(--border-color); padding: 5px; vertical-align: middle; }
.content_box .tbl tr:nth-of-type(even) { background-color: #FBFDFE !important; }
.content_box .tbl tr:hover { background: #F7F1C8; }
.content_box .tbl caption { margin-bottom: 5px; }





/* Кнопки взаимодействия */
.link-button, .form_structure input[type="button"], #pin_reload {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.link-button {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    border-radius: 8px !important;
    color: #fff !important;
    padding: 10px 24px !important;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    margin: 1em 0;
}
.link-button:hover, .form_structure input[type="button"]:hover, #pin_reload:hover {
    transform: translateY(-2px); 
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

/*--------------------------------------------------------*/
/* Формы обращений и структуры                            */
/*--------------------------------------------------------*/
.form_structure { list-style-type: none; padding: 1.5em; }
.form_structure li { clear: both; display: block; margin-bottom: 1em; width: 100%; float: left; }
.form_structure .info_field { display: block; float: left; width: 35%; padding-right: 10px; }
.form_structure .input_field { display: block; float: left; width: 65%; }
.form_structure input[type="button"] { border: none; font-size: 1em; }

.form_structure input[type="text"], .form_structure textarea, .form_structure select {
    width: 100%; max-width: 100%; box-sizing: border-box; border: solid 2px var(--border-color); border-radius: 3px; padding: 0.3em; font-size: 0.8em; 
}
.form_structure select { cursor: pointer; background: #fff; }

.form_structure input[type="text"]:valid, .form_structure textarea:valid {
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1ElEQVQ4T6WT4Q3CIBSEj+B/beIAjtAmDqAjuEGZxFHoKA6gqW7gAE3KAoiBFIIIlCo/gfve8e5B8Ociv+h5P9asqe5auxjAb0NLFDiArt1v2SKAJ7bGu2JARAwF9SgCpMSgq4MBTBfOitKTbY71mBOzphIkuCAUpUcLmRObFPh1EARYe3EaCF6ynrrtjvSbtW1d2W4SnSmkvIQQABt/RmJiNwcJSLayc+CaFXdiogpt+84+YgydzImjo2whgHrmKn89wbfF+3EHQPjdTn26oknM/dg3BfKDm4nsiKYAAAAASUVORK5CYII='); background-position: right 5px center; background-repeat: no-repeat; 
}
.form_structure input[type="text"]:focus, .form_structure textarea:focus, .form_structure select:focus {
    border: solid 2px var(--primary); background-color: var(--body-bg); font-weight: bold; 
}

.guestbook_form { overflow: hidden; margin-bottom: 2em; padding-bottom: 1em; border-bottom: dotted 2px var(--primary); }
ul.guestbook { list-style-type: none; }
.guestbook_post { margin-bottom: 1.5em; list-style-type: none; }
.answer { margin-left: 30px; font-style: oblique; padding: 1em; color: var(--text-muted); }

/*--------------------------------------------------------*/
/* ГЛОБАЛЬНЫЙ ФИКС РАЗДЕЛЕНИЯ ВКЛАДОК ДЛЯ ПК-ВЕРСИИ         */
/*--------------------------------------------------------*/
/* Добавляем четкие зазоры между вкладками на мониторах */
.ajax__tab_header {
    padding: 0 0 5px 0 !important;
    border-bottom: 2px solid #a0ccec !important; /* Линия под вкладками */
}

/* Каждая вкладка как отдельная сине-голубая коробочка */
.edu_by .ajax__tab_header .ajax__tab_outer {
    display: inline-block !important;
    margin-right: 5px !important; /* Расстояние между вкладками, чтобы они не слипались */
    background: #E2F3FF !important; /* Светлый фон для неактивных */
    border: 1px solid #a0ccec !important;
    border-bottom: none !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 0 !important;
}

.edu_by .ajax__tab_header .ajax__tab_inner {
    display: block !important;
    padding: 0 !important;
    background: none !important;
}

/* Стилизация текста и высоты вкладок на ПК */
.edu_by .ajax__tab_header .ajax__tab_tab {
    display: block !important;
    padding: 6px 16px !important; /* Делаем внутренние отступы, создавая воздух вокруг букв */
    color: #004E88 !important; /* Цвет ссылок */
    font-size: 0.95em !important;
    font-weight: normal !important;
    text-decoration: none !important;
}

/* Эффект наведения мышки на ПК */
.edu_by .ajax__tab_header .ajax__tab_outer:hover {
    background: #a0ccec !important;
}

/* СТИЛИ ДЛЯ АКТИВНОЙ (ВЫБРАННОЙ) ВКЛАДКИ НА ПК */
.edu_by .ajax__tab_active .ajax__tab_outer {
    background: #288AC8 !important; /* Выбранная вкладка горит фирменным синим цветом */
    border-color: #288AC8 !important;
}
.edu_by .ajax__tab_active .ajax__tab_tab {
    color: #FFFFFF !important; /* Белый текст на синей кнопке */
    font-weight: bold !important;
}

/* Главное тело (контент) под вкладками */
.edu_by .ajax__tab_body {
    border: 2px solid #a0ccec !important;
    border-radius: 0 0 6px 6px !important;
    padding: 1.5em !important;
    background: #FFFFFF !important;
    clear: both !important;
}










/*--------------------------------------------------------*/
/* Подвал сайта (Footer)                                  */
/*--------------------------------------------------------*/
#footer { 
    clear: both; 
    background: #F1F5F9 !important; 
    overflow: hidden; 
    border-top: 1px solid var(--border-color) !important; 
    color: var(--text-muted) !important;
}
#footer > .wrapper { padding: 1em 30px 2em; overflow: hidden; }

#footer_line {
    background: rgba(from var(--primary) r g b / 0.05) !important; 
    height: auto !important; 
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}
#footer_line .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-muted);
}

#carousel-default { width: 97%; margin: 0 auto; }
#carousel-default:hover { filter: grayscale(0%); opacity: 1; }
#footer_block { font-size: 0.9em; }
#footer_block_content { margin-bottom: 1em; margin-top: 2em; }

#footer a { transition: all 0.3s ease; display: inline-block; text-decoration: none; color: var(--dark-bg) !important; }
#footer a:hover { color: var(--primary) !important; transform: translateX(5px); text-decoration: none; }
#footer ul { list-style: none; }
#footer ul li::before { content: "•"; color: var(--primary); margin-right: 10px; font-weight: bold; }

/*--------------------------------------------------------*/
/* Скроллбары и утилиты                                   */
/*--------------------------------------------------------*/
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

::selection { background: var(--primary); color: #fff; }

.w25 {width: 25%;} .w30 {width: 30%;} .w50 {width: 50%;} .w70 {width: 70%;} .w75 {width: 75%;}
.op50 {opacity: 0.5; }
.fleft {float:left;} .fright {float: right;}
.text-center {text-align: center;}
.clear {clear: both;}



/*--------------------------------------------------------*/
/* БЕЗОПАСНЫЙ МОБИЛЬНЫЙ ПАКЕТ ДЛЯ СМАРТФОНОВ              */
/*--------------------------------------------------------*/
@media screen and (max-width: 768px) {
    
    #logo_image img, #footer img, .footer-logo { 
        display: none !important; 
    }

    #logo, #logo_block, #logo_block_content {
        display: block !important;    
        height: auto !important;      
        min-height: 0 !important;
        max-height: none !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #logo_block {
        padding: 15px 10px !important; 
        box-sizing: border-box !important;
    }

    #logo_block p {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        font-size: 14px !important;    
        line-height: 1.4 !important;
        white-space: normal !important; 
        word-wrap: break-word !important;
        word-break: break-word !important;
        margin: 0 0 10px 0 !important;
        width: 100% !important;
        text-align: center !important; 
    }

    #header {
        height: auto !important;
        min-height: 50px !important;
    }

    #region_2_default, .excerpt_content, .post_content {
        width: 100% !important;
        float: none !important;
        clear: both !important; /* Принудительно сбрасываем боковое обтекание */
    }

    /* 
       ФИКС ПЕРЕКРЫТИЯ КНОПОК РАСКРЫТИЯ НА ТЕЛЕФОНАХ:
       Изолируем контейнеры спойлеров, убираем ложные наложения 
       и выводим саму ссылку .show-hide на передний план для кликов пальцем.
    */
    .entry_spoiler {
        width: 100% !important;
        clear: both !important;
        display: block !important;
        position: relative !important;
    }
    
    .spoiler {
        width: 100% !important;
        clear: both !important;
    }

    .show-hide {
        position: relative !important;
        z-index: 100 !important; /* Выводим кнопку из-под невидимых наложений */
        display: inline-block !important;
        padding: 8px 12px !important; /* Увеличиваем область тапа для пальца */
        cursor: pointer !important;
    }

    #region_2_default *, .excerpt_content *, .post_content * {
        white-space: normal !important;
        word-break: break-word !important;
    }

    .excerpt_preview {
        float: left !important;
        width: 80px !important; 
        margin-right: 15px !important;
    }
    .excerpt_preview img {
        width: 100% !important;
        height: auto !important;
    }

    .wrapper {
        padding: 0 10px !important;
    }

    #body {
        display: block !important; 
    }

    #aside {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-top: 20px;
    }

    /* Мобильная навигация для старого меню */
    #h_menu { line-height: 3em !important; }
    #h_menu li { display: block !important; width: 100% !important; text-align: left !important; border-bottom: 1px solid rgba(255,255,255,0.1); }
    #h_menu .level_0 ul { position: static !important; width: 100% !important; display: none !important; transform: none !important; }
    #h_menu .level_1 li { padding-left: 20px !important; }
    
    /* Форсируем показ подменю при клике на телефоне через JS класс */
    #h_menu li.js-opened > ul {
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
    }

    /* Адаптация Вкладок и форм */
    .ui-tabs-nav li, .ui-tabs-nav li a, .ajax__tab_default .ajax__tab_tab {
        display: block !important; width: 100% !important; margin-bottom: 2px !important; text-align: center !important;
    }
    .form_structure li { float: none !important; }
    .form_structure .info_field, .form_structure .input_field { width: 100% !important; float: none !important; padding: 0 !important; }

    .w25, .w30, .w50, .w70, .w75 { width: 100% !important; float: none !important; }
    #footer_line .wrapper { flex-direction: column !important; gap: 10px; text-align: center; }
}

/* Полное удаление системного квадрата/иконки на самой верхней строке */
#top_bar *::before, 
#top_bar *::after, 
#font_size_changer a::before, 
#font_size_changer span::before,
.js-blind-panel::before {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}



/* ============================================================ */
/* ВОССТАНОВЛЕНИЕ КОМПАКТНОГО РАЗМЕРА СЛАЙДЕРА (КАРУСЕЛИ)       */
/* ============================================================ */

/* Возвращаем карусели жесткие ограничения по высоте на ПК */
#carousel-default {
    width: 97% !important;
    margin: 0 auto !important;
    height: 60px !important; /* Наша жесткая оригинальная высота подвала-линии */
    overflow: hidden !important; /* Прячем все, что вылезает за пределы */
    display: block !important;
}

/* Ограничиваем высоту оберток картинок внутри карусели */
#carousel-default .slick-track,
#carousel-default .owl-stage-outer,
#carousel-default .caroufredsel_wrapper,
#carousel-default > div {
    height: 60px !important;
}

/* 
   Форсируем для картинок-баннеров оригинальный узкий размер,
   чтобы они не растягивались во всю ширину и не ломали высоту подвала
*/
#carousel-default img,
#carousel-default a img {
    width: auto !important;      /* Картинка сохраняет свою родную ширину */
    height: 50px !important;     /* Жесткая узкая высота для всех баннеров (с зазором) */
    max-height: 50px !important; 
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 5px 10px !important; /* Аккуратные отступы между баннерами */
}

/*--------------------------------------------------------*/
/* Адаптация карусели для мобильных телефонов             */
/*--------------------------------------------------------*/
@media screen and (max-width: 768px) {
    #carousel-default {
        height: auto !important; /* На телефонах разрешаем карусели занять чуть больше места */
        text-align: center !important;
    }
    
    #carousel-default img,
    #carousel-default a img {
        height: 40px !important; /* На смартфонах делаем баннеры еще чуть компактнее */
        max-height: 40px !important;
        margin: 5px !important;
    }
}

