========================================================= */
body.dark-mode,
html.dark-mode,
html.dark-mode body {
background: #000000 !important;
background-color: #000000 !important;
color: #f0f0f0 !important;
}

/* АГРЕССИВНЫЙ ФИКС ДЛЯ МОБИЛЬНЫХ - ЧЕРНЫЙ ФОН ВЕЗДЕ */
@media (max-width: 768px) {
body.dark-mode,
html.dark-mode,
html.dark-mode body {
background: #000000 !important;
background-color: #000000 !important;
}

/* Убираем фоны у основных контейнеров (НО НЕ У ВСЕХ * !) */
body.dark-mode .content_section,
html.dark-mode .content_section,
body.dark-mode .container,
html.dark-mode .container,
body.dark-mode .row,
html.dark-mode .row,
body.dark-mode .content,
html.dark-mode .content,
body.dark-mode .content_rubric,
html.dark-mode .content_rubric,
body.dark-mode .sidebar,
html.dark-mode .sidebar,
body.dark-mode .header_top,
html.dark-mode .header_top,
body.dark-mode .header_section,
html.dark-mode .header_section,
body.dark-mode .description,
html.dark-mode .description,
body.dark-mode .article_header,
html.dark-mode .article_header {
background: transparent !important;
background-color: transparent !important;
}

body.dark-mode .content_section.container,
html.dark-mode .content_section.container,
body.dark-mode .row,
html.dark-mode .row {
border: none !important;
box-shadow: none !important;
margin: 0 !important;
}
}

/* Заголовки в темном режиме */
body.dark-mode .main-title,
html.dark-mode .main-title,
body.dark-mode .article-title,
html.dark-mode .article-title,
body.dark-mode h1,
html.dark-mode h1,
body.dark-mode h2,
html.dark-mode h2,
body.dark-mode h3,
html.dark-mode h3,
body.dark-mode h4,
html.dark-mode h4,
body.dark-mode h5,
html.dark-mode h5,
body.dark-mode h6,
html.dark-mode h6 {
color: #f0f0f0 !important;
}

body.dark-mode .wave-title,
html.dark-mode .wave-title {
background: linear-gradient(45deg, #4dabf7, #2196f3) !important;
-webkit-background-clip: text !important;
background-clip: text !important;
-webkit-text-fill-color: transparent !important;
}

body.dark-mode .title-underline,
html.dark-mode .title-underline {
background: linear-gradient(to right, #4dabf7, #2196f3) !important;
}

/* Ссылки в темном режиме */
body.dark-mode a,
html.dark-mode a { color: #4dabf7 !important; }
body.dark-mode a:hover,
html.dark-mode a:hover { color: #64b5f6 !important; }

/* Формы в темном режиме */
body.dark-mode input,
html.dark-mode input,
body.dark-mode textarea,
html.dark-mode textarea,
body.dark-mode select,
html.dark-mode select {
background-color: #2a2a2a !important;
color: #f0f0f0 !important;
border-color: #444 !important;
}

/* УБИРАЕМ БЕЛЫЙ ФОН У КОНТЕЙНЕРОВ (точечно) */
html.dark-mode .container,
body.dark-mode .container,
html.dark-mode .row,
body.dark-mode .row,
html.dark-mode .content,
body.dark-mode .content,
html.dark-mode .content_rubric,
body.dark-mode .content_rubric,
html.dark-mode .sidebar,
body.dark-mode .sidebar,
html.dark-mode section,
body.dark-mode section,
html.dark-mode div:not(.theme-toggle):not(.btn-hamburger):not(.wrapper) {
background: transparent !important;
background-color: transparent !important;
}

/* =========================================================
ФИКС БАННЕРА/ФОТО - БЕЗ ИЗМЕНЕНИЙ
========================================================= */
.tvbox, .tvbox_article, .tvbox_article_test, .tvbox_rubric{ background: transparent !important; }

.tvbox::before, .tvbox::after,
.tvbox_article::before, .tvbox_article::after,
.tvbox_article_test::before, .tvbox_article_test::after,
.tvbox_rubric::before, .tvbox_rubric::after{
opacity: 0 !important;
background: transparent !important;
box-shadow: none !important;
filter: none !important;
pointer-events: none !important;
}
.tvbox .wrapper{
position: relative;
overflow: hidden;
border-radius: 26px;
display: block;
width: 100%;
background-position: center center !important;
background-repeat: no-repeat !important;
background-size: cover !important;
}
.tvbox .wrapper::after{
content:"";
position:absolute;
inset:0;
pointer-events:none;
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 58%, rgba(0,0,0,0.22) 100%);
}
body.dark-mode .tvbox .wrapper::after,
html.dark-mode .tvbox .wrapper::after{
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.45) 100%);
}
body.dark-mode .tvbox .wrapper,
html.dark-mode .tvbox .wrapper{
filter: brightness(0.92) saturate(1.05) contrast(1.05) !important;
}

/* Плавные переходы */
body.dark-mode *,
html.dark-mode * {
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* =========================================================
✅ ИСПРАВЛЕНИЕ (ГЛАВНОЕ): названия экскурсий на карточках — ЧЁРНЫЕ в dark
(УБРАЛИ конфликтующие белые правила, оставили только одно итоговое)
========================================================= */
body.dark-mode .catItemTitle a,
body.dark-mode .itemTitle a,
body.dark-mode .moduleItemTitle a,
body.dark-mode .latestItemTitle a,
html.dark-mode .catItemTitle a,
html.dark-mode .itemTitle a,
html.dark-mode .moduleItemTitle a,
html.dark-mode .latestItemTitle a{
color: #0b0b0b !important;
text-shadow: none !important;
background: rgba(255,255,255,0.85) !important;
background-color: rgba(255,255,255,0.85) !important;
padding: 7px 11px !important;
border-radius: 12px !important;
display: inline-block !important;
box-shadow: 0 10px 26px rgba(0,0,0,0.45) !important;
}

body.dark-mode .catItemTitle a:hover,
body.dark-mode .itemTitle a:hover,
body.dark-mode .moduleItemTitle a:hover,
body.dark-mode .latestItemTitle a:hover,
html.dark-mode .catItemTitle a:hover,
html.dark-mode .itemTitle a:hover,
html.dark-mode .moduleItemTitle a:hover,
html.dark-mode .latestItemTitle a:hover{
background: rgba(255,255,255,0.95) !important;
background-color: rgba(255,255,255,0.95) !important;
color: #000 !important;
}

/* Текст внутри K2 (оставляем белым и читабельным) */
body.dark-mode .content_section,
body.dark-mode .content_section .content,
html.dark-mode .content_section,
html.dark-mode .content_section .content{
color: #eaeaea !important;
opacity: 1 !important;
filter: none !important;
}
body.dark-mode .itemFullText,
body.dark-mode .itemIntroText,
body.dark-mode .itemFullText *,
body.dark-mode .itemIntroText *,
body.dark-mode .elpiadis-tour,
body.dark-mode .elpiadis-tour *,
body.dark-mode .full_text,
body.dark-mode .full_text *,
html.dark-mode .itemFullText,
html.dark-mode .itemIntroText,
html.dark-mode .itemFullText *,
html.dark-mode .itemIntroText *,
html.dark-mode .elpiadis-tour,
html.dark-mode .elpiadis-tour *,
html.dark-mode .full_text,
html.dark-mode .full_text *{
color: #eaeaea !important;
opacity: 1 !important;
filter: none !important;
}
body.dark-mode hr,
html.dark-mode hr{
border-color: rgba(255,255,255,0.14) !important;
}
