/*
Theme Name: kvasyliv
Description: Новинний портал
Author: MyTeam
Author URI: https://myteam.in.ua
Template: generatepress
Version: 1.0.0
Text Domain: kvasyliv
*/
/* --- Змінні кольорів --- */
:root {
    --brand-green: #84BD3E; /* Колір з вашої картинки */
    --text-dark: #111111;
    --border-color: #eeeeee;
}

/* --- Контейнер 1: Top Bar --- */
.header-top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 13px;
    text-transform: uppercase;
}
.kvasyliv-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}
.top-menu-list a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

/* --- Контейнер 2: Main Brand (Зелений) --- */
.header-main-brand {
    background-color: var(--brand-green);
    padding: 5px 0;
    text-align: center; /* Або left, залежно від дизайну */
}
.header-main-brand .site-logo img {
    max-height: 64px;
    width: auto;
}
.header-main-brand h1 a {
    color: #000;
    text-decoration: none;
    font-weight: 900;
}

/* --- Контейнер 3: Bottom Nav --- */
.header-bottom-nav {
    background-color: #ffffff;
    border-bottom: 2px solid var(--text-dark); /* Відділяємо від контенту як на Главкомі */
}
.main-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    font-weight: bold;
    text-transform: uppercase;
    justify-content: space-around;
}
.main-menu-list a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
        font-size: 16px;
}
.main-menu-list a:hover {
    background: var(--brand-green);
    color: white;
}
/* ==========================================================================
   ГЛОБАЛЬНІ НАЛАШТУВАННЯ ТА БЕЙДЖІ
   ========================================================================== */
.kvasyliv-home-container {
    display: flex;
    max-width: 1400px; /* Максимальна ширина контейнера сайту */
    margin: 30px auto;
    gap: 30px;
    padding: 0 20px;
    box-sizing: border-box;
}

.green-badge {
    background-color: var(--brand-green);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0px;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 25px 0;
    border-left: 5px solid var(--brand-green);
    padding-left: 15px;
    text-transform: uppercase;
}
.section-title a {
    color: var(--text-dark);
    text-decoration: none;
}
.section-title a:hover {
    color: var(--brand-green);
}
/* ==========================================================================
   ЛІВИЙ САЙДБАР (20%) ЗІ СКРОЛОМ
   ========================================================================== */
.home-sidebar-left {
    width: 22%;
    flex-shrink: 0;
}

.sidebar-scroll-wrapper {
/*     position: sticky;
    top: 20px; 
    height: calc(100vh - 40px);  */
/* 	display:block;
    overflow-y: auto; */
    padding-right: 15px;
}

