/* Стили для раздвижного вертикального меню */
.accordion-menu {
    margin: 0;
    padding: 0;
    font-family: inherit;
}

/* Обычные ссылки (не раздвижные) */
.accordion-menu .menu-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}
.accordion-menu .menu-link:hover {
    background: #f5f5f5;
    color: #1a5f7a;
}

/* Каждый пункт раздвижного меню */
.accordion-menu .menu-item {
    border-bottom: 1px solid #eee;
}

/* Заголовок раздела (кликабельный) */
.accordion-menu .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    transition: background 0.2s;
}
.accordion-menu .menu-header:hover {
    background: #e9ecef;
}

/* Стрелка */
.accordion-menu .arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

/* Когда раздел открыт — стрелка повёрнута */
.accordion-menu .menu-item.open .arrow {
    transform: rotate(180deg);
}

/* Выдвижной блок (по умолчанию скрыт) */
.accordion-menu .menu-sub {
    display: none;
    background: #fff;
    padding: 5px 0;
}

/* Когда у menu-item есть класс open — показываем подменю */
.accordion-menu .menu-item.open .menu-sub {
    display: block;
}

/* Стили для вложенных ссылок */
.accordion-menu .menu-sub a {
    display: block;
    padding: 8px 15px 8px 30px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    border-bottom: none;
    transition: background 0.2s;
}
.accordion-menu .menu-sub a:hover {
    background: #f0f7ff;
    color: #1a5f7a;
}
/* ==============================================
   1. ФУТЕР: ОБЩИЕ СТИЛИ И СЕТКА
   ============================================== */

/* Убираем белый фон и тени у виджетов в футере */
#footer .widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
}

/* Заголовки виджетов в футере */
#footer .widget .widget-title {
    background-color: var(--navy-dark) !important;
    color: var(--ivory) !important;
    border-bottom: 3px solid var(--gold) !important;
    padding: 12px 15px 12px 20px !important;
    font-size: 1rem !important;
}

/* Базовый цвет текста и ссылок в футере */
#footer .widget,
#footer .widget p,
#footer .widget li,
#footer .widget a {
    color: #b0b8c0 !important;
}

#footer .widget a:hover {
    color: var(--gold) !important;
}

/* Поля ввода в футере */
#footer .widget input[type="text"],
#footer .widget input[type="email"] {
    background-color: var(--navy-light) !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--ivory) !important;
}


/* ==============================================
   2. ФУТЕР: СОЦИАЛЬНЫЕ ИКОНКИ (Круглые кнопки)
   ============================================== */

#footer .widget_social {
    background: transparent !important;
    padding: 0 !important;
}

#footer .widget_social .social-icons {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    padding: 15px 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

#footer .widget_social .social-icons li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background-color: var(--navy-light) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    transition: all 0.3s ease !important;
}

#footer .widget_social .social-icons li a:hover {
    background-color: var(--gold) !important;
    border-color: var(--gold) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4) !important;
}

/* Иконки SVG (белые по умолчанию, темные при наведении) */
#footer .widget_social .social-icons li a svg {
    width: 22px !important;
    height: 22px !important;
    fill: #ffffff !important;
    color: #ffffff !important;
    display: block !important;
}

#footer .widget_social .social-icons li a:hover svg {
    fill: var(--navy-dark) !important;
    color: var(--navy-dark) !important;
}


/* ==============================================
   3. ФУТЕР: ФОРМА ПОДПИСКИ (Чекбокс и ссылка)
   ============================================== */

/* Обертка для чекбокса */
#footer .sub-consent-wrapper {
    display: table;
    width: 100%;
    margin-bottom: 12px;
}

/* Ячейка с чекбоксом */
#footer .sub-consent-checkbox {
    display: table-cell;
    width: 24px;
    vertical-align: top;
    padding-top: 2px;
}

/* Ячейка с текстом */
#footer .sub-consent-text {
    display: table-cell;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.4;
    color: #b0b8c0;
}

#footer .sub-consent-text label {
    cursor: pointer;
    display: block;
    margin: 0;
    font-weight: normal;
}

