/* ============================================================
   news.css — 新闻页面专属样式
   ============================================================ */

/* -------------------- 1. 页面标题区域 -------------------- */
.news-page-header {
    margin-top: var(--section-gap);
}

.news-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.news-page-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin: 0;
}

/* -------------------- 2. 主新闻卡片（Featured Card）-------------------- */
.news-featured-card {
    background: var(--color-bg-white);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-featured-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.news-featured-card__img-link {
    display: block;
    overflow: hidden;
}

.news-featured-card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-featured-card:hover .news-featured-card__img {
    transform: scale(1.03);
}

.news-featured-card__body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-featured-card__title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.4;
}

.news-featured-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-featured-card__title a:hover {
    color: var(--color-primary);
}

.news-featured-card__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #999;
}

.news-featured-card__excerpt {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-featured-card__time {
    flex: 0 0 auto;
    text-align: right;
}

/* -------------------- 3. 侧边栏新闻列表 -------------------- */
.news-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.news-sidebar-item {
    background: var(--color-bg-white);
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition-base);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1 1 0;
}

.news-sidebar-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.news-sidebar-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.news-sidebar-item__header {
    margin-bottom: 8px;
}

.news-sidebar-item__category {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    margin: 0;
}

.news-sidebar-item__link {
    display: block;
    margin-bottom: 8px;
}

.news-sidebar-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-sidebar-item__link:hover .news-sidebar-item__title {
    color: var(--color-primary);
}

.news-sidebar-item__meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 12px;
    color: #999;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.news-sidebar-item__date {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-sidebar-item__img {
    width: 80px;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-sidebar-item__img-link {
    display: block;
    width: 100%;
}

.news-sidebar-item__img img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 6px;
}

.news-sidebar-item__time {
    font-size: 12px;
    color: #999;
    line-height: 1;
    margin-top: 6px;
    text-align: center;
    width: 100%;
}

/* -------------------- 4. 分类新闻网格 -------------------- */
.news-category-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 16px;
}

.news-grid-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-grid-item {
    background: var(--color-bg-white);
    overflow: hidden;
    transition: var(--transition-base);
    border-bottom: 1px solid #e0e0e0;
}

.news-grid-item:hover {
    box-shadow: none;
}

.news-grid-item__img-link {
    display: block;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    padding: 8px;
    background: #fff;
}

.news-grid-item__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-grid-item:hover .news-grid-item__img {
    transform: scale(1.03);
}

.news-grid-item__body {
    padding: 12px 0 6px 0;
}

.news-grid-item__title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4;
}

.news-grid-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-grid-item__title a:hover {
    color: var(--color-primary);
}

.news-grid-item__summary {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-grid-item__date {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin: 0;
}

/* -------------------- 5. 响应式适配 -------------------- */
@media (max-width: 768px) {
    .news-page-title {
        font-size: 24px;
    }

    .news-page-subtitle {
        font-size: 14px;
    }

    .news-featured-card__title {
        font-size: 18px;
    }

    .news-category-title {
        font-size: 18px;
    }

    .news-grid-item__title {
        font-size: 15px;
    }
}
