/* News Page Styles */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* News Card */
.news-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    cursor: pointer;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.news-card:hover::before {
    transform: scaleX(1);
}

/* News Image */
.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

/* Унифицированные размеры для новостей на ПК */
@media (min-width: 769px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .news-image {
        height: 180px;
    }
    
    .featured-article .news-image {
        height: 250px;
    }
}

/* News Content */
.news-content {
    padding: 2rem;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-date::before {
    content: '📅';
    font-size: 0.9rem;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-inverse);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    transform: skewX(-15deg);
}

.read-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.read-more:hover::before {
    left: 100%;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Empty State */
.news-grid:has(.news-card) ~ .empty-state {
    display: none;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.page-info {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.prev-button,
.next-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prev-button:hover,
.next-button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-inverse);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.prev-button::before {
    content: '←';
}

.next-button::after {
    content: '→';
}

/* Loading States */
.news-card.loading {
    background: var(--bg-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

.news-card.loading .news-image,
.news-card.loading .news-title,
.news-card.loading .news-excerpt,
.news-card.loading .read-more {
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.news-card.loading .news-title {
    height: 1.5rem;
    margin-bottom: 1rem;
}

.news-card.loading .news-excerpt {
    height: 4rem;
    margin-bottom: 1rem;
}

.news-card.loading .read-more {
    height: 2.5rem;
    width: 100px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-container {
        padding: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-card {
        border-radius: 16px;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    .news-title {
        font-size: 1.2rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .prev-button,
    .next-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Filter/Search Section (for future implementation) */
.news-filters {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tags */
.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.news-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-tag:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
}

/* Featured Article */
.featured-article {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: linear-gradient(135deg, 
        rgba(0, 102, 255, 0.05) 0%, 
        rgba(124, 58, 237, 0.05) 100%
    );
    border: 2px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.featured-article .news-image {
    height: 300px;
    border-radius: 16px;
}

.featured-article .news-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.featured-article .news-excerpt {
    font-size: 1.1rem;
    -webkit-line-clamp: 4;
}

@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .featured-article .news-title {
        font-size: 1.5rem;
    }
}

/* КРИТИЧЕСКАЯ ЗАЩИТА - мобильное меню СКРЫТО пока не активно */
.mobile-menu:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-menu:not(.active) .mobile-menu-overlay,
.mobile-menu:not(.active) .mobile-menu-content {
    display: none !important;
    visibility: hidden !important;
}