/* Сама ссылка на политику */
#footer .sub-consent-link {
    color: #b0b8c0;
    text-decoration: underline;
    font-size: 12px;
    display: inline-block;
    margin-top: 6px;
    margin-left: 24px; /* Выравниваем под текстом */
}

#footer .sub-consent-link:hover {
    color: var(--gold);
}


/* ==============================================
   4. ФУТЕР: БЫСТРЫЕ НОВОСТИ (Правый блок)
   ============================================== */

#footer .widget_recent_posts .recent-post {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
}

#footer .widget_recent_posts .recent-post a {
    color: var(--ivory) !important;
}

#footer .widget_recent_posts .recent-post a:hover {
    color: var(--gold) !important;
}


/* ==============================================
   5. САЙДБАР И ВИДЖЕТЫ (Общий стиль)
   ============================================== */

/* Контейнер виджетов */
.sbr #sidebar .widget, 
#sidebar .widget,
.widget.widget_social, 
.widget.widget_categories {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* Заголовки виджетов */
.sbr #sidebar .widget-title, 
#sidebar .widget-title,
.widget .widget-title {
    position: relative;
    margin: 0 !important;
    padding: 15px 20px 15px 25px;
    background-color: var(--navy);
    color: var(--ivory) !important;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--gold);
}

/* Декоративная полоска слева */
.sbr #sidebar .widget-title::before,
#sidebar .widget-title::before,
.widget .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: var(--gold);
}

/* Списки в сайдбаре */
#sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar .widget ul li {
    border-bottom: 1px solid var(--border-light);
}

#sidebar .widget ul li:last-child {
    border-bottom: none;
}

#sidebar .widget ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

#sidebar .widget ul li a:hover {
    background-color: var(--bg-gray);
    color: var(--navy);
    padding-left: 25px;
}

/* Стрелочка при наведении */
#sidebar .widget ul li a::before {
    content: '›';
    position: absolute;
    left: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--gold);
    font-weight: bold;
}

#sidebar .widget ul li a:hover::before {
    opacity: 1;
    left: 15px;
}

/* Отступы для сайдбара на мобильных */
@media screen and (max-width: 64em) {
    #sidebar {
        margin-top: 30px;
    }
}


/* ==============================================
   6. КАРТОЧКИ НОВОСТЕЙ (Посты)
   ============================================== */

.post.post-alternate-1 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    margin-bottom: 30px !important;
    background: #fff !important;
    border: 1px solid var(--border-light) !important;
    position: relative !important;
}

