/* 新闻文章页面专用样式（列表页与详情页共用） */

/* ========== 列表卡片封面 ========== */
/* 平台文章没有封面图，用渐变色块 + 关键词代替 */
.article-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 24px;
    text-decoration: none;
    transition: transform 0.4s ease;
}

.article-card:hover .article-cover {
    transform: scale(1.05);
}

.article-card:nth-child(4n+1) .article-cover {
    background: linear-gradient(135deg, #00b8e6 0%, #00d4ff 100%);
}

.article-card:nth-child(4n+2) .article-cover {
    background: linear-gradient(135deg, #295dfc 0%, #00b8e6 100%);
}

.article-card:nth-child(4n+3) .article-cover {
    background: linear-gradient(135deg, #7c3aed 0%, #295dfc 100%);
}

.article-card:nth-child(4n+4) .article-cover {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
}

.cover-mark {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.cover-text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 空状态 ========== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--text-secondary);
}

.empty-state i {
    display: block;
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ========== 详情页 ========== */
/* 固定页头（72px）下方留出面包屑的空间 */
.news-detail-section {
    padding-top: 6rem;
}

/* 限制正文宽度，提升长文阅读体验 */
.news-article .article-content,
.news-article .article-tags {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.news-article .article-title {
    font-size: 2rem;
    line-height: 1.35;
}

.news-article .article-meta {
    justify-content: center;
}

.news-content-empty {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 2rem auto;
    max-width: 860px;
}

/* 最新文章 */
.news-related {
    max-width: 860px;
    margin: 2rem auto;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.news-related h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.news-related-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.25rem 2rem;
}

.news-related-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
}

.news-related-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.news-related-list a:hover {
    color: var(--accent-primary);
}

.news-related-list .related-date {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 响应式 */
@media (max-width: 768px) {
    .news-detail-section {
        padding-top: 5rem;
    }

    .news-article .article-title {
        font-size: 1.5rem;
    }

    .news-related {
        padding: 1.25rem;
    }

    .news-related-list {
        grid-template-columns: 1fr;
    }
}
