/* =========================================================
   СТРАНИЦА СТАТЕЙ - Современный и креативный дизайн
   ========================================================= */

.articles-hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #253d30 0%, #2a4f38 100%);
    color: white;
    margin-bottom: 0;
    margin-top: 160px; /* Отступ от фиксированной шапки (140px) + 20px дополнительно */
    position: relative;
    overflow: hidden;
}

.articles-page {
    padding: 20px 0 80px;
    padding-top: 0; /* Отступ убран, так как hero уже имеет margin-top */
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 80vh;
    position: relative;
    z-index: 1;
}

/* Мега-меню каталога (fixed, z-index 1001 в style.css) не должно оставаться с «залипшим» кликом поверх текста */
.nav li:not(:hover):not(.submenu-open) > .submenu {
    pointer-events: none;
}

.articles-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.articles-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.articles-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

/* Сетка статей - фиксированная 3×4 (3 колонки, 4 ряда = 12 карточек) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Карточка статьи */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.article-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #937b61 0%, #6d5a47 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.article-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card-date i {
    color: #937b61;
}

.article-card-category {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.article-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #253d30;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card:hover .article-card-title {
    color: #937b61;
}

.article-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.article-card-read-more {
    color: #937b61;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.article-card-read-more:hover {
    color: #6d5a47;
    gap: 12px;
}

.article-card-read-more i {
    transition: transform 0.3s ease;
}

.article-card-read-more:hover i {
    transform: translateX(4px);
}

.article-card-views {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-card-views-icon {
    font-size: 1rem;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.article-card-views span[data-article-id] {
    transition: all 0.3s ease;
    min-width: 1.5em;
    display: inline-block;
    text-align: right;
}

.article-card-views span[data-article-id]:hover {
    color: #937b61;
    transform: scale(1.1);
}

/* Страница отдельной статьи */
.article-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-single-header {
    margin-bottom: 40px;
}

.article-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-single-date,
.article-single-category,
.article-single-views {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.article-single-date i {
    color: #937b61;
}

.article-single-views {
    font-weight: 500;
}

.article-single-views-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.article-single-category {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
}

.article-single-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #253d30;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-single-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.article-single-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-single-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #253d30;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #937b61;
}

.article-single-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #253d30;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-single-content p {
    margin-bottom: 20px;
}

.article-single-content ul,
.article-single-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-single-content li {
    margin-bottom: 10px;
}

.article-single-content strong {
    color: #253d30;
    font-weight: 600;
}

.article-single-content blockquote {
    border-left: 4px solid #937b61;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.article-single-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.article-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-tag {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #937b61;
    color: white;
}

.article-single-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #937b61;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-single-back:hover {
    color: #6d5a47;
    gap: 12px;
}

.article-single-back i {
    transition: transform 0.3s ease;
}

.article-single-back:hover i {
    transform: translateX(-4px);
}

/* Адаптивность */
/* Адаптивность для средних экранов - 2 колонки */
@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Адаптивность для мобильных - 1 колонка */
@media (max-width: 768px) {
    .articles-page {
        padding-top: 140px; /* Меньший отступ на мобильных */
    }
    
    .articles-hero {
        margin-top: 140px; /* Меньший отступ на мобильных */
        padding: 40px 0 30px;
    }
    
    .articles-hero h1 {
        font-size: 2rem;
    }
    
    .articles-hero p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-single-title {
        font-size: 1.8rem;
    }
    
    .article-single-image {
        height: 250px;
    }
    
    .article-single-content {
        font-size: 1rem;
    }
    
    .article-single-content h2 {
        font-size: 1.5rem;
    }
    
    .article-single-content h3 {
        font-size: 1.2rem;
    }
}

/* Пустое состояние */
.articles-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.articles-empty i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.articles-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.articles-empty p {
    font-size: 1rem;
    color: #666;
}

/* Фильтры статей */
.articles-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 20px; /* Минимальный отступ от hero */
    margin-bottom: 30px;
}

.articles-filters-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.articles-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.articles-filter-group label {
    font-weight: 500;
    color: #253d30;
    font-size: 0.95rem;
}

.articles-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.articles-filter-select:hover {
    border-color: #937b61;
}

.articles-filter-select:focus {
    outline: none;
    border-color: #937b61;
    box-shadow: 0 0 0 3px rgba(147, 123, 97, 0.1);
}

.articles-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.articles-tag-filter {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.articles-tag-filter:hover {
    border-color: #937b61;
    background: #f0f0f0;
}

.articles-tag-filter.active {
    background: #937b61;
    color: white;
    border-color: #937b61;
}

.articles-filter-reset {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.articles-filter-reset:hover {
    background: #e0e0e0;
    border-color: #937b61;
    color: #253d30;
}

/* Пагинация */
.articles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    padding: 20px 0;
}

.articles-pagination-info {
    color: #666;
    font-size: 0.95rem;
    margin-right: 20px;
}

.articles-pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.articles-pagination-btn:hover:not(:disabled) {
    background: #937b61;
    color: white;
    border-color: #937b61;
}

.articles-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.articles-pagination-pages {
    display: flex;
    gap: 5px;
    align-items: center;
}

.articles-pagination-page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.articles-pagination-page:hover:not(.active) {
    background: #f0f0f0;
    border-color: #937b61;
}

.articles-pagination-page.active {
    background: #937b61;
    color: white;
    border-color: #937b61;
    font-weight: 600;
}

/* Адаптивность фильтров и пагинации */
@media (max-width: 768px) {
    .articles-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .articles-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .articles-filter-select {
        width: 100%;
    }
    
    .articles-pagination {
        flex-wrap: wrap;
    }
    
    .articles-pagination-info {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .articles-pagination-pages {
        flex-wrap: wrap;
        justify-content: center;
    }
}

