/* --- 1. СТРУКТУРА: ГНУЧКИЙ МАКЕТ --- */
.site-content {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 0 !important;
}

.content-area, .site-main {
    flex: 0 0 68% !important;
    max-width: 68% !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}

#secondary, .widget-area {
    flex: 0 0 32% !important;
    max-width: 32% !important;
    box-sizing: border-box !important;
}

/* --- 2. ПРИХОВУВАННЯ ФОТО ТІЛЬКИ В СТРІЧЦІ НОВИН --- */
.entry-category, .cat-links, .posted-on .cat-links, .entry-meta .category {
    display: none !important;
}
.home .post-thumbnail, 
.home .entry-header img,
.blog .post-thumbnail, 
.blog .entry-header img,
.archive .post-thumbnail,
.archive .entry-header img {
    display: none !important;
}

.home .post, .blog .post, .archive .post {
    padding-top: 0 !important;
}

/* --- СТИЛІЗАЦІЯ НАВІГАЦІЇ В ВІДЖЕТАХ --- */
.widget_nav_menu ul, .widget_pages ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget_nav_menu ul li, .widget_pages ul li {
    padding: 12px 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    transition: all 0.3s ease !important;
}

.widget_nav_menu ul li:last-child, .widget_pages ul li:last-child {
    border-bottom: none !important;
}

.widget_nav_menu ul li a, .widget_pages ul li a {
    text-decoration: none !important;
    color: #4a5568 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    display: block;
    padding-left: 10px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease !important;
}

.widget_nav_menu ul li a:hover, .widget_pages ul li a:hover {
    color: #003366 !important;
    padding-left: 15px !important;
    border-left: 3px solid #d32f2f !important;
}

.widget_nav_menu ul li ul {
    margin-top: 10px !important;
    background: #f7fafc;
}

/* --- СІТКА ОГОЛОШЕНЬ --- */
.adverts-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
}

.adverts-list .adverts-item {
    border: 1px solid #ddd !important;
    padding: 20px !important;
    background-color: #f9f9f9 !important;
    border-radius: 10px !important;
    display: block !important;
}

/* --- КАТЕГОРІЇ У ВІДЖЕТАХ --- */
.widget_adverts_categories ul, .widget_nav_menu ul {
    list-style: none;
    padding: 0;
}

.widget_adverts_categories li, .widget_nav_menu li {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.widget_adverts_categories a, .widget_nav_menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.widget_adverts_categories a:hover, .widget_nav_menu a:hover {
    color: #0073e6;
}
/* --- 3. КНОПКИ ОГОЛОШЕНЬ (Кнопка праворуч) --- */
.adverts-main-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between; /* Розносить контент по краях */
    margin-bottom: 30px;
    gap: 15px;
    padding: 10px;
}

/* Категорії тепер зліва */
.adverts-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1; /* Займає доступне місце */
}

/* Кнопка "Додати" тепер фіксовано справа */
.btn-main-add {
    display: inline-block;
    padding: 10px 25px;
    background: #0073e6;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    margin-left: auto; /* Це ключовий момент: штовхає кнопку вправо */
    white-space: nowrap;
}

.btn-main-add:hover {
    background: #005fa3;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,115,230,0.3);
}

.btn-cat {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.btn-cat:hover {
    background: #eef6ff;
    border-color: #0073e6;
    color: #0073e6;
}

/* Приховуємо стандартні тексти через ID та класи */
.adverts-payment-gateway-bank-transfer p,
.adverts-payment-gateway-bank-transfer {
    font-size: 0 !important; /* Приховує текст */
}

/* Відображаємо тільки наш блок з реквізитами */
.adverts-payment-gateway-bank-transfer::after {
    display: block !important;
    content: "Реквізити для оплати: Зробіть переказ на суму 50.00₴ на рахунок IBAN: UA243052990000026207000010056 (ЄВГЕН Ч.). У коментарі вкажіть ID замовлення. Дякуємо за підтримку проєкту hnivan.online!" !important;
    font-size: 16px !important;
    padding: 20px;
    background: #fff;
    border: 2px solid #000;
    margin-top: 10px;
    color: #000 !important;
    line-height: 1.4;
}

/* Приховуємо оригінальний текст */
a.advert-cancel-unload, button.advert-cancel-unload {
    visibility: hidden;
    position: relative;
}

/* Додаємо новий текст поверх кнопки */
a.advert-cancel-unload::after, button.advert-cancel-unload::after {
    content: "Перейти до оплати";
    visibility: visible;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #27ae60; /* Зелений колір */
    color: white;
    border-radius: 4px;
}

 
   .adverts-gallery {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 0;
        max-width: 100%; /* Дозволяємо займати всю ширину */
        margin: 20px auto;
        align-items: center; /* Вирівнює картинки по центру по вертикалі */
    }
    .img-btn {
        display: block;
        position: relative;
        transition: z-index 0s;
    }
    .img-btn img {
        width: 100%;
        height: auto; /* Автоматична висота, щоб не обрізалося */
        display: block;
        object-fit: contain; /* Картинка масштабується, але не обрізається */
        transition: transform 0.3s ease;
    }
    .img-btn:hover {
        z-index: 10;
    }
    .img-btn:hover img {
        transform: scale(1.1);
    }
    @media (max-width: 768px) {
        .adverts-gallery { grid-template-columns: repeat(4, 1fr); }
    }



/* --- СТИЛІЗАЦІЯ ГОЛОВНОГО МЕНЮ --- */

/* 1. Контейнер меню */
.main-navigation, .main-menu, .nav-menu {
    background-color: #2d3748 !important; /* Темно-сірий фон */
    padding: 10px 20px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
}

/* 2. Посилання в меню */
.main-navigation ul li a, .nav-menu li a {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 20px !important;
    transition: all 0.3s ease !important;
    border-bottom: 2px solid transparent !important;
}

/* 3. Ефект при наведенні */
.main-navigation ul li a:hover, .nav-menu li a:hover {
    color: #ffcc00 !important; /* Жовтий акцент */
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 2px solid #ffcc00 !important;
}

/* 4. Активний пункт меню */
.current-menu-item a {
    color: #ffcc00 !important;
    border-bottom: 2px solid #ffcc00 !important;
}

/* 5. Випадаючі списки (якщо є) */
.main-navigation ul ul {
    background-color: #4a5568 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2) !important;
}

.main-navigation ul ul li a {
    font-size: 14px !important;
    text-transform: none !important;
    padding: 10px 20px !important;
}
