﻿
/* === БЕЗОПАСНАЯ КОСМЕТИКА БЕЗ СМЕЩЕНИЯ ВЕРСТКИ === */

/* 1. Цвет фона и шрифты */
body, html, #all, #container, #content, #box, #right, .sidebar, .right-block, table, tr, td {
    background-image: none !important;
    background-color: #fdfbf7 !important; /* Цвет пергамента */
    font-family: "Georgia", "Times New Roman", serif !important;
}

/* 2. Заголовки и ссылки (естественный регистр, имена и фамилии с заглавной буквы) */
h1, h2, h3, h4, .ntitle, .custom-title, .blok-link a, a {
    text-transform: none !important;
    text-decoration: none !important;
    color: #7a1d1d !important;
}
a:hover { color: #cba052 !important; }

.text, .story, .c1view, .c1com, p, div {
    font-family: "Georgia", "Times New Roman", serif;
    color: #333333;
}

/* 3. Убираем льва, поиск и телеграм */
.blockpul, .searchblock, #right a[href*="t.me"], #right a[href*="bastyon"], img[src*="orelsmall"] {
    display: none !important;
}

/* 4. Заменяем пули на крестики */
img[src*="pulasmall"], img[src*="pula6"] {
    display: none !important;
}
.blok-data:before {
    content: "☦ " !important;
    color: #cba052 !important;
    font-size: 16px !important;
    margin-right: 5px !important;
}

/* 5. Обновленная шапка с картинкой (Base64) */
#above {
    background-image: url('../images/header_kremlin_gen_75.jpg') !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 4 / 1 !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-bottom: 4px solid #cba052 !important;
    overflow: hidden !important;
}
#above .vetka {
    display: none !important;
}

/* Текст слева скрыт, кликабельная область на всю шапку (SEO h1 сохранен) */
.header-h1-wrap {
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 5 !important;
    display: block !important;
}

.header-title-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

/* 6. Меню */
.nav3 {
    background: #7a1d1d !important;
}
.nav3 a {
    color: #ffffff !important;
}
.nav3 a:hover {
    color: #cba052 !important;
}

/* 7. Очистка старых теней */
#all { box-shadow: none !important; border: none !important; }

/* === НОВЫЙ ДИЗАЙН "ВОЗДУШНЫХ КАРТОЧЕК" (БЕЗОПАСНЫЙ) === */
.custom-1, .custom-2, .custom-3, .custom-5, .base, .sidebar-box {
    background-color: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
    
    /* БЕЗОПАСНЫЕ ОТСТУПЫ */
    padding: 15px !important;
    margin-bottom: 25px !important;
    box-sizing: border-box !important;
    
    /* ЗАЩИТА ФЛОАТОВ */
    overflow: hidden !important; /* не дает вылезти картинкам */
    width: auto !important;
}

/* Очищаем старые рамки и фоны внутри карточек */
.c1view, .c1com, .blok-data, .white-bottom {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Красивые картинки */
.c1view img, .blok-data img {
    border-radius: 6px !important;
    max-width: 100% !important;
    height: auto !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* Воздушность текста */
.story, .text, .c1view {
    line-height: 1.6 !important;
    color: #444 !important;
}

/* Меню */
.nav3 {
    background: linear-gradient(to bottom, #7a1d1d, #5e1515) !important;
    border-radius: 8px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}
.nav3 a {
    color: #ffffff !important;
    font-weight: 600 !important;
}
.nav3 a:hover {
    color: #cba052 !important;
    background: rgba(0,0,0,0.1) !important;
}


/* === ПРАВКИ: КАРТИНКА СЛЕВА, ТЕКСТ СПРАВА, ЗАГЛАВНАЯ БУКВА === */
/* Теперь в HTML картинка идет перед заголовком, так что float сработает идеально */
.custom-1 > div > a img, .custom-2 > div > a img {
    float: left !important;
    margin-right: 15px !important;
    margin-bottom: 5px !important;
    width: 170px !important;  /* увеличено */
    height: 115px !important; /* пропорциональная высота */
    object-fit: cover !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

/* Название статьи (естественный регистр, имена и фамилии с заглавной буквы) */
.custom-1 > div > a span, .custom-2 > div > a span {
    display: block !important;
    text-transform: none !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    color: #156220 !important; /* Глубокий зеленый, как просили/на скрине */
}

/* Очистка флоата после карточки */
.custom-1:after, .custom-2:after {
    content: "";
    display: table;
    clear: both;
}

/* Отменяем Flexbox, если он был добавлен в предыдущих шагах */
.custom-1 > div > a, .custom-2 > div > a {
    display: block !important;
}


/* === ПРАВКИ: НИЖНИЙ ОТСТУП ДЛЯ КАТЕГОРИЙ === */
.white-bottom, .blok-link {
    margin-right: 5px !important;
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
    display: block !important;
    clear: both !important;
}


/* === ПРАВКИ: ПРАВАЯ КОЛОНКА (ТАБЫ И КАРТОЧКИ) === */
#right .htitle {
    display: flex !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    background: transparent !important;
    margin-bottom: 15px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    border: none !important;
    height: 38px !important;
    padding: 0 !important;
}
#right .htitle span {
    flex: 1 1 0% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0 4px !important;
    background: #7a1d1d !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-right: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    height: 38px !important;
    box-sizing: border-box !important;
    float: none !important;
}
#right .htitle span:last-child {
    border-right: none !important;
}
#right .htitle span.active-ttab,
#right .htitle span.current,
#right .htitle span.active,
#right .htitle span:hover {
    background: #cba052 !important;
    color: #ffffff !important;
}

/* Карточки в правой колонке */
#right .custom-1, #right .custom-2, #right .custom-3, #right .custom-5 {
    padding: 12px !important;
    margin-bottom: 15px !important;
    font-size: 13px !important; /* Уменьшаем шрифт текста */
}

/* Картинки в правой колонке */
#right .custom-1 img, #right .custom-2 img, #right .custom-3 img, #right .custom-5 img {
    float: left !important;
    width: 90px !important;
    height: 65px !important;
    margin-right: 10px !important;
    margin-bottom: 5px !important;
}

/* Заголовки в правой колонке */
#right .custom-1 span, #right .custom-2 span, #right .custom-3 span, #right .custom-5 span {
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin-bottom: 5px !important;
}

/* Ссылки категорий (breadcrumbs) в правой колонке */
#right .blok-link {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin-top: 5px !important;
}


/* === ПРАВКИ: РАЗНОЕ И ОБРЕЗАННЫЕ ЗАГОЛОВКИ === */
.custom-title {
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    display: block !important;
    white-space: normal !important;
}

/* Приводим стили РАЗНОЕ (.custom-5) в порядок */
.custom-5 {
    position: relative;
}

.custom-5 > a {
    display: block !important;
    overflow: hidden !important; /* чтобы a охватывал float img */
}

/* Очистка флоатов, чтобы дата (.c1cat) падала вниз ровно, или наоборот обтекала */
.custom-5 .c1cat {
    clear: both !important;
    margin-top: 10px !important;
    font-size: 12px !important;
    color: #888 !important;
}

/* Настраиваем саму картинку и заголовок */
.custom-5 img {
    float: left !important;
    margin-right: 15px !important;
    margin-bottom: 5px !important;
    width: 140px !important;
    height: 95px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
}

.custom-5 .custom-title {
    font-size: 17px !important;
    font-weight: bold !important;
    color: #7a1d1d !important;
    line-height: 1.3 !important;
    margin-bottom: 5px !important;
}

.custom-5 .custom-title {
    text-transform: none !important;
}


