/*
Theme Name: Uzhgorod Portal Master
Version: 11.0
*/

/* --- 1. БАЗА --- */
* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #fff; color: #111; line-height: 1.5; font-size: 15px; }
a { text-decoration: none !important; color: #111; transition: 0.2s; }
a:hover { color: #0056b3; }
img { max-width: 100%; height: auto; display: block; }

/* --- 2. ШАПКА (ВОССТАНОВЛЕНА) --- */
header { background: #fff; margin-bottom: 30px; border-bottom: 1px solid #e5e7eb; }

/* Топ бар */
.top-bar { background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: 8px 0; font-size: 12px; color: #666; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; height: 30px; }
.top-right { display: flex; align-items: center; gap: 15px; }
.contact-link { font-weight: 600; color: #555; }

/* Основной этаж */
.header-main { padding: 20px 0; }
.header-row { display: flex; justify-content: space-between; align-items: center; }

/* Логотип */
.site-branding { display: flex; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.logo-box { background: #0056b3; color: #fff; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; font-size: 28px; font-weight: 900; border-radius: 4px; }
.logo-text-group { display: flex; flex-direction: column; line-height: 1; }
.logo-title { font-size: 24px; font-weight: 900; color: #111; letter-spacing: -1px; text-transform: uppercase; }
.logo-desc { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; margin-top: 3px; }
.site-logo img { max-height: 55px; width: auto; }

/* Поиск */
.header-search-area { margin-left: auto; }
.big-search-form { display: flex; position: relative; }
.big-search-field { padding: 10px 15px; border: 2px solid #f1f1f1; border-radius: 4px 0 0 4px; font-size: 14px; width: 300px; outline: none; background: #fdfdfd; }
.big-search-submit { background: #0056b3; color: #fff; border: 2px solid #0056b3; border-radius: 0 4px 4px 0; padding: 0 20px; font-weight: 700; text-transform: uppercase; font-size: 12px; cursor: pointer; }

/* Меню */
.header-nav { background: #0056b3; }
.main-navigation ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.main-navigation a { display: block; color: #fff !important; padding: 12px 18px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.main-navigation a:hover { background: rgba(0,0,0,0.1); }

/* --- 3. СЕТКА И СЛАЙДЕР --- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.main-grid { display: grid; grid-template-columns: 240px 1fr 280px; gap: 40px; align-items: start; }
main { min-width: 0; overflow: hidden; /* Фикс разрыва слайдером */ }

/* Красивые стрелки слайдера */
.swiper { width: 100%; margin-bottom: 40px; border-radius: 8px; overflow: hidden; }
.swiper-slide .hero-post { border: none; margin: 0; padding: 0; }

.swiper-button-next, .swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.3); /* Полупрозрачный фон */
    width: 40px !important; height: 40px !important;
    border-radius: 50%;
    backdrop-filter: blur(2px);
    transition: 0.2s;
}
.swiper-button-next:hover, .swiper-button-prev:hover { background: rgba(0,86,179,0.8); }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 18px !important; font-weight: bold; }
.swiper-pagination-bullet-active { background: #fff !important; }

/* Главная новость внутри слайдера */
.hero-img { width: 100%; height: 420px; object-fit: cover; border-radius: 0; margin-bottom: 20px; }
.hero-meta { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; }
.cat-label, .cat-label a { background: #0056b3; color: #fff !important; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.hero-title { font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0 0 15px 0; color: #111; }
.hero-excerpt { font-size: 16px; color: #555; line-height: 1.6; margin-bottom: 20px; }

/* Кнопка Читать далее */
.read-more-wrap { margin-top: 15px; display: inline-block; }
.more-link { background: #0056b3; color: #fff !important; padding: 8px 20px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; }

/* --- 4. ЗАГОЛОВКИ БЛОКОВ --- */
.section-title, .cat-name, .widget-title, .lenta-title {
    font-size: 16px !important; font-weight: 900 !important; text-transform: uppercase; letter-spacing: 0.5px;
    color: #111 !important; background: transparent !important;
    border-bottom: 2px solid #0056b3; padding: 0 0 8px 0 !important; margin: 0 0 20px 0 !important;
    line-height: 1; display: block; width: 100%;
}

/* --- 5. ЛЕНТА (Слева) --- */
.lenta-col { border-right: 1px solid #f3f4f6; padding-right: 20px; }
.lenta-item { padding: 10px 0; border-bottom: 1px solid #f3f4f6; display: flex; gap: 12px; align-items: flex-start; }
.lenta-meta { display: flex; flex-direction: column; align-items: center; min-width: 45px; flex-shrink: 0; line-height: 1; }
.l-date { font-weight: 800; color: #0056b3; font-size: 13px; margin-bottom: 3px; }
.l-time { font-size: 10px; color: #9ca3af; font-weight: 500; }
.lenta-link { font-size: 14px; line-height: 1.35; color: #374151; font-weight: 500; }

/* --- 6. БЛОКИ КАТЕГОРИЙ (Центр) --- */
.cat-block { margin-top: 30px; margin-bottom: 40px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.cat-thumb { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
.cat-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0 0 5px 0; }

/* --- 7. САЙДБАР (Справа) --- */
.sidebar-box { background: #fff; padding: 0; margin-bottom: 40px; }
.sidebar-item { display: flex; gap: 12px; margin-bottom: 15px; border-bottom: 1px solid #f3f4f6; padding-bottom: 15px; align-items: flex-start; }
.side-thumb { width: 90px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.side-thumb-placeholder { width: 90px; height: 60px; background: #f1f1f1; border-radius: 4px; flex-shrink: 0; }
.side-title { font-size: 13px; font-weight: 700; line-height: 1.35; margin: 0 0 4px 0; color: #111; }
.side-meta { font-size: 11px; color: #999; font-weight: 600; }

/* --- 8. ПОЛНАЯ НОВОСТЬ (ВОССТАНОВЛЕНА) --- */
.single-grid { margin-top: 30px; grid-template-columns: 2fr 1fr; display: grid; gap: 40px; }
.entry-header { margin-bottom: 25px; }
.entry-title { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 15px 0; color: #111; }
.post-meta-top { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.post-meta-top .date { color: #666; font-size: 13px; }
.post-thumbnail img { width: 100%; border-radius: 8px; margin-bottom: 30px; }

/* Текст новости */
.entry-content { font-size: 18px; line-height: 1.8; color: #374151; }
.entry-content p { margin-bottom: 25px; }
.entry-content h2 { font-size: 26px; font-weight: 800; margin-top: 40px; margin-bottom: 20px; }
.entry-content blockquote { border-left: 4px solid #0056b3; padding: 15px 20px; background: #f8fafc; font-style: italic; margin: 30px 0; }
.entry-content ul li::before { content: "■"; color: #0056b3; margin-right: 10px; font-size: 10px; } 

/* Теги */
.tags-container { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.tags-container a { display: inline-block; background: #f3f4f6; color: #555 !important; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-right: 5px; }
.tags-container a:hover { background: #0056b3; color: #fff !important; }

/* Комментарии */
.comments-area { margin-top: 50px; background: #fff; padding: 30px; border: 1px solid #e5e7eb; border-radius: 8px; }
#reply-title { font-size: 18px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid #0056b3; padding-bottom: 10px; margin-bottom: 20px; }
.comment-form textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 6px; background: #f9f9f9; }
.form-submit .submit { background: #0056b3; color: #fff; padding: 12px 30px; border: none; border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer; margin-top: 15px; }

/* --- 9. ФУТЕР --- */
.site-footer { background: #1f2937; color: #9ca3af; margin-top: 60px; border-top: 4px solid #0056b3; }
.footer-main { padding: 50px 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.f-logo-box { background: #fff; color: #1f2937; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; font-size: 24px; font-weight: 900; border-radius: 4px; }
.f-title { font-size: 20px; font-weight: 900; color: #fff; text-transform: uppercase; }
.footer-title { color: #fff; font-size: 16px; text-transform: uppercase; margin-bottom: 20px; font-weight: 700; }
.site-footer a { color: #d1d5db !important; }
.footer-bottom { background: #111827; padding: 20px 0; text-align: center; font-size: 13px; }

/* --- 10. АДАПТИВ --- */
@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr; gap: 30px; }
    .lenta-col { border-right: none; border-bottom: 1px solid #e5e7eb; padding-bottom: 20px; }
    .banner-placeholder { width: 100%; height: auto; padding: 20px; }
    .single-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    .big-search-field { width: 100%; }
    .header-search-area { width: 100%; margin-top: 10px; }
    .cat-grid, .footer-grid { grid-template-columns: 1fr; }
    .top-bar { display: none; }
}

/* --- ФИКС МЕНЮ (ЧТОБЫ ТЕКСТ БЫЛ БЕЛЫМ) --- */
.main-navigation a:hover {
    color: #ffffff !important; /* Принудительно белый текст */
    background-color: rgba(255,255,255,0.15); /* Чуть высветляем фон кнопки */
}

/* На всякий случай фикс для текущей активной страницы в меню */
.main-navigation .current-menu-item > a {
    background-color: rgba(0,0,0,0.2);
    color: #ffffff !important;
}

/* --- ФИКС ВСЕХ СИНИХ КНОПОК (ЧТОБЫ ТЕКСТ БЫЛ БЕЛЫМ) --- */

/* 1. Кнопка "Читати далі" */
.more-link:hover {
    color: #ffffff !important;
    background-color: #004494 !important; /* Чуть темнее при наведении */
}

/* 2. Метки категорий (над заголовками) */
.cat-label a:hover {
    color: #ffffff !important;
    opacity: 0.9;
    text-decoration: none !important;
}

/* 3. Кнопка Поиска в шапке */
.big-search-submit:hover {
    color: #ffffff !important;
    background-color: #004494 !important;
}

/* 4. Кнопка отправки комментария */
.form-submit .submit:hover {
    color: #ffffff !important;
    background-color: #004494 !important;
}

/* 5. Стрелки слайдера (на всякий случай) */
.swiper-button-next:hover, 
.swiper-button-prev:hover {
    color: #ffffff !important;
}

/* --- ФИКС ДВОЙНЫХ МАРКЕРОВ В СПИСКАХ --- */
.entry-content ul, 
.entry-content ul li {
    list-style: none !important;       /* Убираем точку */
    list-style-type: none !important;  /* Убираем тип точки */
    list-style-image: none !important; /* Убираем картинку точки */
}

/* --- КРАСИВАЯ ПАНЕЛЬ АВТОРИЗАЦИИ В КОММЕНТАРИЯХ --- */

/* 1. Сам блок с текстом */
.logged-in-as {
    background: #f8fafc;        /* Светлый фон */
    border-left: 3px solid #0056b3; /* Синий акцент слева */
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* 2. Ссылки превращаем в кнопки (Редагувати, Вийти) */
.logged-in-as a {
    display: inline-block;
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 4px 12px;
    border-radius: 20px; /* Овальные кнопки */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Ховер на кнопках */
.logged-in-as a:hover {
    border-color: #0056b3;
    color: #0056b3 !important;
    transform: translateY(-1px);
}

/* 3. Имя пользователя (делаем жирным) */
.logged-in-as a:first-child {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 14px;
    font-weight: 800;
    color: #000 !important;
    text-transform: none;
}
.logged-in-as a:first-child:hover {
    transform: none;
    color: #0056b3 !important;
}

/* 4. Надпись "Коментар *" над полем */
.comment-form-comment label {
    display: block !important; /* Возвращаем, но стилизуем */
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* 5. Убираем лишний текст "Обов'язкові поля..." если получится */
.comment-notes {
    font-size: 0; /* Скрываем текст */
    margin: 0;
    padding: 0;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ (ФИНАЛ) --- */

/* Скрываем кнопку меню на ПК */
.menu-toggle, .mobile-search { display: none; }

@media (max-width: 900px) {
    
    /* 1. ШАПКА */
    .header-row { padding: 10px 0; }
    .desktop-search { display: none; } /* Прячем большой поиск */
    
    /* Гамбургер кнопка */
    .menu-toggle {
        display: flex; flex-direction: column; gap: 5px;
        background: none; border: none; cursor: pointer; padding: 10px;
        margin-left: auto; /* Прижать вправо */
    }
    .menu-toggle span {
        display: block; width: 25px; height: 3px; background: #111; border-radius: 2px; transition: 0.3s;
    }
    
    /* Анимация крестика */
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Скрытое меню */
    .header-nav {
        display: none; /* Скрыто по умолчанию */
        background: #1e293b !important; /* Темный фон для мобильного меню */
        padding: 20px 0;
    }
    .header-nav.toggled { display: block; animation: fadeIn 0.3s; }
    
    .main-navigation ul {
        flex-direction: column; /* Вертикальный список */
        width: 100%;
    }
    .main-navigation a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 15px 0;
    }

    /* Поиск в меню */
    .mobile-search { display: block; margin-bottom: 20px; }
    .mobile-search form { display: flex; background: rgba(255,255,255,0.1); padding: 5px; border-radius: 4px; }
    .mobile-search input { width: 100%; background: transparent; border: none; color: #fff; padding: 5px; outline: none; }
    .mobile-search button { background: none; border: none; color: #fff; font-size: 18px; }

    /* 2. ПЕРЕСТАНОВКА БЛОКОВ (ГЛАВНОЕ) */
    .main-grid {
        display: flex;          /* Переключаем Grid на Flex */
        flex-direction: column; /* Все в одну колонку */
    }

    main { order: 1; width: 100%; min-width: 0; }       /* Слайдер и блоки - ПЕРВЫЕ */
    .lenta-col { order: 2; width: 100%; border: none; } /* Лента - ВТОРАЯ */
    aside { order: 3; width: 100%; }                    /* Сайдбар - ТРЕТИЙ */

    /* 3. УЛУЧШЕНИЯ ВНЕШНЕГО ВИДА */
    .hero-img { height: 250px; } /* Уменьшаем высоту слайдера */
    .hero-title { font-size: 22px; }
    
    /* Лента */
    .lenta-col { margin-top: 40px; border-top: 4px solid #111; padding-top: 20px; }
    .section-title { font-size: 20px !important; margin-bottom: 15px !important; }
    
    /* Сетки внутри рубрик */
    .cat-grid { grid-template-columns: 1fr; } /* Одна колонка новостей */
    .cat-post { flex-direction: row; gap: 15px; align-items: flex-start; } /* Картинка слева, текст справа */
    .cat-thumb { width: 120px; height: 80px; margin-bottom: 0; flex-shrink: 0; }
    .cat-title { font-size: 15px; margin: 0; }
    
    /* Сайдбар */
    .side-thumb { width: 70px; height: 50px; }
    
    /* Футер */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { justify-content: center; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- ФИКСЫ ДЛЯ МОБИЛЬНОГО ВИДА --- */

@media (max-width: 768px) {
    
    /* 1. Уменьшаем стрелки слайдера, чтобы не перекрывали контент */
    .swiper-button-next, .swiper-button-prev {
        width: 30px !important;
        height: 30px !important;
        background: rgba(0,0,0,0.5) !important; /* Более темный фон для контраста */
    }
    .swiper-button-next::after, .swiper-button-prev::after {
        font-size: 12px !important;
    }
    
    /* 2. Поднимаем стрелки чуть выше, на уровень картинки */
    .swiper-button-next, .swiper-button-prev {
        top: 35% !important; /* Было 50%, поднимаем к картинке */
    }

    /* 3. Убираем лишние отступы у заголовка новости на мобильном */
    .hero-title {
        font-size: 18px; /* Чуть меньше шрифт */
        margin-top: 5px;
    }
    
    /* 4. Отступ между меню (Гамбургером) и слайдером */
    .hero-slider {
        margin-top: 10px; 
    }
}

/* --- ФИКС МОБИЛЬНОГО МЕНЮ --- */

@media (max-width: 900px) {
    /* Поднимаем кнопку над всем остальным */
    .menu-toggle {
        z-index: 1001; 
        position: relative;
    }

    /* Когда меню открыто (класс toggled), показываем его */
    .header-nav.toggled {
        display: block !important;
        position: absolute;
        top: 100%; /* Сразу под шапкой */
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Убедимся, что шапка относительна, чтобы меню выпадало от нее */
    .header-main {
        position: relative;
    }
}

/* --- ФИКС ПОЗИЦИИ МОБИЛЬНОГО МЕНЮ --- */

/* 1. Делаем шапку "якорем" для меню */
.site-header {
    position: relative !important; /* Это самое главное! */
    z-index: 1002;
}

@media (max-width: 900px) {
    /* 2. Настраиваем выпадашку */
    .header-nav.toggled {
        position: absolute;
        top: 100%; /* Ровно под шапкой */
        left: 0;
        right: 0;
        background: #0056b3 !important; /* Синий фон */
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
        z-index: 9999;
        padding: 0;
    }

    /* Ссылки в мобильном меню */
    .main-navigation a {
        display: block;
        padding: 15px 20px;
        color: #fff !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 16px;
        font-weight: 700;
        text-align: left; /* Текст слева */
    }
    
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Поле поиска в мобильном меню */
    .mobile-search {
        padding: 15px 20px;
        background: rgba(0,0,0,0.1);
        margin: 0;
    }
}

/* --- ФИКС ПУСТОТЫ В ШАПКЕ НА МОБИЛЬНОМ --- */

@media (max-width: 768px) {
    
    /* 1. Выстраиваем Лого и Кнопку в ОДНУ линию */
    .header-row {
        flex-direction: row !important; /* Было column, делаем строку */
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* 2. Уменьшаем высоту белого блока шапки */
    .header-main {
        padding: 5px 0 !important; /* Минимальный отступ */
    }

    /* 3. Уменьшаем логотип для телефона */
    .site-logo img {
        max-height: 40px !important; /* Компактнее */
    }
    
    /* Текстовый логотип (если картинки нет) */
    .logo-title { font-size: 20px !important; }
    .logo-box { width: 35px !important; height: 35px !important; font-size: 20px !important; }

    /* 4. Убираем отступ ПОД шапкой до контента */
    header.site-header {
        margin-bottom: 0 !important; /* Прижимаем к слайдеру */
        border-bottom: 1px solid #eee !important;
    }

    /* 5. Убеждаемся, что слайдер начинается сразу */
    .main-grid {
        margin-top: 0 !important;
        gap: 20px !important; /* Уменьшаем дыры между блоками */
    }
    
    /* Кнопка меню (гамбургер) */
    .menu-toggle {
        padding: 5px !important;
        margin: 0 !important;
    }
}

/* --- ФИКС ФУТЕРА (МОБИЛЬНЫЙ) --- */

@media (max-width: 768px) {
    /* 1. Выравнивание логотипа по центру */
    .footer-logo {
        justify-content: center; /* Иконка и текст по центру */
        text-align: left;        /* Текст внутри блока - слева от иконки */
    }
    
    .f-logo-text {
        align-items: flex-start; /* Прижимаем "Ужгород" и "Европейский" влево друг к другу */
    }

    /* 2. Убираем точку возле списка контактов */
    .footer-contacts, .footer-nav ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .footer-contacts li, .footer-nav li {
        margin-bottom: 15px;
    }
    
    /* Принудительно убираем любые псевдо-элементы (точки/квадраты) */
    .site-footer li::before {
        content: none !important;
        display: none !important;
    }

    /* 3. Отступы */
    .footer-main {
        padding: 40px 20px;
    }
    
    .f-col {
        margin-bottom: 30px; /* Расстояние между блоками футера */
    }
}

/* --- ФИНАЛЬНЫЙ РЕМОНТ ФУТЕРА (МОБИЛЬНЫЙ) --- */

@media (max-width: 768px) {
    
    /* 1. Чиним Логотип (Делаем в ряд) */
    .footer-logo {
        flex-direction: row !important; /* Иконка и текст в ряд */
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .f-logo-text {
        align-items: flex-start !important; /* Текст выравниваем влево */
        text-align: left !important;
    }
    
    /* Исправляем наложение текста */
    .f-title {
        font-size: 24px !important;
        line-height: 1 !important;
        display: block !important;
        margin-bottom: 5px !important; /* Отступ снизу */
    }
    .f-desc {
        font-size: 11px !important;
        line-height: 1 !important;
        display: block !important;
        white-space: nowrap; /* Запрещаем перенос */
    }

    /* 2. Убиваем точки в списках (Намертво) */
    .site-footer ul, 
    .site-footer li {
        list-style: none !important;
        list-style-type: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Скрываем любые псевдо-элементы (квадратики/точки) */
    .site-footer li::before,
    .site-footer li::after {
        content: none !important;
        display: none !important;
    }
    
    /* Центрируем пункты меню */
    .footer-nav li, .footer-contacts li {
        text-align: center;
        margin-bottom: 12px !important;
    }
    
    /* 3. Уменьшаем отступы */
    .footer-main { padding: 30px 20px !important; }
    .f-col { margin-bottom: 40px !important; }
    .f-col:last-child { margin-bottom: 0 !important; }
}

/* --- ФИНАЛЬНЫЙ ФИКС ЛОГОТИПА И СПИСКОВ (МОБИЛЬНЫЙ) --- */

@media (max-width: 768px) {
    
    /* 1. Логотип: Жесткое разделение */
    .footer-logo {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important; /* Явный отступ между буквой У и текстом */
    }
    
    .f-logo-box {
        flex-shrink: 0 !important; /* Запрещаем сжимать квадрат */
    }
    
    .f-logo-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    /* Исправляем перекрытие текста */
    .f-title {
        font-size: 22px !important;
        line-height: 1 !important;
        margin-bottom: 4px !important;
        display: block !important;
    }
    .f-desc {
        font-size: 10px !important;
        line-height: 1 !important;
        display: block !important;
        white-space: nowrap !important; /* Запрещаем перенос строк */
    }

    /* 2. Списки (Розділи) - делаем их видимыми и ровными */
    .footer-nav ul, .footer-contacts {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .footer-nav li, .footer-contacts li {
        width: 100%;
        text-align: center;
        margin-bottom: 12px !important;
        list-style: none !important;
    }
    
    .footer-nav li a {
        display: block;
        padding: 5px;
    }
}

/* --- ФИКС КАРТИНОК В БЛОКАХ (МОБИЛЬНЫЙ) --- */

@media (max-width: 768px) {
    
    /* 1. Превращаем строку в колонку */
    .cat-post {
        flex-direction: column !important; /* Картинка сверху, текст снизу */
        border-bottom: 1px solid #eee;     /* Разделитель между новостями */
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    /* 2. Растягиваем картинку на всю ширину */
    .cat-img-wrap {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
    
    .cat-thumb {
        width: 100% !important;
        height: 200px !important; /* Фиксированная высота для красоты */
        object-fit: cover;        /* Обрезаем лишнее, чтобы не плющило */
        border-radius: 6px;
    }
    
    /* 3. Увеличиваем заголовок для удобства */
    .cat-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }
    
    /* Убираем отступ у последней новости в блоке */
    .cat-post:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

/* --- ФИКС ФУТЕРА (ГЛОБАЛЬНЫЙ РЕМОНТ) --- */

/* 1. Логотип: Ставим текст друг под другом */
.footer-logo {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important; /* Отступ от иконки до текста */
}

.f-logo-text {
    display: flex !important;
    flex-direction: column !important; /* Текст СТОЛБИКОМ */
    justify-content: center !important;
    align-items: flex-start !important;
}

.f-title {
    display: block !important;
    line-height: 1 !important;
    margin-bottom: 3px !important; /* Отступ между словами */
}

.f-desc {
    display: block !important;
    line-height: 1 !important;
    margin-top: 0 !important;
}

/* 2. Списки: Убираем точки везде */
.site-footer ul, 
.site-footer li {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Скрываем маркеры (квадратики/кружочки) */
.site-footer li::before {
    content: none !important;
    display: none !important;
}

/* 3. Выравнивание колонок */
.f-col {
    vertical-align: top;
}

/* --- УМЕНЬШЕНИЕ ШРИФТОВ НА МОБИЛЬНОМ --- */

@media (max-width: 768px) {
    
    /* 1. Заголовок новости */
    .entry-title {
        font-size: 22px !important; /* Было огромным, станет аккуратным */
        line-height: 1.3 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    /* 2. Основной текст статьи */
    .entry-content {
        font-size: 16px !important; /* Самый комфортный размер для глаз */
        line-height: 1.6 !important;
    }

    /* 3. Подзаголовки внутри статьи */
    .entry-content h2 {
        font-size: 20px !important;
        margin-top: 30px !important;
        margin-bottom: 15px !important;
    }
    
    /* 4. Мета-данные (дата, просмотры) */
    .post-meta-top {
        font-size: 12px !important;
        margin-bottom: 15px !important;
        padding-bottom: 15px !important;
    }
}

/* --- ФИКС КАРТИНОК ВНУТРИ СТАТЬИ --- */

/* Применяем стиль ко всем картинкам внутри контента, 
   включая стандартные блоки Gutenberg и классический редактор */
.entry-content img,
.entry-content figure img,
.wp-block-image img {
    border-radius: 8px !important;           /* Закругление */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Легкая тень */
    height: auto;
    max-width: 100%;
}

/* Убираем лишние отступы у контейнеров картинок */
.entry-content figure {
    margin: 30px 0;
}

/* --- ПАГИНАЦИЯ (ФИНАЛЬНЫЙ ФИКС С !IMPORTANT) --- */

.pagination-wrapper {
    margin: 60px 0 80px 0 !important;
    text-align: center !important;
    border-top: 1px solid #f3f4f6 !important;
    padding-top: 40px !important;
}

.nav-links {
    display: inline-flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.page-numbers {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 45px !important;
    height: 45px !important;
    padding: 0 10px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* Активная страница */
.page-numbers.current {
    background: #0056b3 !important;
    color: #fff !important;
    border-color: #0056b3 !important;
    cursor: default !important;
}

/* Стрелки (SVG) */
.page-numbers svg {
    width: 20px !important;
    height: 20px !important;
}

/* Точки (...) */
.page-numbers.dots {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    cursor: default !important;
}

/* --- ФИКС ФУТЕРА: КЛИКАБЕЛЬНЫЙ ЛОГОТИП --- */
.site-footer .footer-logo-link {
    display: block;
    text-decoration: none !important;
}

.site-footer .footer-logo-link:hover .footer-logo {
    opacity: 0.9;
}

/* --- ФИКС ЛОГОТИПА В ФУТЕРЕ (КЛИКАБЕЛЬНОСТЬ ТОЛЬКО НА ЛОГО) --- */

.footer-logo-link {
    display: block !important;
    text-decoration: none !important;
    padding-bottom: 15px; /* Отступ от лого до описания */
}

.footer-logo {
    transition: opacity 0.2s ease; /* Эффект только на сам лого-блок */
}

/* Скрываем подчеркивание и цвет при наведении на описание */
.footer-about {
    color: #9ca3af !important;
    text-decoration: none !important;
}

/* Убираем эффект hover с описания, чтобы оно не меняло цвет */
.branding-col p:hover {
    color: #9ca3af !important;
    text-decoration: none !important;
}

.footer-logo-link:hover .footer-logo {
    opacity: 0.8; /* При наведении лого чуть блекнет, но текст описания не трогаем */
}
.footer-logo-link:hover .f-title {
    color: #fff !important; /* Текст логотипа остается белым */
}

/* Убираем сдвиг вправо у ссылок, но оставляем сдвиг лого */
.site-footer .f-col a:hover {
    padding-left: 0px !important;
}

/* --- ФИНАЛЬНЫЙ ФИКС ЛИНИЙ НА СТРАНИЦЕ "ПРО НАС" --- */

/* Скрываем все линии в шапке страницы */
.page .entry-header, 
.page .entry-header h1 {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Добавляем отступ только от текста */
.page .entry-content {
    margin-top: 20px !important; 
}

/* Убираем лишний отступ у контейнера */
.page .container {
    margin-top: 20px !important;
}

/* --- КНОПКА ВВЕРХ (Scroll to Top) --- */
#scrollToTopBtn {
    display: none; /* Скрыто по умолчанию */
    position: fixed; /* Фиксированное положение */
    bottom: 25px; /* Отступ от низа */
    right: 25px; /* Отступ справа */
    z-index: 999; /* Поверх всего */
    
    background-color: #0056b3; /* Цвет бренда */
    color: white;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%; /* Круглая форма */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#scrollToTopBtn:hover {
    background-color: #004494; /* Темнее при наведении */
    transform: scale(1.1);
}

#scrollToTopBtn svg {
    /* Настраиваем иконку стрелки */
    width: 20px;
    height: 20px;
}

/* На мобильном можно сделать чуть больше */
@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 15px;
        right: 15px;
        padding: 12px;
    }
}

/* --- КНОПКА ВВЕРХ (Scroll to Top) - ПОЛУПРОЗРАЧНОСТЬ --- */
#scrollToTopBtn {
    /* Было background-color: #0056b3;, меняем на RGBA */
    background-color: rgba(0, 86, 179, 0.7) !important; /* Синий с 70% прозрачностью */
    
    /* Добавляем эффект "Размытия" для красоты (как в iOS) */
    backdrop-filter: blur(5px);
}

#scrollToTopBtn:hover {
    /* При наведении делаем полностью непрозрачной */
    background-color: #004494 !important; /* Темный синий */
    transform: scale(1.1);
}

/* Убираем лишние стили для чистоты */
#scrollToTopBtn {
    transition: all 0.3s ease;
}

/* --- ФИКС СПИСКОВ (ЧТОБЫ КВАДРАТИКИ БЫЛИ РОВНО) --- */

/* 1. Убираем отступы у параграфов внутри списка */
.entry-content ul li p {
    margin-top: 0 !important;    /* Убираем отступ сверху */
    margin-bottom: 5px !important; /* Небольшой отступ снизу */
    display: inline-block;       /* Чтобы вело себя как текст */
}

/* 2. Точная подгонка квадратика */
.entry-content ul li::before {
    top: 9px !important; /* Подгоняем высоту под первую строку текста */
}

/* 3. На всякий случай для списков без параграфов */
.entry-content ul li {
    line-height: 1.6;
}

/* --- ФИНАЛЬНЫЙ ФИКС СПИСКОВ (FLEXBOX) --- */

/* 1. Делаем сам пункт списка гибким контейнером */
.entry-content ul li {
    display: flex !important;        /* Включаем Flexbox */
    align-items: flex-start !important; /* Выравниваем по верху */
    padding-left: 0 !important;      /* Убираем старые отступы */
}

/* 2. Настраиваем синий квадрат */
.entry-content ul li::before {
    content: "" !important;
    display: block !important;
    flex-shrink: 0 !important;       /* Запрещаем сжиматься */
    width: 8px !important;
    height: 8px !important;
    background-color: #0056b3 !important;
    border-radius: 2px !important;
    
    /* Позиционирование */
    position: static !important;     /* Отключаем абсолютное позиционирование */
    margin-right: 12px !important;   /* Отступ от квадрата до текста */
    margin-top: 10px !important;     /* Сдвигаем вниз, чтобы встал ровно по первой строке */
}

/* 3. Убираем отступы у текста, чтобы он прижался к квадрату */
.entry-content ul li p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* --- УМЕНЬШЕНИЕ ЗАГОЛОВКА СТАТЬИ --- */
.single-grid .entry-title {
    font-size: 28px !important; /* Было 34px, стало 28px */
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
}

/* На мобильном тоже чуть аккуратнее */
@media (max-width: 768px) {
    .single-grid .entry-title {
        font-size: 22px !important;
        line-height: 1.35 !important;
    }
}

/* --- ФИКС СТАТИЧЕСКИХ СТРАНИЦ --- */

/* 1. Узкий контейнер для текста (чтобы читать было удобно) */
.page-container {
    max-width: 850px !important;
    margin-top: 40px !important;
    margin-bottom: 60px !important;
}

/* 2. Размер заголовка (делаем 28px, как в новостях) */
.page-container .entry-title {
    font-size: 28px !important;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 30px !important;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; /* Тонкая линия разделителя */
}

/* 3. Фикс контента */
.page-container .entry-content {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

/* 4. ФИКС СЕРОЙ ПОЛОСЫ (TOP BAR) */
/* Гарантируем, что она всегда ровная и на всю ширину */
.top-bar {
    width: 100%;
    display: block;
}
.top-bar .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 30px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* --- ФИНАЛЬНЫЙ РЕМОНТ СЕРОЙ ПОЛОСЫ (TOP BAR FIX) --- */

/* 1. Сбрасываем жесткую высоту, которая ломала верстку */
.top-bar, 
.top-bar .container,
.top-bar-inner {
    height: auto !important;
    min-height: 0 !important;
}

/* 2. Задаем высоту только отступами (так надежнее) */
.top-bar {
    padding: 10px 0 !important; /* Одинаковый отступ сверху и снизу */
    display: flex !important;
    align-items: center !important;
}

/* 3. Центрируем содержимое */
.top-bar .container {
    display: flex !important;
    align-items: center !important; /* Самое важное: вертикальный центр */
    justify-content: space-between !important;
    width: 100% !important;
}

/* 4. Убираем лишние отступы у текста внутри */
.top-left, .top-right, .top-date, .contact-link {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important; /* Чтобы текст не прыгал */
}

/* 5. Фикс скроллбара (оставляем, чтобы сайт не дергался) */
html {
    overflow-y: scroll !important;
}

/* --- ЖЕСТКАЯ ФИКСАЦИЯ СЕРОЙ ПОЛОСЫ (TOP BAR) --- */

/* 1. Задаем строгую высоту для контейнера */
.top-bar {
    height: 32px !important;      /* Фиксируем высоту */
    min-height: 32px !important;  /* Запрещаем сжиматься */
    max-height: 32px !important;  /* Запрещаем расти */
    padding: 0 !important;        /* Убираем все отступы */
    overflow: hidden !important;  /* Обрезаем все, что вылезает */
    display: flex !important;
    align-items: center !important;
}

/* 2. Задаем строгую высоту для внутреннего блока */
.top-bar-inner,
.top-bar .container {
    height: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 auto !important;
}

/* 3. Заставляем текст и ссылки быть ровно по центру этой высоты */
.top-left, 
.top-right, 
.top-date, 
.contact-link {
    height: 32px !important;
    line-height: 32px !important; /* Центрирование текстом */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
}

/* Убираем возможные паразитные отступы у ссылок */
.contact-link {
    display: inline-block !important;
}

/* --- ФИКС "СПЛЮСНУТЫХ" СПИСКОВ --- */

/* 1. Увеличиваем высоту строки и отступы */
.entry-content ul li,
.entry-content ul li p {
    line-height: 1.8 !important;    /* Как в основном тексте */
    margin-bottom: 12px !important; /* Воздух между пунктами */
}

/* 2. Подгоняем квадратик под новый размер текста */
.entry-content ul li::before {
    margin-top: 11px !important;    /* Чуть ниже, чтобы было по центру строки */
}

/* --- ФИКС КНОПКИ ВВЕРХ (МОБИЛЬНАЯ ВЕРСИЯ) --- */

/* 1. Запрещаем горизонтальную прокрутку сайта (чтобы кнопку не уносило) */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
}

/* 2. Жесткая фиксация кнопки на мобильных */
@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 20px !important;   /* Отступ снизу */
        right: 15px !important;    /* Отступ справа (ближе к краю) */
        
        /* Фиксируем размер, чтобы она не сплющивалась */
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        
        /* Центрируем стрелку внутри */
        display: none; /* JS сам включит flex/block, но по умолчанию скрыто */
        align-items: center;
        justify-content: center;
        
        /* Поверх всего (даже меню и админ-бара) */
        z-index: 99999 !important;
        
        /* Аппаратное ускорение (лечит исчезновение при скролле на iPhone/Android) */
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
    
    /* Когда JS показывает кнопку, мы принудительно делаем её Flex, чтобы стрелка была по центру */
    #scrollToTopBtn[style*="display: block"] {
        display: flex !important;
    }
}

/* --- СТИЛИ ДЛЯ ВНУТРЕННЕГО БЛОКА "ВАС МОЖЕ ЗАЦІКАВИТИ" --- */
.inline-related-box {
    margin: 30px 0;
    padding: 20px 25px;
    background-color: #f0f7ff; /* Очень светлый синий оттенок */
    border-left: 4px solid #0056b3; /* Акцентная линия слева */
    border-radius: 0 8px 8px 0;
}

.inline-related-box .related-title {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    color: #0056b3 !important;
    letter-spacing: 0.5px;
}

.inline-related-box ul {
    margin: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.inline-related-box li {
    margin-bottom: 10px !important;
    padding-left: 20px !important;
    position: relative;
    line-height: 1.4 !important;
}

/* Маркеры-стрелочки для этого блока */
.inline-related-box li::before {
    content: "➤" !important; /* Или просто стрелочка */
    color: #0056b3;
    position: absolute;
    left: 0;
    top: 2px;
    width: auto !important;
    height: auto !important;
    background: none !important;
    font-size: 12px;
}

.inline-related-box a {
    font-weight: 600;
    color: #111;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 86, 179, 0.2);
    transition: 0.2s;
}

.inline-related-box a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* --- ФИКС БЛОКА "ВАС МОЖЕ ЗАЦІКАВИТИ" НА МОБИЛЬНОМ --- */
@media (max-width: 768px) {
    .inline-related-box {
        display: block !important;
        width: 100% !important;      /* На всю ширину */
        float: none !important;      /* Отключаем обтекание */
        margin: 20px 0 !important;   /* Отступы сверху и снизу */
        clear: both !important;      /* Запрещаем соседей по бокам */
    }
}
