/* ============================================
   青灵鹿官网 - 新闻页面样式
   ============================================ */

/* ===== Page Hero ===== */
.page-hero {
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 30%, #0e7490 70%, #0891b2 100%);
    padding: calc(80px + var(--space-16)) 0 var(--space-16);
    text-align: center;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: var(--text-inverse);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--text-inverse);
    margin-bottom: var(--space-4);
}

.page-hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== News Section ===== */
.news-section {
    background: var(--bg-primary);
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.news-tab {
    padding: 8px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-tab:hover {
    color: var(--text);
    border-color: var(--slate-300);
    background: var(--bg-subtle);
}

.news-tab.active {
    background: var(--cyan-600);
    color: white;
    border-color: var(--cyan-600);
}

/* Featured News */
.news-featured {
    padding: var(--space-6);
    background: var(--bg);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    border: 1px solid var(--border);
}

.news-featured-content {
    padding: 0;
}

.news-featured h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.news-featured p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.news-category {
    padding: var(--space-1) var(--space-3);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

.news-date {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.news-featured-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

.news-featured-desc {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: gap var(--transition-base);
}

.news-link:hover {
    gap: var(--space-3);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--border);
}

.pagination-btn {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
    padding: 0 4px;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
    z-index: 1;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    cursor: default;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3);
}

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

.pagination-btn.page-prev,
.pagination-btn.page-next {
    font-size: 1.125rem;
    font-weight: 400;
}

.pagination-ellipsis {
    min-width: 32px;
    text-align: center;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-size: 0.875rem;
    line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .page-hero-title {
        font-size: var(--text-4xl);
    }

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

    .news-featured-image {
        height: 250px;
    }

    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .page-hero {
        padding: calc(80px + var(--space-8)) 0 var(--space-8);
    }

    .page-hero-title {
        font-size: var(--text-3xl);
    }

    .news-tabs {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 0 var(--space-4) var(--space-3);
        margin: 0 calc(var(--space-4) * -1);
        scrollbar-width: none;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .news-tabs::-webkit-scrollbar {
        display: none;
    }

    .news-tab {
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 0.8125rem;
        border-radius: var(--radius-md);
        white-space: nowrap;
    }

    /* News Featured - 统一卡片样式 */
    .news-featured {
        padding: var(--space-4);
        background: var(--bg);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-3);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-xs);
        display: block;
    }

    .news-featured-content {
        padding: 0;
    }

    .news-featured h2 {
        font-size: 1rem;
        margin-bottom: var(--space-2);
    }

    .news-featured p {
        font-size: 0.8125rem;
        margin-bottom: var(--space-3);
        line-height: 1.5;
    }

    /* News Grid - 卡片列表样式 */
    .news-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }

    .news-card {
        padding: var(--space-4);
        background: var(--bg);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-xs);
    }

    .news-card-header {
        margin-bottom: var(--space-2);
    }

    .news-card h3 {
        font-size: 0.9375rem;
        margin-bottom: var(--space-2);
        line-height: 1.4;
    }

    .news-card p {
        font-size: 0.8125rem;
        margin-bottom: var(--space-3);
        line-height: 1.5;
    }

    .news-link {
        font-size: 0.8125rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
        margin-top: var(--space-8);
        padding-top: var(--space-5);
    }

    .pagination-btn {
        min-width: 34px;
        height: 34px;
        font-size: 0.8125rem;
    }
}

/* ===== 接口版新闻列表（纯文字卡片） ===== */
.news-loading,
.news-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-10) 0;
    grid-column: 1 / -1;
}

/* 首篇专题大卡（横跨整行，左右【封面|内容】，白底） */
.news-featured-card {
    display: flex;
    align-items: stretch;
    grid-column: 1 / -1;
    text-decoration: none;
    color: inherit;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    margin-bottom: var(--space-6);
    min-height: 240px;
}

.news-featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 左侧封面 */
.news-featured-card-media {
    flex: 0 0 36%;
    position: relative;
}

.news-featured-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
}

/* 右侧内容 */
.news-featured-card-body {
    flex: 1;
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-featured-card.no-media .news-featured-card-body {
    padding: var(--space-10) var(--space-8);
}

.news-featured-card .news-card-header .news-tag {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.news-featured-card .news-date {
    color: var(--text-muted);
}

.news-featured-card-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: var(--leading-snug);
    margin-bottom: var(--space-3);
    max-width: 90%;
}

.news-featured-card-desc {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-5);
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured-card .news-link {
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
}

.news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--space-5);
    transition: all var(--transition-base);
    height: 100%;
}

.news-card:hover {
    border-color: rgba(8, 145, 178, 0.4);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.news-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.news-card-header .news-tag {
    padding: 2px 10px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.news-card-header .news-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.news-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: var(--leading-snug);
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: var(--leading-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .news-link {
    margin-top: auto;
    padding-top: var(--space-4);
}

/* 移动端：竖排卡片 */
@media (max-width: 767px) {
    .news-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }

    /* 专题大卡移动端纵向堆叠：封面上、内容下 */
    .news-featured-card {
        flex-direction: column;
        min-height: 0;
        margin-bottom: var(--space-3);
    }

    .news-featured-card-media {
        flex: none;
        height: 180px;
    }

    .news-featured-card-body {
        padding: var(--space-5) var(--space-4) var(--space-4);
    }

    .news-featured-card.no-media .news-featured-card-body {
        padding: var(--space-5) var(--space-4);
    }

    .news-featured-card-title {
        font-size: var(--text-lg);
        max-width: 100%;
    }

    .news-featured-card-desc {
        font-size: var(--text-sm);
        max-width: 100%;
    }

    .news-card {
        padding: var(--space-4);
        border-radius: var(--radius-lg);
    }

    .news-card-title {
        font-size: 0.9375rem;
    }
}

/* ===== 文章详情页 ===== */
.article-container {
    max-width: 1050px;
}

.article {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.article-loading,
.article-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-10) 0;
}

.article-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: var(--leading-snug);
    margin-bottom: var(--space-5);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.article-cover {
    height: 320px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    margin-bottom: var(--space-6);
    background-color: var(--slate-100);
}

.article-content {
    font-size: var(--text-base);
    line-height: 1.9;
    color: var(--text);
    word-break: break-word;
}

.article-content p {
    margin-bottom: var(--space-5);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: var(--space-6) 0 var(--space-3);
    line-height: 1.4;
}

.article-content a {
    color: var(--primary);
}

@media (max-width: 767px) {
    .article {
        padding: var(--space-5);
    }

    .article-title {
        font-size: var(--text-xl);
    }

    .article-cover {
        height: 200px;
    }
}