/* Блок с картинкой */
.post.post-alternate-1 .entry-media {
    position: relative !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.post.post-alternate-1 .entry-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

.post.post-alternate-1 .entry-media .entry-header {
    display: none !important;
}

/* Блок с контентом */
.post.post-alternate-1 .entry-content {
    flex-grow: 1 !important;
    padding: 15px 20px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Заголовок карточки */
.post.post-alternate-1 .entry-content .entry-header {
    margin: 0 0 15px 0 !important;
    min-height: 3.2rem !important;
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
}

.post.post-alternate-1 .entry-content .entry-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    text-align: left !important;
    color: var(--navy) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.post.post-alternate-1 .entry-content .entry-title a {
    color: var(--navy) !important;
    text-decoration: none !important;
}

.post.post-alternate-1 .entry-content .entry-title a:hover {
    color: var(--gold) !important;
}

/* Футер карточки (категория, дата) */
.post.post-alternate-1 .entry-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 15px 20px !important;
    border-top: 1px solid var(--border-light) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: var(--bg-gray) !important;
    position: static !important;
    width: 100% !important;
    z-index: 20 !important;
}

.post.post-alternate-1 .entry-footer .left,
.post.post-alternate-1 .entry-footer .right {
    float: none !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* ==============================================
   ФИКС СЕТКИ "ПОХОЖИЕ СТАТЬИ" (Related Posts)
   ============================================== */

/* 1. Убираем лишнюю высоту у карточки */
article.post.related {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 2. Убираем жесткие отступы у блока с картинкой */
article.post.related .img-rep {
    margin-bottom: 10px !important; /* Небольшой отступ до заголовка */
    padding-bottom: 0 !important;
    line-height: 0; /* Убираем лишние пиксели под картинкой */
    overflow: hidden;
}

/* 3. Заставляем картинку заполнять блок пропорционально */
article.post.related .img-rep img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9; /* Задаем единые пропорции для всех картинок */
    object-fit: cover; /* Картинка будет обрезаться, но не искажаться */
}

/* 4. Подтягиваем заголовок вплотную к картинке */
article.post.related .entry-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

article.post.related .entry-title {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

/* 5. Убираем теги <br> и скрываем SVG-иконку, которая ломает вид */
article.post.related .entry-title br {
    display: none !important;
}

article.post.related .entry-title svg.icon-rel {
    display: none !important;
}

/* 6. Прижимаем дату и категорию к низу карточки */
article.post.related .entry-meta {
    margin-top: auto !important;
    padding-top: 10px !important;
    font-size: 0.85rem;
    color: #888;
}
/* ==============================================
   СТИЛИ ДЛЯ ПОЛНОЙ НОВОСТИ (ИСПРАВЛЕННЫЕ)
   ============================================== */

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.single-post-meta a {
    color: var(--navy, #1a2a3a);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.single-post-meta a:hover {
    color: var(--gold, #d4af37);
}

.single-post-meta .meta-label {
    color: #999;
    font-size: 0.85rem;
    margin-right: 3px;
}

.single-post-meta .meta-sep {
    color: #ddd;
    margin: 0 5px;
}

/* Стили для кнопок админа (закладки, редактировать) */
.admin-actions {
    margin-left: auto; /* Прижимает кнопки вправо */
    display: flex;
    gap: 15px;
}

.action-link {
    cursor: pointer;
    color: #888;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.action-link:hover {
    color: var(--gold, #d4af37);
}

.edit-link {
    color: #e74c3c;
}

.edit-link:hover {
    color: #c0392b;
}

/* Блок с датой редактирования */
.editdate {
    font-size: 0.85rem; 
    background: #f8f9fa; 
    padding: 8px 12px; 
    border-left: 3px solid var(--gold, #d4af37); 
    margin-bottom: 20px;
    color: #666;
}
/* ==============================================
   СКРЫВАЕМ СЛОМАННЫЕ КАРТИНКИ И ПУСТЫЕ БЛОКИ
   ============================================== */

/* 1. Скрываем саму иконку сломанной картинки */
img[src=""], 
img:not([src]), 
img[src*="no_image"],
img[src*="undefined"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 2. Скрываем контейнер картинки, если внутри нет валидной картинки */
/* Это сработает, если контейнер имеет класс .image-post, .entry-media или .img-resp */
.image-post:has(img[src=""]),
.entry-media:has(img[src=""]),
.img-resp:has(img[src=""]),
.image-post:has(img:not([src])),
.entry-media:has(img:not([src])),
.img-resp:has(img:not([src])) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
/* ==============================================
   НАШИ ПРАВКИ (ДОБАВЛЯТЬ В КОНЕЦ ФАЙЛА)
   ============================================== */

/* 1. Фикс пустых блоков с картинками (черные квадраты) */
.entry-media:empty,
.image-post:empty,
.img-resp:empty {
    display: none !important;
}
.entry-media img[src=""],
.image-post img[src=""],
.img-resp img[src=""] {
    display: none !important;
}

/* 2. Фикс чекбоксов (возвращаем видимость) */
input[type="checkbox"], 
input[type="radio"] {
    opacity: 1 !important;
    position: relative !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 8px 0 0 !important;
    width: auto !important;
    height: auto !important;
}

/* 3. Стили для карточки полной новости (если нужно) */
.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}
.single-post-meta a { color: var(--navy, #1A2A3A); font-weight: 600; }
.single-post-meta .meta-label { color: #999; font-size: 0.85rem; margin-right: 3px; }
.single-post-meta .meta-sep { color: #ddd; margin: 0 5px; }