/*
Theme Name: N1 Modern News
Author: N1 Team
Version: 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&display=swap');

body {
    background-color: #f8f9fa; /* Світлий приємний фон */
    color: #212529;
    font-family: 'Manrope', sans-serif;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ШАПКА */
.main-header {
    background: #ffffff;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo span { color: #e63946; }

/* СІТКА БЛОКІВ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

/* КАРТКА НОВИНИ */
.post-block {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.post-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.post-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 25px;
    flex-grow: 1;
}

.post-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e63946;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.post-content h2 {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.post-content h2 a {
    text-decoration: none;
    color: #000;
}

.post-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}

/* ФУТЕР */
.main-footer {
    background: #212529;
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-top: 50px;
}
/* ГОЛОВНИЙ МАЙДАНЧИК: Поділ на 2 колонки */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* Основна частина + колонка 300px */
    gap: 40px;
    padding: 40px 0;
}

/* СІТКА НОВИН (тепер всередині основної частини) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* БІЧНА КОЛОНКА (SIDEBAR) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e63946;
    text-transform: uppercase;
}

.sidebar-post-item {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.sidebar-post-item a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
}

/* Адаптивність: на телефонах колонка йде вниз */
@media (max-width: 1000px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}
/* СТИЛІ МЕНЮ */
.top-menu {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; /* Меню по центру */
    gap: 30px; /* Відстань між пунктами */
}

.nav-list li a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-list li a:hover {
    color: #e63946; /* Червоний колір при наведенні */
}
/* ШАПКА: Лого зліва, Меню справа */
.main-header {
    background: #ffffff;
    padding: 20px 0; /* Менші відступи для компактності */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between; /* Лого зліва, меню справа */
    align-items: center; /* Центрування по вертикалі */
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: #000;
    letter-spacing: -1px;
}

.logo span { color: #e63946; }

/* МЕНЮ */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px; /* Відстань між кнопками */
}

.nav-list li a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: 0.3s;
}

.nav-list li a:hover {
    color: #e63946;
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column; /* На телефонах знову в стовпчик */
        gap: 15px;
    }
}
.header-date {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
    margin-right: 20px; /* Відступ від меню */
    padding-right: 20px;
    border-right: 1px solid #eee; /* Тонка лінія-розділювач */
}

/* Якщо хочеш, щоб на мобілках дата була по центру */
@media (max-width: 768px) {
    .header-date {
        margin: 10px 0;
        padding: 0;
        border: none;
    }
}
/* Робимо шапку звичайною (не липкою) */
.main-header {
    position: relative !important; /* Тепер вона не буде їздити за користувачем */
    top: auto !important;
    box-shadow: none; /* Можна прибрати тінь, щоб виглядало легше */
    border-bottom: 1px solid #eee;
}

/* Якщо ти хочеш, щоб вона була липкою ТІЛЬКИ на комп'ютерах, а на мобільних — НІ: */
@media (min-width: 1024px) {
    .main-header {
        position: sticky !important;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
}

/* Налаштування для мобілок, щоб меню і лого були акуратними */
@media (max-width: 768px) {
    .header-flex {
        display: flex;
        flex-direction: column; /* Елементи один під одним */
        align-items: center;
        text-align: center;
        padding: 15px 0;
    }
    
    .header-right {
        margin-top: 10px;
        flex-direction: column;
        gap: 10px;
    }

    .nav-list {
        gap: 15px;
        justify-content: center;
    }
}
/* СТИЛІ ПАГІНАЦІЇ */
.pagination {
    grid-column: 1 / -1; /* Розтягуємо на всю ширину сітки */
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: 0.3s;
}

.pagination .page-numbers.current {
    background: #e63946; /* Колір активної сторінки */
    color: #fff;
    border-color: #e63946;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f0f0f0;
    border-color: #bbb;
}