/* Стили для страницы списка статей блога */

.blog-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.blog-header {
    padding-top: 20px;
    margin-bottom: 32px;
}

.blog-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.2;
    text-align: left;
}

.blog-header p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.filters-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 32px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-filter {
    padding: 10px 20px;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-filter:hover {
    background: #4338ca;
}

.filter-reset {
    padding: 6px 14px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    height: fit-content;
}

.filter-reset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.blog-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-bottom: 48px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: #eef2ff;
    color: #4F46E5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}

.article-views {
    font-size: 12px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.categories-list a:hover {
    background: #f3f4f6;
}

.categories-list a.active {
    background: #eef2ff;
    color: #4F46E5;
    font-weight: 600;
}

.category-count {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    padding: 6px 12px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #e5e7eb;
    color: #374151;
}

.tag-link.active {
    background: #4F46E5;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 44px;
    text-align: center;
    display: inline-block;
}

.pagination a {
    background: white;
    color: #4F46E5;
    border: 1px solid #e5e7eb;
}

.pagination a:hover {
    background: #eef2ff;
    border-color: #4F46E5;
}

.pagination .current {
    background: #4F46E5;
    color: white;
    border: 1px solid #4F46E5;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 1024px) {
    .blog-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .blog-page {
        padding: 0 16px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