/* Стилізація повзунка скролу (щоб був акуратний) */
.sidebar-scroll-wrapper::-webkit-scrollbar { width: 5px; }
.sidebar-scroll-wrapper::-webkit-scrollbar-track { background: #f1f1f1; }
.sidebar-scroll-wrapper::-webkit-scrollbar-thumb { background: #ccc; border-radius: 5px; }

/* Стандартний вигляд статті в сайдбарі (без фото) */
.sidebar-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-link {
    text-decoration: none;
    display: block;
}
.sidebar-title {
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 5px 0 8px 0;
}
.sidebar-time {
    font-size: 12px;
    color: #888;
    display: block;
}

/* Вигляд статті в сайдбарі З ФОТО (затемнена, текст всередині) */
.sidebar-item.has-photo {
    border-bottom: none;
    padding-bottom: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-item.has-photo .sidebar-link {
    position: relative;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
}
.sidebar-item.has-photo .sidebar-thumb {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
}
/* Затемнення (градієнт) */
.sidebar-item.has-photo .sidebar-thumb::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0) 75%);
}
.sidebar-item.has-photo .sidebar-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 15px;
    z-index: 2; /* Текст поверх градієнту */
}
.sidebar-item.has-photo .sidebar-title { color: #fff; }
.sidebar-item.has-photo .sidebar-time { color: #ccc; }


/* ==========================================================================
   ОСНОВНИЙ КОНТЕНТ (80%)
   ========================================================================== */
.home-main-content {
    width: 78%;
    min-width: 0; /* Запобігає виходу флекс-елементів за межі */
}

/* --- БЛОК 1: ГОЛОВНЕ НА СЬОГОДНІ (70/30) --- */
.hero-grid {
    display: flex;
    gap: 20px;
    height: 480px; /* Фіксована висота головного блоку */
    margin-bottom: 50px;
}
.hero-primary { width: 70%; }
.hero-secondary { width: 30%; display: flex; flex-direction: column; gap: 20px; }

.hero-item {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
}
.hero-primary .hero-item { height: 100%; }
.hero-secondary .hero-item { height: calc(50% - 10px); }

.hero-overlay-link {
    display: block;
    height: 100%;
    position: relative;
    text-decoration: none;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 60%);
}
.hero-overlay-link .top-left {
    position: absolute;
    top: 20px;
    left: 20px;
}
.hero-secondary .hero-item .hero-overlay-link {
   background: linear-gradient(to top, rgb(0 0 0 / 66%) 100%, rgba(0, 0, 0, 0.1) 10%);
}
.hero-text-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 25px;
}
.hero-text-bottom h3 {
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.hero-primary .hero-text-bottom h3 { font-size: 28px; }
.hero-secondary .hero-text-bottom h3 { font-size: 18px; }
.hero-text-bottom time { color: #ccc; font-size: 13px; }

/* --- БЛОК 2: 6 ОСТАННІХ (Грід 2х3) --- */
.recent-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}
.recent-small-item {
    display: flex;
    gap: 15px;
    align-items: center;
}
.recent-thumb {
    width: 110px;
    height: 85px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    flex-shrink: 0;
}
.recent-info h4 { margin: 0 0 8px 0; font-size: 15px; line-height: 1.3; }
.recent-info h4 a { color: var(--text-dark); text-decoration: none; }
.recent-info h4 a:hover { color: var(--brand-green); }
.recent-info time { color: #888; font-size: 12px; }


/* --- БЛОК 3: КАТЕГОРІЇ --- */
.cat-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.cat-thumb {
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: opacity 0.3s;
}
.cat-thumb:hover { opacity: 0.9; }

.cat-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 12px 0;
}
.cat-title a { color: var(--text-dark); text-decoration: none; }
.cat-title a:hover { color: var(--brand-green); }

.inline-badge { margin-bottom: 15px; }

.cat-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #888;
}
.cat-author a{ font-weight: bold; color: var(--brand-green); }
.cat-author a:hover{ font-weight: bold; color: var(--text-dark); }

/* Кнопка "Більше" на всю ширину */
.btn-more-category {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #f4f4f4;
    color: var(--text-dark);
    padding: 15px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
}
.btn-more-category:hover {
    background-color: var(--brand-green);
    color: #fff;
}

/* Роздільник між блоками категорій */
.custom-divider {
    border: none;
    height: 2px;
    background-color: var(--text-dark);
    margin: 50px 0;
}
.cat-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Кількість рядків */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ==========================================================================
   ФУТЕР (ПІДВАЛ САЙТУ)
   ========================================================================== */
.kvasyliv-footer {
    background-color: var(--text-dark); /* Темний фон для контрасту */
    color: #ffffff;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 5px solid var(--brand-green); /* Зелена акцентна лінія з вашого лого */
}

.kvasyliv-footer .footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center; /* Вирівнювання по центру виглядає найакуратніше для такого тексту */
}

.footer-copyright {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-disclaimer {
    font-size: 13px;
    line-height: 1.6;
    color: #aaaaaa; /* Трохи тьмяніший текст, щоб не відволікати від головного */
}
/* ==========================================================================
   СТОРІНКА СТАТТІ (SINGLE)
   ========================================================================== */
.kvasyliv-single-container {
    display: flex;
    max-width: 1400px;
    margin: 40px auto;
    gap: 50px;
    padding: 0 20px;
}

.single-main-content {
    width: 70%;
    min-width: 0;
}

.single-sidebar-right {
    width: 30%;
    flex-shrink: 0;
}

/* --- Оформлення самої статті --- */
.single-title {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.single-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.meta-date { color: #888; font-size: 14px; }

.single-featured-image {
    margin-bottom: 30px;
}
.single-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Оформлення тексту статті */
.single-body {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}
.single-body p { margin-bottom: 20px; }
.single-body h2, .single-body h3 { margin: 30px 0 15px; color: var(--text-dark); }
.single-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 20px 0; }

/* --- Блок "Читайте також" --- */
.read-also-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--text-dark);
}

