/* ==========================================================================
   news.css — ПОЛНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ НОВОСТЕЙ
   ========================================================================== */

/* 1. БАЗОВЫЕ СТИЛИ BODY — ПРИЖАТИЕ ФУТЕРА К НИЗУ */
.news-page-body {
    background-color: #f5f7fa !important;
    color: #1a1d20 !important;
    overflow-x: hidden !important;
    padding-top: 0 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    
    /* Флексбокс для прижатия футера */
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    margin: 0 !important;
}

/* 2. ОСНОВНОЙ КОНТЕЙНЕР — РАСТЯГИВАЕТСЯ */
.news-page-body .news-main-container {
    flex: 1 0 auto !important;
    width: 100% !important;
}



/* Убираем нижнюю границу у шапки если есть */
.news-page-body .site-header.navigation-red::after {
    display: none !important;
}

/* 4. КРАСНАЯ ПОДШАПКА (БАННЕР) — ТЕПЕРЬ ЭТО "НОВОСТИ" */
.news-top-banner {
    background: linear-gradient(135deg, #cc1818, #990000) !important;
    padding: 60px 0 50px 0 !important; /* Увеличили внутренние отступы для красоты */
    text-align: center !important;
    color: #ffffff !important;
    width: 100% !important;
    margin-top: 0 !important;
    position: relative !important;
    top: 0 !important; /* Обнуляем смещение, оно больше не нужно */
    margin-bottom: 40px !important; /* Делаем аккуратный отступ до карточек новостей */
}

.news-top-banner .banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок H1 в подшапке */
.news-top-banner h1 {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    margin: 0 0 15px 0 !important;
    letter-spacing: -0.5px !important;
}

/* Описание под заголовком */
.news-top-banner p {
    font-size: 1rem !important;
    opacity: 0.9 !important;
    margin: 0 0 5px 0 !important; /* Небольшой отступ между строками текста */
}

/* Отступ ВСЕГО контейнера ТОЛЬКО под фиксированную шапку (обычно она около 70px-80px) */
.news-page-body .news-main-container {
    padding-top: 70px !important; /* Сюда пишите точную высоту вашей фиксированной шапки */
}

/* 5. КОНТЕЙНЕР НОВОСТЕЙ */
.news-page-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* СКРЫВАЕМ СТАРУЮ ШАПКУ НОВОСТЕЙ (она теперь в подшапке) */
.news-page-header {
    display: none !important;
}

/* 6. СЕТКА КАРТОЧЕК */
.news-cards-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    margin: 0 0 80px 0 !important;
}

/* Карточка новости */
.news-card-item {
    position: relative !important;
    width: 100% !important;
    height: 420px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    background-color: #0b0202 !important;
    display: block !important;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.news-card-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Контейнер картинки */
.news-card-img-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

.news-card-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}

.news-card-item:hover .news-card-img-wrapper img {
    transform: scale(1.05) !important;
}

/* Градиентное затемнение */
.news-card-item::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* Текст внутри карточки */
.news-card-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 30px !important;
    z-index: 3 !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.news-card-meta {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase !important;
    display: block !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.5px !important;
}

.news-card-title {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin-bottom: 10px !important;
    letter-spacing: -0.5px !important;
}

.news-card-desc {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* 7. ФУТЕР — ПРИЖАТ К НИЗУ */
.news-page-body .main-footer {
    margin-top: auto !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    background-color: #111827 !important;
}

/* 8. МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {
    .news-top-banner {
        padding: 40px 0 35px 0 !important;
        top: 0 !important; /* Обнуляем на мобилках */
        margin-bottom: 25px !important;
    }
    
    .news-top-banner h1 {
        font-size: 1.5rem !important;
    }
    
    .news-top-banner p {
        font-size: 0.85rem !important;
    }
    
    .news-page-body .news-main-container {
        padding-top: 60px !important; /* Высота шапки на мобильных */
    }
    
    .news-page-wrapper {
        padding: 0 15px !important;
    }
    
    .news-cards-grid {
        gap: 20px !important;
    }
    
    .news-card-item {
        height: 320px !important;
        border-radius: 18px !important;
    }
    
    .news-card-content {
        padding: 20px !important;
    }
    
    .news-card-title {
        font-size: 1.3rem !important;
    }
    
    .news-card-desc {
        font-size: 0.8rem !important;
    }
    
    .news-card-meta {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 480px) {
    .news-card-item {
        height: 280px !important;
    }
    
    .news-card-title {
        font-size: 1.1rem !important;
    }
    
    .news-card-content {
        padding: 15px !important;
    }
}

/* 9. ДЛЯ ПЛАНШЕТОВ */
@media (min-width: 769px) and (max-width: 1024px) {
    .news-page-wrapper {
        max-width: 100% !important;
        padding: 0 30px !important;
    }
    
    .news-card-item {
        height: 380px !important;
    }
    
    .news-card-title {
        font-size: 1.5rem !important;
    }
}