/* ================================
   Modern News List - 2025 Design
   ================================ */

/* 基础网格布局 - 使用 CSS Grid */
.newslist {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0;
}

/* 新闻卡片 */
.newslist .newsitem {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newslist .newsitem:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 图片区域 */
.newslist .newsitem .news-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.newslist .newsitem .news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.newslist .newsitem:hover .news-img img {
    transform: scale(1.05);
}

/* 内容区域 */
.newslist .newsitem .news-info {
    padding: 20px;
}

/* 日期 */
.newslist .newsitem .news-date {
    font-size: 13px;
    color: var(--fontcolorintro, #888);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.newslist .newsitem .news-date i {
    font-size: 12px;
}

/* 标题 */
.newslist .newsitem .news-title a {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.2s ease;
}

.newslist .newsitem:hover .news-title a {
    color: var(--color);
}

/* 摘要文字 */
.newslist .newsitem .news-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 12px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 阅读更多按钮 */
.newslist .newsitem .news-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.newslist .newsitem .news-btn::after {
    content: '→';
    transition: transform 0.2s ease;
}

.newslist .newsitem:hover .news-btn::after {
    transform: translateX(4px);
}

/* ================================
   响应式布局
   ================================ */

/* 平板端 - 2列 */
@media (max-width: 1024px) {
    .newslist {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* 平板端隐藏第9个，显示8个(4行×2列) */
    .newslist .newsitem:nth-child(9) {
        display: none;
    }

    .newslist .newsitem .news-info {
        padding: 16px;
    }

    .newslist .newsitem .news-title a {
        font-size: 16px;
    }
}

/* 移动端 - 单列 */
@media (max-width: 576px) {
    .newslist {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 移动端恢复显示第9个 */
    .newslist .newsitem:nth-child(9) {
        display: block;
    }

    .newslist .newsitem .news-info {
        padding: 16px;
    }

    .newslist .newsitem .news-title a {
        font-size: 16px;
    }

    .newslist .newsitem .news-text {
        -webkit-line-clamp: 2;
    }

    .newslist .newsitem .news-btn {
        font-size: 13px;
    }
}