.read-also-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 колонок */
    gap: 15px;
}

.read-also-thumb {
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
    transition: opacity 0.3s;
}
.read-also-thumb:hover { opacity: 0.9; }

.read-also-item h4 { font-size: 14px; margin: 0 0 5px 0; line-height: 1.3; }

/* --- Сайдбар --- */
.sidebar-widget {
    margin-bottom: 40px;
}
.sidebar-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-post-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-post-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sidebar-post-title {
    display: block;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-dark);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 5px;
}
.sidebar-post-title:hover { color: var(--brand-green); }

/* --- Коментарі (Базовий стиль) --- */
.single-comments-area {
    margin-top: 50px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
}
.comment-reply-title { font-size: 20px; font-weight: bold; margin-bottom: 20px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}
.comment-form input[type="submit"] {
    background-color: var(--brand-green);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.comment-form input[type="submit"]:hover { background-color: #7ab036; }
/* ==========================================================================
   СТОРІНКА КАТЕГОРІЇ (АРХІВ)
   ========================================================================== */
.kvasyliv-archive-container {
    display: flex;
    max-width: 1400px;
    margin: 40px auto;
    gap: 50px;
    padding: 0 20px;
}

.archive-main-content {
    width: 70%;
    min-width: 0;
}

.archive-title {
    margin-bottom: 40px;
    font-size: 32px;
}

/* --- Список статтей --- */
.archive-list-item {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-color); /* Красивий дівайдер */
}
.archive-list-item:last-child {
    border-bottom: none;
}

.archive-item-thumb-link {
    flex-shrink: 0;
    width: 300px; /* Ширина мініатюри */
}
.archive-item-thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    transition: opacity 0.3s;
}
.archive-item-thumb:hover { opacity: 0.9; }

.archive-item-info {
    display: flex;
    flex-direction: column;
}

