/* 基础重置与主题色定义 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-blue: #165DFF;
    --dark-blue: #0E42C7;
    --light-blue: #E8F3FF;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --border-gray: #dee2e6;
}

/* 资讯列表容器 */
.article-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px; /* 卡片之间的间距 */
}

/* 单篇资讯卡片（核心：左图右文布局） */
.article-item {
    display: flex;
    align-items: stretch; /* 让图片和文字区域高度一致 */
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 卡片hover动效 */
.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(22, 93, 255, 0.1);
    border-left: 4px solid var(--primary-blue);
}

/* 左侧图片区域 */
.article-img {
    flex: 0 0 280px; /* 固定图片宽度，不缩放 */
    height: 200px;
    overflow: hidden;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，裁剪多余部分 */
    transition: transform 0.5s ease;
}

.article-item:hover .article-img img {
    transform: scale(1.08); /* hover时图片轻微放大 */
}

/* 右侧文字内容区域 */
.article-content {
    flex: 1; /* 占满剩余宽度 */
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 标题样式 */
.article-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* 发布信息（日期+作者） */
.article-meta {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    gap: 20px;
}

/* 摘要样式 */
.article-summary {
    color: #495057;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 最多显示3行，超出省略 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 查看详情链接 */
.article-link {
    align-self: flex-start; /* 左对齐 */
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 8px 0;
}

.article-link:hover {
    color: var(--dark-blue);
    padding-left: 8px; /* hover时轻微右移 */
}

.article-link::after {
    content: ">>";
    margin-left: 5px;
    font-size: 0.8rem;
}

/* 无数据提示样式 */
.no-articles {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    padding: 80px 20px;
    background-color: var(--light-gray);
    border-radius: 12px;
}

/* 响应式适配（移动端自动转为上下布局） */
@media (max-width: 768px) {
    .article-item {
        flex-direction: column; /* 移动端图片在上，文字在下 */
    }

    .article-img {
        flex: none;
        width: 100%;
        height: 180px;
    }

    .article-content {
        padding: 20px 25px;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .article-list {
        padding: 20px 15px;
    }

    .article-img {
        height: 150px;
    }

    .article-content {
        padding: 15px 20px;
    }

    .article-title {
        font-size: 1.2rem;
    }
}