:root {
    --news-primary: #e74c3c;
    --news-dark: #c0392b;
    --news-light: #ffebe9;
}

/* Общие стили */
.news-page,
.news-detail-page {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Шапка страницы новостей */
.news-header {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInUp 0.8s ease;
}

.news-page-title {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.news-page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--news-primary);
    border-radius: 2px;
}

.news-page-description {
    font-size: 1.125rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 2rem auto 0;
    line-height: 1.6;
}

/* Сетка новостей */
.news-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Карточка новости */
.news-card-stack {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--news-primary);
    opacity: 0;
    transform: translateY(30px);
}

.news-card-stack.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-card-stack:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.15);
    border-left-width: 8px;
}

.news-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Изображение новости */
.news-image-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.news-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-card-stack:hover .news-image-container img {
    transform: scale(1.1);
}

/* Контент карточки */
.news-content {
    padding: 1.5rem;
}

/* Дата новости */
.news-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--news-light);
    color: var(--news-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.date-icon {
    font-size: 0.875rem;
}

/* Заголовок новости */
.news-title {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
}

.news-card-stack:hover .news-title {
    color: var(--news-primary);
}

/* Краткое описание */
.news-excerpt {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Мета-информация */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.875rem;
}

.news-author {
    color: #7f8c8d;
    font-style: italic;
}

.read-more {
    color: var(--news-primary);
    font-weight: 500;
    transition: all 0.3s;
}

.news-card-stack:hover .read-more {
    transform: translateX(5px);
}

/* Страница отдельной новости */
.news-detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    animation: slideUp 0.8s ease;
}

.news-detail-header {
    padding: 3rem 3rem 2rem;
    border-bottom: 1px solid #eee;
}

.news-detail-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-detail-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9375rem;
    color: #7f8c8d;
    margin-top: 1.5rem;
}

.news-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.news-detail-body {
    padding: 2.5rem 3rem 3rem;
    line-height: 1.8;
    font-size: 1.125rem;
}

.news-detail-body h2,
.news-detail-body h3 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
}

.news-detail-body ul,
.news-detail-body ol {
    margin: 1rem 0 1rem 2rem;
}

.news-detail-body li {
    margin-bottom: 0.5rem;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: white;
    border: 2px solid #eee;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--news-primary);
    border-color: var(--news-primary);
    color: white;
}

.page-link.prev,
.page-link.next {
    min-width: 100px;
}

.page-dots {
    padding: 0 0.5rem;
    color: #999;
}

/* Кнопка "Назад" */
.back-to-news {
    text-align: center;
    padding: 2rem 0;
}

.back-to-news .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    background: var(--news-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.back-to-news .btn:hover {
    background: var(--news-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    gap: 1rem;
}

/* Индикатор "Новое" */
.new-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--news-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .news-page,
    .news-detail-page {
        padding: 100px 0 40px;
    }
    
    .news-page-title {
        font-size: 2.25rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-detail-header,
    .news-detail-body {
        padding: 1.5rem;
    }
    
    .news-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .news-detail-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .news-page-title {
        font-size: 1.75rem;
    }
    
    .news-detail-title {
        font-size: 1.5rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link.prev,
    .page-link.next {
        min-width: 80px;
        font-size: 0.875rem;
    }
}

/* Индикатор "Свежая новость" (менее 7 дней) */
.news-card-stack.new::before {
    content: 'НОВОЕ';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--news-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}