.archive-item-title {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 10px 0;
}
.archive-item-title a {
    color: var(--text-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.archive-item-title a:hover { color: var(--brand-green); }

.archive-item-excerpt {
    margin: 15px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    flex-grow: 1; /* Виштовхує кнопку вниз */
}

/* --- Кнопка Переглянути --- */
.btn-read-more {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;

    background-color: var(--brand-green);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}
.btn-read-more:hover {
    background-color: #f4f4f4;
    color: var(--text-dark);
}

/* --- Пагінація --- */
.archive-pagination {
    margin-top: 50px;
    text-align: center;
    border-top: 2px solid var(--border-color);
    padding-top: 30px;
}
.archive-pagination .nav-links {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}
.archive-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background-color: #f4f4f4;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: 0.3s;
}
.archive-pagination .page-numbers:hover {
    background-color: #e0e0e0;
}
.archive-pagination .page-numbers.current {
    background-color: var(--brand-green);
    color: #fff;
}
/* ==========================================================================
   СТОРІНКА АВТОРА
   ========================================================================== */
.author-bio-box {
    display: flex;
    gap: 30px;
    align-items: center;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
        border: 1px solid #84bd3e52;
    border-left: 5px solid var(--brand-green);
}

.author-avatar { flex-shrink: 0; }
.author-avatar img {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
}

.author-details {
    flex-grow: 1;
}

.author-name {
    font-size: 26px;
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.author-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}
/* ==========================================================================
   СТОРІНКА ПОШУКУ
   ========================================================================== */
.archive-title span {
    color: var(--brand-green);
}

.search-no-results {
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    border-left: 5px solid #ff4a4a; /* Червона лінія для акценту на помилці */
    font-size: 18px;
    color: #333;
}

/* Оформлення стандартної форми пошуку WordPress */
.custom-search-form form {
    display: flex;
    max-width: 500px;
    gap: 10px;
}
.custom-search-form input[type="search"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
.custom-search-form input[type="submit"] {
    background-color: var(--brand-green);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.custom-search-form input[type="submit"]:hover {
    background-color: #7ab036;
}
/* ==========================================================================
   СТОРІНКА ПОМИЛКИ 404
   ========================================================================== */
.error-404-wrapper {
    background-color: #f9f9f9;
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    border-top: 5px solid var(--brand-green);
}

.error-title {
    font-size: 120px;
    font-weight: 900;
    color: var(--brand-green);
    line-height: 1;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.error-subtitle {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-dark);
    margin: 0 0 20px 0;
}

.error-text {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Коригування форми пошуку всередині 404 */
.error-404-wrapper .custom-search-form form {
    margin: 0 auto;
    justify-content: center;
}
/* Додаткові стилі для статичних сторінок */
.page-body ul, .page-body ol {
    margin-bottom: 25px;
    padding-left: 40px;
}
.page-body li {
    margin-bottom: 10px;
}
.page-body blockquote {
    border-left: 4px solid var(--brand-green);
    padding: 20px;
    background: #f9f9f9;
    font-style: italic;
    margin: 30px 0;
}
/* ==========================================================================
   КАРТА САЙТУ
   ========================================================================== */
.sitemap-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sitemap-section {
    margin-bottom: 50px;
}

.sitemap-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding-left: 15px;
    border-left: 5px solid var(--brand-green);
    text-transform: uppercase;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 2;
    column-gap: 40px;
}

.sitemap-list li {
    margin-bottom: 8px;
    break-inside: avoid;
}

.sitemap-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.sitemap-list a:hover {
    color: var(--brand-green);
}

/* Субменю (для сторінок і категорій) */
.sitemap-list ul {
    margin: 8px 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.sitemap-list ul a {
    font-weight: normal;
}

/* Мобільна версія */
@media (max-width: 768px) {
    .sitemap-list {
        column-count: 1;
    }
    .home-sidebar-left, .single-sidebar-right {
        display: none;
    }
    .single-main-content, .home-main-content, .hero-secondary {
            width: 100%;
    }
    .hero-grid {
        flex-wrap: wrap;
        width: 100%;
		gap: 0px;
    margin-bottom: 0px;
    }
}


/* --- КНОПКА ПОШУКУ --- */
.header-search-box {
    margin-left: 20px;
}
.desktop-search-btn {
    background-color: var(--brand-green);
    color: #fff;
    border: 2px solid var(--brand-green);
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s ease;
    border-radius: 4px;
    padding: 0;
}
.desktop-search-btn:hover {
    background-color: transparent;
    color: var(--brand-green);
}

/* --- ВИЇЖДЖАЮЧА ПАНЕЛЬ ПОШУКУ --- */
.desktop-search-bar {
    background-color: #f4f4f4;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.03);
}
.desktop-search-bar form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
        justify-content: center;
}
button.search-submit {
    background-color: var(--brand-green);
}
.desktop-search-bar input[type="search"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    font-size: 16px;
    border-radius: 4px 0 0 4px;
    outline: none;
    margin: 0;
}
.desktop-search-bar input[type="search"]:focus {
    border-color: var(--brand-green);
}
.desktop-search-bar input[type="submit"] {
    background-color: var(--brand-green);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: 0.3s;
    margin: 0;
}
.desktop-search-bar input[type="submit"]:hover {
    background-color: var(--text-dark);
}
/* ==========================================================================
   ВИПАДАЮЧЕ МЕНЮ (ДЛЯ ВЕРХНЬОГО МЕНЮ - TOP BAR)
   ========================================================================== */

/* 1. Робимо батьківський пункт точкою відліку */
.top-menu-list .menu-item-has-children {
    position: relative !important;
}

/* 2. Глухо ховаємо підменю за замовчуванням */
.top-menu-list .sub-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important; /* Рівно під пунктом "Про сайт" */
    left: 0 !important;
    background-color: #ffffff !important;
    min-width: 200px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 99999 !important; /* Поверх усього */
    border: 1px solid var(--border-color) !important;
    border-top: 3px solid var(--brand-green) !important; /* Зелена смужка зверху */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

/* 3. Показуємо підменю при наведенні мишки */
.top-menu-list .menu-item-has-children:hover > .sub-menu {
    display: block !important;
}

/* 4. Оформляємо пункти всередині підменю (у стовпчик) */
.top-menu-list .sub-menu li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
}
.top-menu-list .sub-menu li:last-child {
    border-bottom: none !important;
}

/* 5. Дизайн посилань ("Карта сайту" тощо) */
.top-menu-list .sub-menu li a {
    display: block !important;
    padding: 10px 15px !important;
    color: var(--text-dark) !important;
    font-size: 13px !important;
    text-transform: none !important; /* Відключаємо великі літери */
    font-weight: 500 !important;
    line-height: 1.4 !important;
    background: transparent !important;
}

.top-menu-list .sub-menu li a:hover {
    background-color: #f9f9f9 !important;
    color: var(--brand-green) !important;
}
/* Додаємо шеврон (стрілочку вниз) для пунктів із підменю */
.menu-item-has-children > a::after {
    content: "\25BE"; /* Юнікод-символ маленького трикутника */
    font-size: 16px;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease; /* Плавна анімація */
}

/* Опціонально: перевертаємо стрілочку при наведенні */
.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}
.top-navigation {
        margin-bottom: -5px;
}
/* ==========================================================================
   БАЗОВІ СТИЛІ ДЛЯ НОВИХ ЕЛЕМЕНТІВ (Приховано на Десктопі)
   ========================================================================== */
.nav-scroll-module { flex-grow: 1; display: flex; align-items: center; }
.main-menu-scroll-container { width: 100%; }
.nav-arrow { display: none; }
.hamburger-box { display: none; }
.mobile-drawer { display: none; }
.drawer-overlay { display: none; }
.header-tools-mobile { display: flex; align-items: center; }


/* ==========================================================================
   МОБІЛЬНА АДАПТАЦІЯ (Планшети та Смартфони)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    
    /* 1. ПРИХОВУЄМО САЙДБАРИ І ВЕРХНІЙ БАР */
    .home-sidebar-left, 
    .single-sidebar-right,
    .header-top-bar {
        display: none !important;
    }

    /* Розтягуємо основний контент на 100% */
    .home-main-content,
    .single-main-content,
    .archive-main-content {
        width: 100% !important;
    }
    
    /* Логотип по центру */
    .header-middle {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px 0;
    }

    /* 2. ШАПКА 80% / 10% / 10% */
    .header-bottom-wrapper {
        padding: 0;
        flex-wrap: nowrap; /* Не дозволяємо падати на новий рядок */
    }

    /* Блок категорій (80%) */
    .nav-scroll-module {
        width: 80%;
        background-color: var(--text-dark);
        display: flex;
        align-items: center;
    }
    
    .nav-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #7b7b7b30;
        color: #fff;
        border: none;
        font-size: 16px;
        padding: 15px 11px;
        cursor: pointer;
    }

    .main-menu-scroll-container {
        flex-grow: 1;
        overflow: hidden; /* Ховаємо те, що не влізло */
    }

    .main-navigation {
        overflow-x: auto;
        white-space: nowrap; /* В один рядок */
        scrollbar-width: none; /* Ховаємо скролбар (Firefox) */
        -ms-overflow-style: none; /* IE */
        scroll-behavior: smooth;
    }
    .main-navigation::-webkit-scrollbar { display: none; } /* Chrome, Safari */

    .main-menu-list {
        display: flex;
        flex-wrap: nowrap;
    }
    .main-menu-list li {
        flex: 0 0 auto; /* Елементи не стискаються */
    }

    /* Відключаємо випадаюче меню на мобілках, бо воно обріжеться overflow: hidden */
    nav.main-navigation ul.main-menu-list ul.sub-menu,
    .menu-item-has-children > a::after {
        display: none !important;
    }