/* === ПРАВКИ: БЛОКИ ПОЛИТИКА И ПРАВОСЛАВИЕ (КАРТИНКА СЛЕВА, ТЕКСТ ПОД ЗАГОЛОВКОМ СПРАВА) === */
.block3, .block4 {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
    margin-bottom: 25px !important;
}

/* Заголовок блока и очистка на всю ширину */
.block3 .b3header, .block3 .clear,
.block4 .b4header, .block4 .clear {
    grid-column: 1 / -1 !important;
}

/* Сами карточки: горизонтальный flex (картинка слева, заголовок и описание справа) */
.block3 .custom-3,
.block4 .custom-2 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 15px !important;
    background-color: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
    padding: 15px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Картинка-превью слева */
.block3 .custom-3 .card-thumb,
.block4 .custom-2 .card-thumb {
    display: block !important;
    flex-shrink: 0 !important;
    line-height: 0 !important;
}

.block3 .custom-3 .card-thumb img,
.block3 .custom-3 img {
    width: 110px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.block4 .custom-2 .card-thumb img,
.block4 .custom-2 img {
    width: 110px !important;
    height: 95px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

/* Правая колонка: Заголовок сверху, текст описания снизу */
.block3 .custom-3 .card-body,
.block4 .custom-2 .card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.block3 .custom-3 .card-title-link,
.block4 .custom-2 .card-title-link {
    display: block !important;
    text-decoration: none !important;
}

.block3 .custom-3 span,
.block3 .custom-3 .card-title-link span {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #7a1d1d !important;
    line-height: 1.3 !important;
}

.block4 .custom-2 span,
.block4 .custom-2 .card-title-link span {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #156220 !important;
    line-height: 1.3 !important;
}

.block3 .custom-3 span,
.block4 .custom-2 span {
    text-transform: none !important;
}

/* Текст описания строго под заголовком */
.block3 .custom-3 .card-desc,
.block4 .custom-2 .card-desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #444444 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* === ПРАВКИ: УНИВЕРСАЛЬНЫЙ ДИЗАЙН ЗАГОЛОВКОВ === */
div[class^="b"][class$="header"], .redheader, .dpad {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Все заголовки блоков: чистый flex-контейнер, авто-высота, чёткая нижняя золотисто-бежевая линия */
div[class^="b"][class$="header"], .redheader, .dpad {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: normal !important;
    padding: 0 0 8px 0 !important;
    margin: 15px 0 15px 0 !important;
    border: none !important;
    border-bottom: 2px solid #e0d8c3 !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Золотистая восьмиконечная звезда ✵ строго перед текстом */
div[class^="b"][class$="header"]::before, .redheader::before, .dpad::before {
    content: "✵" !important; 
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #cba052 !important; 
    font-size: 22px !important;
    font-weight: normal !important;
    line-height: 1 !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
    padding: 0 !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    flex-shrink: 0 !important;
}

/* Ссылка заголовка */
div[class^="b"][class$="header"] a, 
.redheader a, 
.dpad a,
div[class^="b"][class$="header"] span, 
.redheader span {
    display: inline-block !important;
    color: #7a1d1d !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    text-shadow: none !important;
    line-height: 1.25 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

div[class^="b"][class$="header"] a:hover, 
.redheader a:hover, 
.dpad a:hover {
    color: #cba052 !important;
    text-decoration: none !important;
}


/* === ПРАВКИ: ХЛЕБНЫЕ КРОШКИ И КАТЕГОРИИ === */
/* Отменяем display: block для ссылок внутри категорий (которые случайно зацепило предыдущим правилом) */
.c1cat a, .blok-link a, .custom-fav a {
    display: inline !important;
}

/* Очищаем флоаты для ВСЕХ блоков категорий, чтобы они не наезжали на текст или картинку */
.c1cat, .blok-link, .white-bottom {
    clear: both !important;
    display: block !important;
    padding-top: 5px !important;
    margin-top: 5px !important;
    position: relative !important;
    z-index: 10 !important;
}


/* === ПРАВКИ: ФИКС ШИРИНЫ КРОШЕК === */
.c1cat, .blok-link, .white-bottom {
    clear: both !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    text-align: left !important;
    padding-top: 5px !important;
    margin-top: 5px !important;
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
}

.c1cat a, .blok-link a, .custom-fav a {
    display: inline !important;
    float: none !important;
    white-space: normal !important;
}


/* === ПРАВКИ: ПОЛНЫЙ ПРИОРИТЕТ ДЛЯ ССЫЛОК КРОШЕК === */
.custom-1 div.c1cat a, .custom-2 div.c1cat a, .custom-3 div.c1cat a, .custom-5 div.c1cat a,
.custom-1 div.blok-link a, .custom-2 div.blok-link a, .custom-3 div.blok-link a, .custom-5 div.blok-link a,
.custom-fav a {
    display: inline !important;
    float: none !important;
    white-space: normal !important;
}

/* Также убедимся что сами блоки шириной 100% */
.custom-1 div.c1cat, .custom-2 div.c1cat, .custom-3 div.c1cat, .custom-5 div.c1cat,
.custom-1 div.blok-link, .custom-2 div.blok-link, .custom-3 div.blok-link, .custom-5 div.blok-link,
.white-bottom {
    clear: both !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    text-align: left !important;
}


/* === ПРАВКИ: ВЫРАВНИВАНИЕ КРОШЕК ВПРАВО === */
.custom-1 div.c1cat, .custom-2 div.c1cat, .custom-3 div.c1cat, .custom-5 div.c1cat,
.custom-1 div.blok-link, .custom-2 div.blok-link, .custom-3 div.blok-link, .custom-5 div.blok-link,
.white-bottom {
    text-align: right !important;
}


/* === ПРАВКИ: ЗАМЕНА ШРИФТА RUSLAN DISPLAY НА PHILOSOPHER === */
/* Применяем красивый строгий православный шрифт к меню и всем заголовкам блоков */
.nav3 li a,
div[class^="b"][class$="header"], div[class^="b"][class$="header"] a,
.redheader, .redheader a, .dpad, .dpad a {
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Для меню чуть поправим размер, так как новый шрифт более утонченный */
.nav3 li a {
    font-size: 15px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* Для заголовков блоков (ИЗБРАННОЕ, и т.д.) */
div[class^="b"][class$="header"] a, .redheader a {
    font-size: 18px !important; 
    letter-spacing: 1px !important;
}


/* === ПРАВКИ: АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 1024px) {
    /* Сбрасываем жесткую ширину основных контейнеров */

    /* Убираем жесткую ширину у всех блоков, чтобы они занимали 100% экрана */
    .block1, .block2, .block3, .block4, .block5, .block6 {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Скрываем блок вкладок (ПОПУЛЯРНОЕ / ВЧЕРА / ОБСУЖДАЮТ) и блок «РАЗНОЕ» на мобильных устройствах */
    .fulltabs,
    .mobile-hidden-tabs,
    .block1:has(.fulltabs),
    .mobile-hidden-raznoe,
    .block1:has(.redheader) {
        display: none !important;
    }
    
    /* Убираем фоновую картинку #all, которая рассчитана на десктоп */
    #all {
        background: #fdfaf4 !important;
    }



    /* Глобально применяем border-box на мобильных, чтобы padding не ломал ширину 100% и блоки не съезжали вправо */
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    
    /* Убираем лишние внутренние отступы у колонок, чтобы карточки были по центру */
    #left, #right {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Жестко запрещаем горизонтальную прокрутку и зум-аут из-за вылезающих элементов */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    img, iframe, table, td, div {
        max-width: 100% !important;
    }

    body, #all, #container, #content, #box, .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    /* Колонки делаем на всю ширину и убираем обтекание */
    #left, #right, .right, .left, .center, table, tbody, tr, td, #dle-content {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Изображение в шапке (Кремль) должно сжиматься пропорционально */
    .header, #header {
        background-size: cover !important;
        background-position: center !important;
        height: auto !important;
        min-height: 200px !important;
    }

    /* Блок "Политика", который мы сделали в 2 колонки, на мобильном делаем в 1 колонку */
    .block3 {
        grid-template-columns: 1fr !important;
    }

    /* Отступы внутри карточек делаем чуть меньше на мобильных */
    .custom-1, .custom-2, .custom-3, .custom-5 {
        padding: 10px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        width: calc(100% - 20px) !important;
    }

    /* Картинки внутри новостей: разрешаем им сужаться */
    .custom-1 img, .custom-2 img, .custom-3 img, .custom-5 img {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 600px) {
    /* На совсем узких экранах отменяем обтекание картинки текстом */
    .custom-1 img, .custom-2 img, .custom-3 img {
        float: none !important;
        display: block !important;
        margin: 0 auto 10px auto !important;
        width: 100% !important;
        height: auto !important;
    }

    .custom-5 img {
        /* Для мелких превьюшек в "Разное" и правой колонке можно оставить обтекание, они маленькие */
    }

    /* Выравниваем заголовки по центру */
    .custom-title, .custom-1 span, .custom-2 span, .custom-3 span {
        text-align: center !important;
    }
    
    /* Хлебные крошки тоже по центру на мелких экранах */
    .custom-1 div.c1cat, .custom-2 div.c1cat, .custom-3 div.c1cat, .custom-5 div.c1cat,
    .custom-1 div.blok-link, .custom-2 div.blok-link, .custom-3 div.blok-link, .custom-5 div.blok-link,
    .white-bottom {
        text-align: center !important;
    }
}


/* === ПРАВКИ: ИДЕАЛЬНОЕ ВЫПАДАЮЩЕЕ МЕНЮ === */
.nav3 {
    position: relative !important;
    z-index: 100 !important;
}
.nav3 > ul {
    display: flex !important;
    flex-wrap: wrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}



/* Скрываем подменю по умолчанию и позиционируем абсолютно */
.nav3 ul ul {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 999 !important;
    background-color: #3b0a0a !important;
    min-width: 220px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #541010 !important;
    border-top: 2px solid #ffd27a !important;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.55) !important;
}

/* Показываем при наведении */
.nav3 li:hover > ul {
    display: block !important;
}

/* Третий уровень (если есть) выпадает вправо */
.nav3 ul ul ul {
    top: 0 !important;
    left: 100% !important;
    background-color: #2b0707 !important;
}

/* Дизайн пунктов подменю */
.nav3 ul ul li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    background: none !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(203, 160, 82, 0.18) !important;
}
.nav3 ul ul li:last-child {
    border-bottom: none !important;
}

/* Дизайн ссылок в подменю */
.nav3 ul ul li a {
    display: block !important;
    padding: 10px 15px !important;
    color: #ffffff !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 15px !important;
    font-weight: normal !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: none !important;
    text-align: left !important;
    text-decoration: none !important;
    background: transparent !important;
    transition: background 0.2s, color 0.2s !important;
}
.nav3 ul ul li a:hover {
    background-color: #5c1212 !important;
    color: #ffd27a !important;
}

/* Прячем старые пунктирные картинки-разделители, так как теперь есть красивые полоски border-bottom */
.nav3 ul ul li img {
    display: none !important;
}



/* === ПРАВКИ: БУРГЕР-МЕНЮ ДЛЯ МОБИЛЬНЫХ (ВЫДВИЖНОЕ) === */
#mobile-menu-btn {
    display: none;
    background: linear-gradient(to bottom, #7a1d1d, #5e1515);
    color: #ffd27a;
    padding: 13px 20px;
    text-align: center;
    font-family: 'Philosopher', 'Georgia', serif;
    font-size: 19px;
    font-weight: bold;
    cursor: pointer;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 2px solid #cba052;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
#mobile-menu-btn:hover {
    background: linear-gradient(to bottom, #8a2121, #6a1818);
    color: #ffffff;
}
#mobile-menu-btn .burger-icon {
    font-size: 22px;
    vertical-align: middle;
    margin-right: 8px;
}
#mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
}

#mobile-close-btn {
    display: none;
}

@media (max-width: 1024px) {
    .nav3 {
        background: none !important;
        border: none !important;
        position: static !important;
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
    }
    
    #right {
        padding-top: 4px !important;
    }
    
    .block300, .blockpul {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    #mobile-menu-btn { display: block !important; }
    
    .nav3 li.drawer-header,
    .drawer-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 14px 20px !important;
        color: #ffd27a !important;
        font-size: 20px !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-weight: bold !important;
        background: linear-gradient(to bottom, #7a1d1d, #521212) !important;
        border: none !important;
        border-bottom: 2px solid #cba052 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        box-sizing: border-box !important;
    }
    .drawer-header span:first-child {
        color: #ffd27a !important;
        font-size: 20px !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-weight: bold !important;
        letter-spacing: 1.5px !important;
    }
    .drawer-close {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 22px !important;
        color: #ffd27a !important;
        cursor: pointer !important;
        padding: 4px 8px !important;
        line-height: 1 !important;
        transition: color 0.2s ease, transform 0.2s ease !important;
    }
    .drawer-close:hover {
        color: #ffffff !important;
        transform: scale(1.15);
    }
    
    #mobile-close-btn {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding: 12px 20px !important;
        color: #ffd27a !important;
        font-size: 24px !important;
        cursor: pointer !important;
        background: #521212 !important;
        border-bottom: 1px solid rgba(203, 160, 82, 0.3) !important;
    }
    
    /* Основная шторка */
    .nav3 > ul {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important; /* Скрыто справа */
        width: 85% !important;
        max-width: 360px !important;
        height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #2b0707 !important; /* Благородный темно-бордовый */
        display: block !important;
        z-index: 9999 !important;
        transition: right 0.3s ease-in-out !important;
        box-shadow: -5px 0 25px rgba(0,0,0,0.65) !important;
        border-left: 2px solid #cba052 !important;
        box-sizing: border-box !important;
    }
    
    .nav3 > ul.open {
        right: 0 !important;
    }
    #mobile-overlay.open {
        display: block;
    }
    
    /* Общие стили для пунктов */
    .nav3 li, .nav3 li a {
        position: static !important;
        z-index: auto !important;
        transform: none !important;
    }

    .nav3 li:not(.drawer-header):not(.submenu-header):not(.back-btn) {
        display: block !important;
        width: 100% !important;
        float: none !important;
        height: auto !important;
        background: transparent !important;
        background-image: none !important;
        border: none !important;
        border-bottom: 1px solid rgba(203, 160, 82, 0.15) !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .nav3 li:not(.drawer-header):not(.submenu-header):not(.back-btn):hover,
    .nav3 li:not(.drawer-header):not(.submenu-header):not(.back-btn):active,
    .nav3 li.active-sub {
        background: #4a0f0f !important;
        background-image: none !important;
    }
    
    .nav3 li a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        color: #fffdfa !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border: none !important;
        background: transparent !important;
        background-image: none !important;
        transition: background 0.2s, color 0.2s !important;
    }
    .nav3 li a:hover,
    .nav3 li a:active,
    .nav3 li.active-sub > a {
        background: #4a0f0f !important;
        background-image: none !important;
        color: #ffd27a !important;
    }
    
    /* Добавляем золотую стрелочку "►" к пунктам с подменю */
    .nav3 li.drop > a::after {
        content: "►";
        font-size: 13px;
        color: #ffd27a;
        margin-left: 10px;
    }
    
    /* ПОДМЕНЮ (ВЫДВИГАЮТСЯ СБОКУ) */
    .nav3 ul ul {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important; /* Прячем за правым краем */
        left: auto !important;
        width: 85% !important;
        max-width: 380px !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background-color: #200404 !important; /* Еще более глубокий бордовый */
        display: block !important;
        z-index: 10000 !important;
        transition: right 0.3s ease-in-out !important;
        box-shadow: -5px 0 25px rgba(0,0,0,0.7) !important;
        border-left: 2px solid #ffd27a !important;
        border-top: none !important;
        border-bottom: none !important;
        border-right: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Третий уровень тоже выезжает поверх */
    .nav3 ul ul ul {
        z-index: 10001 !important;
        background-color: #170202 !important;
    }
    
    /* Класс для активного подменю - выезжает на место основной шторки */
    .nav3 ul ul.active-sub,
    .nav3 li.active-sub > ul {
        display: block !important;
        right: 0 !important;
        left: auto !important;
    }
    
    /* Заголовок подменю */
    .nav3 li.submenu-header,
    .submenu-header {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px 20px !important;
        color: #ffd27a !important;
        font-weight: bold !important;
        font-size: 19px !important;
        background: linear-gradient(to bottom, #6a1818, #4a0f0f) !important;
        border: none !important;
        border-bottom: 2px solid #cba052 !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        box-sizing: border-box !important;
    }
    
    /* Кнопка "Назад" */
    .nav3 li.back-btn,
    .back-btn {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        background-color: #3b0a0a !important;
        color: #ffd27a !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-weight: 700 !important;
        font-size: 15px !important;
        cursor: pointer !important;
        border: none !important;
        border-bottom: 1px solid rgba(203, 160, 82, 0.25) !important;
        padding: 13px 20px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        box-sizing: border-box !important;
        transition: background 0.2s !important;
    }
    .nav3 li.back-btn:hover,
    .back-btn:hover {
        background-color: #5c1212 !important;
        color: #ffffff !important;
    }
    .back-btn::before {
        content: "◄";
        margin-right: 10px;
        font-size: 13px;
        color: #ffd27a !important;
    }
    
    /* Пункты подменю на мобильных */
    .nav3 ul ul li {
        display: block !important;
        width: 100% !important;
        float: none !important;
        height: auto !important;
        background: transparent !important;
        background-image: none !important;
        border: none !important;
        border-bottom: 1px solid rgba(203, 160, 82, 0.12) !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .nav3 ul ul li:hover,
    .nav3 ul ul li:active {
        background: #380707 !important;
        background-image: none !important;
    }
    .nav3 ul ul li a {
        display: block !important;
        padding: 13px 20px !important;
        font-size: 15px !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        color: #fffdfa !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border: none !important;
        background: transparent !important;
        background-image: none !important;
        transition: background 0.2s, color 0.2s !important;
    }
    .nav3 ul ul li a:hover,
    .nav3 ul ul li a:active {
        background: #380707 !important;
        background-image: none !important;
        color: #ffd27a !important;
    }
    
    /* Отключаем десктопный hover на мобильных, но не ломаем active-sub */
    .nav3 li:hover > ul { display: none !important; }
    .nav3 li.active-sub > ul,
    .nav3 ul ul.active-sub {
        display: block !important;
        right: 0 !important;
        left: auto !important;
    }
}


/* === ПРАВКИ: ФИКС ТЕКСТА И ЗАГОЛОВКОВ НА МОБИЛЬНЫХ === */
div[class^="b"][class$="header"], .redheader, .dpad {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
}
div[class^="b"][class$="header"]::before, .redheader::before, .dpad::before {
    margin-right: 10px !important;
    display: inline-flex !important;
    flex-shrink: 0 !important;
}
div[class^="b"][class$="header"] a, .redheader a, .dpad a {
    display: inline-block !important;
    word-break: break-word !important;
}

@media (max-width: 1024px) {
    .block1, .block2, .block3, .block4, .block5 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 600px) {
    /* Отключаем выравнивание по ширине (justify), которое создает огромные дыры между словами */
    .custom-1, .custom-2, .custom-3, .custom-5,
    .custom-1 div, .custom-2 div, .custom-3 div, .custom-5 div {
        text-align: left !important;
        text-justify: auto !important;
    }

    /* Делаем отступы карточек еще меньше, чтобы было больше места для текста */
    .custom-1, .custom-2, .custom-3, .custom-5 {
        margin-left: 5px !important;
        margin-right: 5px !important;
        padding: 8px !important;
        width: calc(100% - 10px) !important;
    }
}


/* === ПРАВКИ: ПОЛНАЯ МОДЕРНИЗАЦИЯ СЕТКИ (CSS GRID) === */

    #all {
        width: 100% !important;
        max-width: none !important;
        background: #fdfaf4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #container {
        width: 98% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
        position: relative !important;
    }

    #above {
        width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 4 / 1 !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    #box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

.modern-grid-layout {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

.modern-main-area {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    box-sizing: border-box !important;
}

.top-news-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

.top-news-col, .top-pubs-col {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Сбрасываем старые костыли */
.modern-grid-layout .block1,
.modern-grid-layout .block2,
.modern-grid-layout .block3,
.modern-grid-layout .block4 {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Блок ПОЛИТИКА в 2 колонки на всю ширину .modern-main-area */
.block3 {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

.block3 .b3header, .block3 .clear {
    grid-column: 1 / -1 !important;
}

/* Блок ПРАВОСЛАВИЕ в 2 колонки на всю ширину .modern-main-area */
.block4 {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

.block4 .b4header, .block4 .clear {
    grid-column: 1 / -1 !important;
}

.modern-right-sidebar {
    width: 320px !important;
    min-width: 320px !important;
    box-sizing: border-box !important;
}

/* На мобильных всё схлопывается в 1 колонку */
@media (max-width: 1024px) {
    .modern-grid-layout {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
        gap: 15px !important;
    }
    
    .top-news-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .block3, .block4 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .modern-right-sidebar {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* === ПРАВКИ: ПОЛНАЯ НАСТРОЙКА МЕНЮ ДЛЯ ПК (ДЕСКТОП) === */
@media (min-width: 1025px) {
    /* Полностью скрываем любые мобильные элементы в DOM */
    #mobile-menu-btn,
    #mobile-close-btn,
    #mobile-overlay,
    .drawer-header,
    .drawer-close,
    .submenu-header,
    .back-btn,
    .nav3 li.drawer-header,
    .nav3 li.submenu-header,
    .nav3 li.back-btn {
        display: none !important;
    }

    /* Сама благородная бордовая полоса навигации (строго по ширине картинки выше!) */
    .nav3 {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 42px !important;
        line-height: 42px !important;
        background: linear-gradient(to bottom, #7a1d1d, #5e1515) !important;
        background-image: linear-gradient(to bottom, #7a1d1d, #5e1515) !important;
        border: none !important;
        border-bottom: 2px solid #cba052 !important;
        border-radius: 0 !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        z-index: 100 !important;
        box-sizing: border-box !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    }

    /* Горизонтальный список меню */
    .nav3 > ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 39px !important;
        line-height: 39px !important;
        background: transparent !important;
        position: static !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Пункты первого уровня */
    .nav3 > ul > li {
        display: block !important;
        float: left !important;
        width: auto !important;
        height: 39px !important;
        min-height: 39px !important;
        max-height: 39px !important;
        line-height: 39px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(0, 0, 0, 0.35) !important;
        border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: none !important;
        background-image: none !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    .nav3 > ul > li:first-child {
        border-left: none !important;
        border-radius: 0 !important;
    }

    /* У последнего пункта нет разделителя справа */
    .nav3 > ul > li:last-child {
        border-right: none !important;
        border-radius: 0 !important;
    }

    /* Ссылки пунктов меню на ПК */
    .nav3 > ul > li > a {
        display: flex !important;
        align-items: center !important;
        height: 39px !important;
        line-height: 39px !important;
        padding: 0 20px !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #ffd27a !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
        text-decoration: none !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        transition: background-color 0.2s, color 0.2s !important;
    }

    /* Подсветка при наведении на пункт на ПК */
    .nav3 > ul > li:hover {
        background: linear-gradient(to bottom, #8f2323, #6f1919) !important;
    }

    .nav3 > ul > li:hover > a {
        color: #ffffff !important;
        text-shadow: 0 0 6px rgba(255, 210, 122, 0.8) !important;
    }

    /* Скрываем мобильные стрелочки на ПК */
    .nav3 li.drop > a::after {
        display: none !important;
        content: "" !important;
    }

    /* Выпадающие списки подменю на ПК */
    .nav3 ul ul {
        display: none !important;
        position: absolute !important;
        top: 39px !important;
        left: 0 !important;
        min-width: 230px !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        background-color: #3b0a0a !important;
        border: 1px solid #541010 !important;
        border-top: 2px solid #ffd27a !important;
        border-radius: 0 0 6px 6px !important;
        box-shadow: 0 8px 22px rgba(0,0,0,0.55) !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 1000 !important;
        overflow: visible !important;
        transition: none !important;
    }

    .nav3 li:hover > ul {
        display: block !important;
    }

    /* Пункты выпадающего списка */
    .nav3 ul ul li {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        line-height: normal !important;
        background: none !important;
        border: none !important;
        border-bottom: 1px solid rgba(203, 160, 82, 0.18) !important;
        padding: 0 !important;
        margin: 0 !important;
        float: none !important;
        box-sizing: border-box !important;
    }

    .nav3 ul ul li:last-child {
        border-bottom: none !important;
    }

    /* Ссылки внутри выпадающего списка */
    .nav3 ul ul li a {
        display: block !important;
        padding: 10px 16px !important;
        height: auto !important;
        line-height: 1.4 !important;
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-size: 14px !important;
        font-weight: normal !important;
        color: #ffffff !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        text-shadow: none !important;
        text-decoration: none !important;
        background: transparent !important;
        border: none !important;
        text-align: left !important;
        white-space: nowrap !important;
        transition: background-color 0.15s, color 0.15s !important;
    }

    .nav3 ul ul li a:hover {
        background-color: #5c1212 !important;
        color: #ffd27a !important;
    }

    /* Вложенные уровни (3-й уровень) выпадают вправо */
    .nav3 ul ul ul {
        top: 0 !important;
        left: 100% !important;
    }
}


/* === ПРАВКИ: ФИКС НАЛОЖЕНИЯ ТЕКСТА НА КАРТИНКИ (ДЕСКТОП И ГЛОБАЛЬНО) === */
.custom-1 a, .custom-2 a, .custom-3 a, .custom-4 a, .custom-5 a {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    text-decoration: none !important;
}
.custom-1 img, .custom-2 img, .custom-3 img, .custom-4 img, .custom-5 img {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}
.custom-1 span, .custom-2 span, .custom-3 span, .custom-4 span, .custom-5 span {
    display: block !important;
    flex-grow: 1 !important;
    overflow: hidden !important;
    max-height: none !important; /* Снимаем ограничение высоты, чтобы текст не обрезался уродливо */
}

/* На мобильных возвращаем вертикальное отображение */
@media (max-width: 600px) {
    .custom-1 a, .custom-2 a, .custom-3 a, .custom-4 a, .custom-5 a {
        display: block !important;
    }
    .custom-1 img, .custom-2 img, .custom-3 img, .custom-4 img, .custom-5 img {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 15px !important;
    }
}


/* Убираем жесткие высоты контейнеров, чтобы текст больше никогда не вываливался и не накладывался на соседние блоки */
.custom-1, .custom-2, .custom-3, .custom-4, .custom-5, .custom-3im {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* === ФИНАЛЬНЫЕ ПРАВИЛА: КАРТОЧКИ БЛОКОВ ПОЛИТИКА И ПРАВОСЛАВИЕ === */
.block3 .custom-3,
.block4 .custom-2 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 15px !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.block3 .custom-3 .card-thumb,
.block4 .custom-2 .card-thumb,
.block3 .custom-3 .card-title-link,
.block4 .custom-2 .card-title-link {
    display: block !important;
    flex-direction: initial !important;
}

.block3 .custom-3 .card-thumb,
.block4 .custom-2 .card-thumb {
    flex-shrink: 0 !important;
    width: 110px !important;
}

.block3 .custom-3 .card-thumb img {
    width: 110px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.block4 .custom-2 .card-thumb img {
    width: 110px !important;
    height: 95px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.block3 .custom-3 .card-body,
.block4 .custom-2 .card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.block3 .custom-3 .card-title-link span {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #7a1d1d !important;
    line-height: 1.3 !important;
    overflow: visible !important;
}

.block4 .custom-2 .card-title-link span {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #156220 !important;
    line-height: 1.3 !important;
    overflow: visible !important;
}

.block3 .custom-3 .card-desc,
.block4 .custom-2 .card-desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #444444 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === СТИЛИЗАЦИЯ КАТЕГОРИЙ И СПИСКОВ НОВОСТЕЙ (/genocid/ и др.) === */
.short-story {
    background-color: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
    padding: 18px 20px !important;
    margin: 0 0 20px 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    overflow: hidden !important;
    transition: box-shadow 0.2s ease !important;
}

.short-story:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06) !important;
}

/* Картинка миниатюры слева */
.short-img {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    display: block !important;
    border: none !important;
}

.short-img a {
    display: block !important;
    width: 100% !important;
    height: 110px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    padding: 0 !important;
}

.short-img img {
    width: 100% !important;
    height: 110px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    transition: transform 0.25s ease !important;
}

.short-img a:hover img {
    transform: scale(1.04) !important;
    opacity: 0.95 !important;
}

/* Правый блок с описанием */
.short-right {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Заголовок статьи */
.short-title {
    margin: 0 !important;
    padding: 0 !important;
    max-height: none !important;
    line-height: 1.35 !important;
    overflow: visible !important;
    font-size: 18px !important;
    border: none !important;
}

.short-title a {
    color: #7a1d1d !important; /* Глубокий благородный бордовый */
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: inline !important;
    transition: color 0.2s ease !important;
}

.short-title a:hover {
    color: #cba052 !important; /* Золотистый оттенок */
    text-decoration: none !important;
}

/* Мета-информация (рубрики, дата, просмотры) */
.short-data {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
    color: #777777 !important;
    margin: 0 0 4px 0 !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #f2ede2 !important;
}

.short-cat {
    float: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
}

.short-cat a {
    background: #f4efe6 !important; /* Нежный тёплый пергаментный тон */
    color: #6e5d48 !important;      /* Сдержанный кофейно-древесный текст */
    border: 1px solid #dfd7c5 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    line-height: 1.3 !important;
    height: auto !important;
    transition: all 0.2s ease !important;
}

.short-cat a:hover {
    background: #7a1d1d !important; /* Благородный бордовый при наведении */
    color: #ffffff !important;
    border-color: #7a1d1d !important;
}

.short-date {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #777777 !important;
}

.short-data .views {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #777777 !important;
    margin-left: 4px !important;
    padding-left: 20px !important;
    height: auto !important;
    background-position: 0 center !important;
}

/* Текст анонса */
.short-text,
.short-right > div:not(.short-data) {
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #3f3f3f !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Хлебные крошки рубрики (speedbar) */
.speedbar {
    background-color: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 6px !important;
    padding: 9px 15px !important;
    margin: 0 0 20px 0 !important;
    font-size: 13px !important;
    color: #777777 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    max-height: none !important;
    line-height: 1.4 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

.speedbar, .speedbar *, .speedbar a, .speedbar span, #dle-speedbar, #dle-speedbar * {
    text-transform: none !important;
}
.speedbar a {
    color: #7a1d1d !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.speedbar a:hover {
    color: #cba052 !important;
    text-decoration: underline !important;
}

/* Постраничная навигация (пагинация) */
.navigation {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 25px 0 !important;
    padding: 10px 0 !important;
    height: auto !important;
    clear: both !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.navigation a, .navigation span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 10px !important;
    background: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 6px !important;
    color: #7a1d1d !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    transition: all 0.2s ease !important;
}

.navigation a:hover {
    background: #cba052 !important;
    color: #ffffff !important;
    border-color: #cba052 !important;
}

.navigation span {
    background: #7a1d1d !important;
    color: #ffffff !important;
    border-color: #7a1d1d !important;
}

/* Мобильная адаптивность для категорий и карточек */
@media (max-width: 768px) {
    #left, #left table, #left tbody, #left tr, #left td, #dle-content {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .speedbar {
        margin: 10px 10px 15px 10px !important;
        width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }

    .short-story {
        display: flex !important;
        flex-direction: column !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 0 10px 16px 10px !important;
        padding: 14px 14px 16px 14px !important;
        box-sizing: border-box !important;
        gap: 12px !important;
        overflow: hidden !important;
        background-color: #ffffff !important;
        border: 1px solid #e0d8c3 !important;
        border-radius: 8px !important;
        box-shadow: 0 3px 8px rgba(0,0,0,0.03) !important;
    }

    .short-img {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .short-img a {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        max-height: 220px !important;
        overflow: hidden !important;
        border-radius: 6px !important;
    }

    .short-img img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 220px !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 6px !important;
        border: none !important;
    }

    .short-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .short-title {
        font-family: 'Philosopher', 'Georgia', serif !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .short-title a {
        color: #7a1d1d !important;
        text-decoration: none !important;
    }

    .short-data {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px 8px !important;
        font-size: 11px !important;
        color: #777777 !important;
        margin: 0 0 8px 0 !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #f2ede2 !important;
        line-height: 1.4 !important;
    }

    .short-cat {
        display: inline-flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    .short-cat a {
        font-size: 11px !important;
        padding: 2px 7px !important;
        line-height: 1.3 !important;
        border-radius: 4px !important;
    }

    .short-date, .short-data .views, .short-data .comms {
        font-size: 11px !important;
        color: #777777 !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .short-text, .short-right > div:not(.short-data) {
        font-family: 'Georgia', 'Times New Roman', serif !important;
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        color: #3f3f3f !important;
        margin: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .navigation {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        margin: 20px 10px !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
        padding: 10px 0 !important;
        height: auto !important;
        clear: both !important;
    }

    .navigation a, .navigation span {
        min-width: 30px !important;
        height: 30px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
        box-sizing: border-box !important;
    }
}

/* === СТИЛИЗАЦИЯ СТРАНИЦЫ СТАТЬИ (FULLSTORY) === */
.story {
    background-color: #ffffff !important;
    border: 1px solid #e0d8c3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
    padding: 25px 30px !important;
    margin: 0 0 25px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
}

.story table,
.story tr,
.story td {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Заголовок статьи */
.post-title {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-left: 4px solid #7a1d1d !important;
    padding: 4px 0 4px 15px !important;
    margin: 0 0 20px 0 !important;
    border-radius: 0 !important;
    line-height: 1.35 !important;
}

.post-title h1,
.post-title h1 span#news-title,
.post-title a {
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #7a1d1d !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    display: block !important;
}

/* Текст полной статьи */
.full-story {
    background: transparent !important;
    background-color: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #2b2b2b !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.full-story p {
    margin-bottom: 16px !important;
    line-height: 1.7 !important;
    color: #2b2b2b !important;
}

/* Пустые строки и абзацы, созданные клавишей Enter в редакторе */
.full-story div:empty:not([class]):not([id]):not([data-media]),
.full-story div[style]:empty:not([class]):not([id]):not([data-media]),
.story div:empty:not([class]):not([id]):not([data-media]),
.story div[style]:empty:not([class]):not([id]):not([data-media]),
.full-story p:empty,
.story p:empty {
    display: block !important;
    min-height: 1.25em !important;
    height: 1.25em !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
}

.full-story img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    margin: 10px 15px 15px 0 !important;
}

/* Мета-данные статьи (дата, просмотры, теги, кнопка редактирования и соцсети) */
.post-data {
    background: #fbf9f5 !important;
    border: 1px solid #ede7db !important;
    border-radius: 6px !important;
    padding: 12px 18px !important;
    margin: 15px 0 10px 0 !important;
    font-size: 13px !important;
    color: #666666 !important;
    line-height: 1.5 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px 16px !important;
    box-sizing: border-box !important;
}

.post-data .post-meta-info {
    flex: 1 1 300px !important;
    min-width: 200px !important;
    line-height: 1.6 !important;
}

.post-data .post-meta-info span {
    margin-right: 12px !important;
    display: inline-block !important;
}

.post-data a {
    color: #7a1d1d !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin-left: 6px !important;
}

.post-data a:hover {
    color: #cba052 !important;
}

.post-data .post-meta-tags {
    margin-top: 4px !important;
    font-size: 12px !important;
}

.post-data .like {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    max-width: 100% !important;
}

.post-data .ya-share2 {
    display: block !important;
    max-width: 100% !important;
}

.post-data .ya-share2 .ya-share2__list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Кнопка поделиться в Telegram с фирменной иконкой */
a.tg-share-btn,
.post-data .like a.tg-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 4px !important;
    background-color: #24A1DE !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

a.tg-share-btn:hover,
.post-data .like a.tg-share-btn:hover {
    background-color: #1e87bb !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
}

a.tg-share-btn svg,
.post-data .like a.tg-share-btn svg {
    display: block !important;
    width: 15px !important;
    height: 15px !important;
    fill: #ffffff !important;
}

.ya-share2__item.tg-custom-item {
    display: inline-block !important;
    vertical-align: top !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* ========================================================
   Блок "Другие новости по теме" (Related News Cards)
   ======================================================== */
.related-block {
    background: #ffffff !important;
    border: 1px solid #ebd9c8 !important;
    border-radius: 10px !important;
    padding: 20px 22px 24px 22px !important;
    margin: 25px 0 15px 0 !important;
    width: auto !important;
    box-shadow: 0 4px 14px rgba(100, 50, 10, 0.04) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.related-block span {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.related-block > span,
.related-block .related-heading {
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #7a1d1d !important;
    display: block !important;
    margin: 0 0 16px 0 !important;
    padding: 0 0 10px 0 !important;
    border: none !important;
    border-bottom: 2px solid #ecdcc8 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.3px !important;
}

.related-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

/* Fallback if rendered without .related-grid wrapper */
.related-block > .related-card,
.related-block > .related1 {
    margin: 0 0 14px 0 !important;
}

/* Карточка похожей новости */
.related-card,
.related1 {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    height: 100% !important;
    min-height: 195px !important;
    max-height: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fdfbf7 !important;
    border: 1px solid #ebd9c8 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.related-card:hover,
.related1:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 18px rgba(122, 29, 29, 0.12) !important;
    border-color: #cba052 !important;
    background: #ffffff !important;
}

.related-card a,
.related1 a,
.related-link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}

.related-card a:hover,
.related1 a:hover,
.related-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* Картинка / превью */
.related-thumb {
    width: 100% !important;
    height: 110px !important;
    min-height: 110px !important;
    max-height: 110px !important;
    position: relative !important;
    overflow: hidden !important;
    background: #f0e9df url('/templates/BsD/dleimages/no_image.jpg') center/cover no-repeat !important;
    border-radius: 7px 7px 0 0 !important;
}

.related-thumb img,
.related1 img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 110px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 7px 7px 0 0 !important;
    transition: transform 0.35s ease !important;
}

.related-card:hover .related-thumb img,
.related1:hover img {
    transform: scale(1.06) !important;
}

/* Текстовый блок карточки */
.related-content {
    padding: 11px 11px 12px 11px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

.related-title {
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.38 !important;
    color: #26201b !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.2s ease !important;
}

.related-card:hover .related-title,
.related1:hover .related-title,
.related-card a:hover .related-title {
    color: #7a1d1d !important;
}

.related-date {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #9c8e82 !important;
    margin-top: auto !important;
    padding-top: 8px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Полная нейтрализация старых зеленых плашек .rltd1 из style.css */
.rltd1 {
    display: none !important;
}

/* Адаптивность для мобильных и планшетов */
@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 800px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }
    .related-block {
        padding: 15px 14px 18px 14px !important;
    }
}

@media (max-width: 540px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .related-thumb {
        height: 100px !important;
    }
    .related-title {
        font-size: 12.5px !important;
        -webkit-line-clamp: 2 !important;
    }
}

@media (max-width: 360px) {
    .related-grid {
        grid-template-columns: 1fr !important;
    }
}


@media (max-width: 768px) {
    .story {
        padding: 16px 15px !important;
    }
    
    /* Адаптация блока мета-данных и соцсетей на смартфонах */
    .post-data {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px 14px !important;
        gap: 10px !important;
    }

    .post-data .post-meta-info {
        flex: 0 0 auto !important;
        width: 100% !important;
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    .post-data .like {
        width: 100% !important;
        float: none !important;
        margin: 6px 0 0 0 !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e5dfd3 !important;
        clear: both !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .post-data .ya-share2 {
        width: 100% !important;
        display: block !important;
    }

    .post-data .ya-share2 .ya-share2__list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: flex-start !important;
    }
    .post-title h1 span#news-title {
        font-size: 20px !important;
    }
    .full-story {
        font-size: 15px !important;
    }
}

/* === ФИНАЛЬНАЯ АДАПТАЦИЯ МОБИЛЬНОЙ ВЕРСИИ (ПОСЛЕ ДОБАВЛЕНИЯ VIEWPORT) === */
@media (max-width: 1024px) {
    #above {
        aspect-ratio: 4 / 1 !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        background-size: 100% 100% !important;
        background-position: center center !important;
    }

    /* Отключаем принудительный justify везде на мобильных — устраняем гигантские пробелы между словами */
    .custom-1, .custom-2, .custom-3, .custom-4, .custom-5, .custom-fav,
    .custom-1 *, .custom-2 *, .custom-3 *, .custom-4 *, .custom-5 *, .custom-fav *,
    .custom-title, .blok-link, .c1cat, .white-bottom, .story, .story * {
        text-align: left !important;
        text-justify: auto !important;
    }

    /* Блок «ИЗБРАННОЕ»: аккуратный, читаемый список новостей с разделителями */
    .custom-fav {
        width: 100% !important;
        padding: 9px 8px !important;
        margin-bottom: 0 !important;
        border-bottom: 1px dotted #e0d8c3 !important;
        box-sizing: border-box !important;
        display: block !important;
    }
    .custom-fav:last-child {
        border-bottom: none !important;
    }
    .custom-fav img {
        display: none !important;
    }
    .custom-fav a, .custom-fav .custom-title {
        font-family: 'Georgia', serif !important;
        font-size: 15px !important;
        line-height: 1.45 !important;
        color: #7a1d1d !important;
        font-weight: 600 !important;
        display: block !important;
        text-align: left !important;
        text-decoration: none !important;
    }
    .custom-fav a:hover .custom-title {
        color: #cba052 !important;
    }
}

@media (max-width: 600px) {
    #above {
        aspect-ratio: auto !important;
        height: 130px !important;
        min-height: 120px !important;
        max-height: 140px !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    /* Карточки новостей на смартфонах */
    .custom-1, .custom-2, .custom-3, .custom-5 {
        width: 100% !important;
        margin: 12px 0 !important;
        padding: 12px !important;
        border-radius: 8px !important;
        border: 1px solid #ede6d6 !important;
        background: #ffffff !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
        box-sizing: border-box !important;
    }

    /* Изображение внутри карточки: на всю ширину сверху, красиво и современно */
    .custom-1 img, .custom-2 img, .custom-3 img {
        float: none !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: 220px !important;
        object-fit: cover !important;
        margin: 0 0 10px 0 !important;
        border-radius: 6px !important;
    }

    /* Заголовки новостей в карточках */
    .custom-1 > div > a span, .custom-2 > div > a span {
        font-size: 17px !important;
        line-height: 1.35 !important;
        text-align: left !important;
        color: #1b5e20 !important;
        margin-bottom: 8px !important;
        word-break: break-word !important;
    }

    /* Дата и категория */
    .blok-data {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    .c1cat, .blok-link, .white-bottom {
        font-size: 11px !important;
        text-align: left !important;
        margin-top: 8px !important;
    }
}

/* === БЛАГОРОДНЫЙ ПРАВОСЛАВНЫЙ ФУТЕР === */
.footer {
    width: 100% !important;
    max-width: 100% !important;
    background: linear-gradient(180deg, #7a1d1d 0%, #521212 100%) !important;
    color: #f5eedc !important;
    border: none !important;
    border-top: 3px solid #cba052 !important;
    margin: 30px 0 0 0 !important;
    padding: 24px 15px 28px 15px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    clear: both !important;
}

.sub-footer1, .sub-footer {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    float: none !important;
    text-align: center !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #f5eedc !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-height: auto !important;
}

.sub-footer a, .sub-footer1 a {
    color: #cba052 !important;
    text-decoration: none !important;
}

.sub-footer a:hover, .sub-footer1 a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Скрываем дублирующий нижний поиск с точкой */
#container > form, #content > form, #box > form, form:has(input[value='.']) {
    display: none !important;
}

@media (max-width: 600px) {
    .footer {
        padding: 20px 15px !important;
        margin-top: 20px !important;
    }
    .sub-footer, .sub-footer1 {
        font-size: 14px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        text-align: center !important;
    }
}






/* === SEO & SEMANTIC IMPROVEMENTS === */
.header-h1-wrap {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: normal !important;
    line-height: inherit !important;
    border: none !important;
    background: transparent !important;
    display: block !important;
}

.category-title-block {
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
}

.category-main-title {
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #7a1d1d !important;
    margin: 0 !important;
    padding: 4px 0 4px 14px !important;
    border-left: 4px solid #cba052 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
}

.custom-1 img, .custom-2 img, .custom-3 img, .custom-4 img, .custom-5 img, .custom-21 img {
    object-fit: cover !important;
}

@media (max-width: 768px) {
    .category-title-block {
        margin: 10px 10px 15px 10px !important;
    }
    .category-main-title {
        font-size: 19px !important;
        padding: 3px 0 3px 10px !important;
    }
}

/* === АДАПТИВНЫЙ ПОИСК ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ === */
@media (max-width: 1024px) {
    .sidebar-search-block {
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 16px 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-search-block .side-search-inner {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #searchsuggestions {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        box-sizing: border-box !important;
    }
}

/* === ВИДЕО В ПУБЛИКАЦИЯХ: ВЫРАВНИВАНИЕ СЛЕВА И ЗАПРЕТ ОБТЕКАНИЯ ТЕКСТОМ === */
.dle-media-block, dlemedia, .dlevideoplayer, .dleaudioplayer, .dleiframe-wrap {
    display: block !important;
    clear: both !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
}

.dle-media-block:not([style*="float: right"]):not([style*="margin-left: auto"]):not([style*="margin-left:auto"]),
dlemedia:not([style*="float: right"]):not([style*="margin-left: auto"]):not([style*="margin-left:auto"]),
.dlevideoplayer:not([style*="float: right"]):not([style*="margin-left: auto"]):not([style*="margin-left:auto"]) {
    float: none !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    clear: both !important;
}

.dle-media-block[style*="float: left"],
.dle-media-block[style*="float:left"],
dlemedia[style*="float: left"],
dlemedia[style*="float:left"] {
    float: none !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    clear: both !important;
}

.dle-media-block + *,
dlemedia + *,
.dlevideoplayer + * {
    clear: both !important;
}

/* Схлопывание отступов видео при соседстве с пустой строкой, созданной клавишей Enter */
.full-story .media-tight-top,
.full-story .dle-media-block.media-tight-top,
.full-story dlemedia.media-tight-top,
.full-story .dlevideoplayer.media-tight-top,
.full-story div:empty + .dle-media-block,
.full-story div[style]:empty + .dle-media-block,
.full-story p:empty + .dle-media-block,
.full-story .story-empty-line + .dle-media-block,
.full-story div:empty + dlemedia,
.full-story div[style]:empty + dlemedia,
.full-story p:empty + dlemedia,
.full-story .story-empty-line + dlemedia,
.full-story div:empty + .dlevideoplayer,
.full-story div[style]:empty + .dlevideoplayer,
.full-story p:empty + .dlevideoplayer,
.full-story .story-empty-line + .dlevideoplayer {
    margin-top: 0 !important;
}

.full-story .media-tight-bottom,
.full-story .dle-media-block.media-tight-bottom,
.full-story dlemedia.media-tight-bottom,
.full-story .dlevideoplayer.media-tight-bottom,
.full-story .dle-media-block + div:empty,
.full-story .dle-media-block + div[style]:empty,
.full-story .dle-media-block + p:empty,
.full-story .dle-media-block + .story-empty-line,
.full-story dlemedia + div:empty,
.full-story dlemedia + div[style]:empty,
.full-story dlemedia + p:empty,
.full-story dlemedia + .story-empty-line,
.full-story .dlevideoplayer + div:empty,
.full-story .dlevideoplayer + div[style]:empty,
.full-story .dlevideoplayer + p:empty,
.full-story .dlevideoplayer + .story-empty-line {
    margin-bottom: 0 !important;
}

/* Если видео расположено в конце статьи или является последним элементом */
.full-story .dle-media-block:last-child,
.full-story dlemedia:last-child,
.full-story .dlevideoplayer:last-child,
.full-story .dleiframe-wrap:last-child {
    margin-bottom: 0 !important;
}

.full-story table {
    margin: 0 !important;
    padding: 0 !important;
    border-collapse: collapse !important;
}

.full-story table td {
    padding: 0 !important;
    vertical-align: top !important;
}


/* === КНОПКА ПЕРЕКЛЮЧЕНИЯ НА ПК-ВЕРСИЮ ДЛЯ МОБИЛЬНЫХ === */
.site-version-toggle-wrap {
    display: none;
    text-align: left;
    margin: 4px 10px 2px 10px;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .site-version-toggle-wrap {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        margin: 4px 0 2px 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}

.site-version-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 10px !important;
    background: #fbf9f5 !important;
    color: #7a1d1d !important;
    border: 1px solid #d8cca3 !important;
    border-radius: 4px !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    line-height: 1.2 !important;
}

.site-version-btn:hover,
.site-version-btn:active {
    background: #7a1d1d !important;
    color: #ffd27a !important;
    border-color: #541010 !important;
    box-shadow: 0 2px 5px rgba(122,29,29,0.2) !important;
}

.site-version-btn .pc-icon {
    flex-shrink: 0 !important;
    width: 13px !important;
    height: 13px !important;
}

/* === КНОПКА ВОЗВРАТА К МОБИЛЬНОЙ ВЕРСИИ В РЕЖИМЕ ПК (НАД ИЗБРАННЫМ) === */
#desktop-mode-return-wrap {
    display: none;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    clear: none !important;
}

#desktop-mode-return-wrap.is-active {
    display: block !important;
}

.return-to-mobile-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    background: #fbf9f5 !important;
    color: #7a1d1d !important;
    border: 1px solid #cba052 !important;
    border-radius: 5px !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.return-to-mobile-btn:hover,
.return-to-mobile-btn:active {
    background: #7a1d1d !important;
    color: #ffd27a !important;
    border-color: #541010 !important;
    box-shadow: 0 3px 8px rgba(122,29,29,0.25) !important;
}

#footer-mobile-switch,
#desktop-version-bar {
    display: none !important;
}

/* НАСТОЯЩИЙ ПК (МЫШЬ / ШИРОКИЙ МОНИТОР): ПОЛНОСТЬЮ СКРЫВАЕМ КНОПКИ */
@media (hover: hover) and (pointer: fine) {
    #desktop-mode-return-wrap,
    #footer-mobile-switch,
    #desktop-version-bar,
    .site-version-toggle-wrap {
        display: none !important;
    }
}

@media (min-width: 1201px) {
    #desktop-mode-return-wrap,
    #footer-mobile-switch,
    #desktop-version-bar,
    .site-version-toggle-wrap {
        display: none !important;
    }
}

/* ПРИНУДИТЕЛЬНАЯ ШИРИНА 1200PX ДЛЯ РЕЖИМА ПК НА СМАРТФОНАХ */
html.desktop-mode-active,
html.desktop-mode-active body {
    width: 1200px !important;
    min-width: 1200px !important;
    max-width: none !important;
    overflow-x: visible !important;
}

/* === ССЫЛКА «РАЗНОЕ» В ВИДЕ ПУНКТА МЕНЮ === */
#right .redheader,
.block1 .redheader,
.redheader {
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin: 15px 0 14px 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

#right .redheader::before,
.block1 .redheader::before,
.redheader::before {
    display: none !important;
    content: none !important;
}

#right .redheader a,
.block1 .redheader a,
.redheader a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 39px !important;
    line-height: 39px !important;
    padding: 0 24px !important;
    background: linear-gradient(to bottom, #7a1d1d, #5e1515) !important;
    border-top: 2px solid #cba052 !important;
    border-bottom: 2px solid #cba052 !important;
    border-left: 1px solid #5e1515 !important;
    border-right: 1px solid #5e1515 !important;
    border-radius: 4px !important;
    font-family: 'Philosopher', 'Georgia', serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffd27a !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box !important;
    transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s ease !important;
}

#right .redheader a:hover,
.block1 .redheader a:hover,
.redheader a:hover {
    background: linear-gradient(to bottom, #8f2323, #6f1919) !important;
    color: #ffffff !important;
    text-shadow: 0 0 6px rgba(255, 210, 122, 0.8) !important;
    text-decoration: none !important;
}
