/* ============================================
   /assets/css/style.css - Основные стили сайта
   ОПТИМИЗИРОВАННАЯ ВЕРСИЯ ДЛЯ РСЯ
   ============================================ */

/* ============================================
   1. ГЛОБАЛЬНЫЙ СБРОС
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-top: 0 !important;
}

/* ============================================
   2. КОНТЕЙНЕР
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================
   3. ШАПКА САЙТА (НОВАЯ)
   ============================================ */
.site-header {
    background: #1a1a2e;
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.logo h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

.logo .subtitle {
    font-size: 13px;
    opacity: 0.7;
    display: block;
}

/* ============================================
   4. МЕНЮ (АДАПТИВНОЕ)
   ============================================ */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
    display: block;
    font-size: 14px;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: rgba(255,255,255,0.15);
    color: #fbbf24;
}

/* ============================================
   5. ОСНОВНОЙ КОНТЕНТ
   ============================================ */
.site-main {
    min-height: 500px;
    padding: 20px 0 40px 0;
    width: 100%;
}

/* ============================================
   6. СЕТКА
   ============================================ */
.row {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.col-main {
    flex: 2;
    min-width: 300px;
}

.col-sidebar {
    flex: 1;
    min-width: 250px;
}

.col-main-full {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ============================================
   7. СПИСОК СТАТЕЙ
   ============================================ */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}

.article-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.article-item h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.article-item h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.article-item h2 a:hover {
    color: #fbbf24;
}

.article-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.article-meta span {
    margin-right: 15px;
}

.article-intro {
    color: #555;
    margin-bottom: 10px;
}

.read-more {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.read-more:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* ============================================
   8. САЙДБАР
   ============================================ */
.sidebar-block {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.sidebar-block h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fbbf24;
}

.categories-list {
    list-style: none;
}

.categories-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    color: #333;
    text-decoration: none;
    display: block;
}

.categories-list a:hover {
    color: #fbbf24;
}

.categories-list .count {
    color: #888;
    font-size: 12px;
}

/* ============================================
   9. СТРАНИЦА СТАТЬИ
   ============================================ */
.article-full {
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.breadcrumbs {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.breadcrumbs a {
    color: #fbbf24;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
}

.breadcrumbs .current {
    color: #333;
}

.article-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.content-text {
    font-size: 16px;
    line-height: 1.8;
}

.content-text img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}

.content-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.content-text table td,
.content-text table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.article-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-to-category {
    color: #fbbf24;
    text-decoration: none;
}

.back-to-category:hover {
    text-decoration: underline;
}

/* ============================================
   10. СТРАНИЦА 404
   ============================================ */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

.error-404 h1 {
    font-size: 48px;
    color: #e74c3c;
}

.error-404 .btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fbbf24;
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

.error-404 .btn:hover {
    background: #f59e0b;
}

/* ============================================
   11. СТРАНИЦА КАТЕГОРИИ
   ============================================ */
.category-title {
    font-size: 30px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #fbbf24;
}

/* ============================================
   12. ПОДВАЛ
   ============================================ */
.site-footer {
    background: #1a1a2e;
    color: #adb5bd;
    padding: 30px 20px;
    margin-top: 40px;
    width: 100%;
}

.site-footer .inner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copy {
    font-size: 14px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #fbbf24;
}

/* ============================================
   13. КОНТЕЙНЕР ДЛЯ РЕКЛАМЫ
   ============================================ */
.ads-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    text-align: center;
    min-height: 90px;
    background: #f8f9fa;
}

.ads-container > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   14. АДАПТИВНОСТЬ (УЛУЧШЕННАЯ)
   ============================================ */
@media (max-width: 992px) {
    .article-full {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        justify-content: center;
        gap: 3px;
    }
    
    .main-nav ul li a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .col-main,
    .col-sidebar {
        flex: 1 1 100%;
    }
    
    .col-main-full {
        padding: 0 10px;
    }
    
    .article-full {
        padding: 20px;
    }
    
    .article-content h1 {
        font-size: 24px;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .ads-container {
        padding: 10px 15px;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .logo .subtitle {
        font-size: 11px;
    }
    
    .main-nav ul li a {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .article-full {
        padding: 15px;
    }
    
    .article-content h1 {
        font-size: 20px;
    }
    
    .category-title {
        font-size: 22px;
    }
    
    .ads-container {
        padding: 8px 10px;
        min-height: 50px;
    }
}

/* ============================================
   15. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
   ============================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