/* ПРИМУСОВО ПОКАЗУЄМО МЕНЮ (Перебиваємо GeneratePress) */
    .main-navigation,
    nav.main-navigation ul.main-menu-list {
        display: flex !important;
    }

    /* Робимо пункти меню білими та зручними для натискання пальцем */
    nav.main-navigation ul.main-menu-list li a {
        color: #ffffff !important;
        padding: 15px 20px !important;
        display: block !important;
        border-right: 1px solid #ffffff30;
    }
    /* Блок інструментів (20%) */
    .header-tools-mobile {
        width: 20%;
        display: flex;
        background-color: var(--text-dark);
    }

    /* Пошук (10%) */
    .header-search-box {
        width: 50%;
        margin-left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    .desktop-search-btn {
        width: 40px; height: 40px; border: none; padding: 0;
    }

    /* Гамбургер (10%) */
    .hamburger-box {
        width: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    .hamburger-btn {
        background: transparent;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 100%; height: 40px;
        cursor: pointer;
    }
    .hamburger-btn span {
        display: block; width: 22px; height: 2px; background: #fff;
    }

    /* 3. МОБІЛЬНА ШТОРКА (DRAWER) */
    .mobile-drawer {
        display: block;
        position: fixed; top: 0; left: -320px;
        width: 300px; height: 100vh;
        background: #fff;
        z-index: 999999;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .mobile-drawer.active { left: 0; }

    .drawer-overlay {
        display: block;
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 999998;
        opacity: 0; pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .drawer-overlay.active { opacity: 1; pointer-events: auto; }

    .drawer-header {
        display: flex; justify-content: space-between; align-items: center;
        border-bottom: 2px solid var(--brand-green);
        padding-bottom: 15px; margin-bottom: 20px;
    }
    .drawer-title { font-size: 20px; font-weight: 900; color: var(--text-dark); text-transform: uppercase; }
    .close-drawer-btn { font-size: 32px; background: none; border: none; cursor: pointer; color: var(--text-dark); line-height: 1; }

    /* Меню всередині шторки */
    .mobile-top-menu-list { list-style: none; padding: 0; margin: 0; }
    .mobile-top-menu-list > li { border-bottom: 1px solid #eee; }
    .mobile-top-menu-list > li > a {
        display: block; padding: 15px 0; color: var(--text-dark); text-decoration: none; font-weight: 700; font-size: 16px;
    }
    /* Підменю у шторці (якщо є) */
    .mobile-top-menu-list .sub-menu { list-style: none; padding-left: 15px; border-top: none; }
    .mobile-top-menu-list .sub-menu li { border-bottom: none; }
    .mobile-top-menu-list .sub-menu li a { padding: 10px 0; font-weight: 600; font-size: 14px; color: var(--text-dark); }

    .drawer-socials { display: flex; gap: 15px; margin-top: 30px; }
    .drawer-socials img { width: 32px; height: 32px; }

    /* 4. ЗАГАЛЬНА АДАПТАЦІЯ СІТОК ТА СПИСКІВ */
    .cat-grid-wrapper,
    .recent-grid-wrapper,
    .read-also-grid,
    .sitemap-list {
        grid-template-columns: 1fr;
        column-count: 1;
    }
    
    .hero-grid { flex-direction: column; height: auto; }
    .hero-primary, .hero-secondary { width: 100%; }
    .hero-primary .hero-item { height: 300px; }
    
    .archive-list-item { flex-direction: column; }
    .archive-item-thumb-link { width: 100%; }
    .header-bottom-nav, nav.main-navigation { background-color: black;}
    .main-menu-list {gap:0px;}
    .nav-links {flex-wrap: wrap;}
}
/* ==========================================================================
   ЗАПОБІЖНИКИ ВІД ГОРИЗОНТАЛЬНОГО СКРОЛУ ТА ЗЛАМУ ВЕРСТКИ
   ========================================================================== */

/* 1. Глобальна заборона вилазити за межі екрану */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* 2. Картинки та відео ніколи не повинні бути більшими за свій контейнер */
img, video, iframe, figure {
    max-width: 100% !important;
    height: auto;
}

/* 3. Довгі слова та посилання (URL) мають автоматично переноситися на новий рядок */
p, a, h1, h2, h3, h4, h5, h6, li, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 4. Таблиці в статтях не повинні ламати екран (додаємо горизонтальний скрол ТІЛЬКИ для таблиці) */
table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
@media (min-width: 745px) {
	.header-main-brand {
		    padding: 0px 0;
	}
	.header-main-brand .site-logo img {
		max-height: 100px;
	}
}