/* --- 新增：头部布局样式 --- */
.section-header {
    display: flex;             /* 启用 Flex 布局 */
    justify-content: space-between; /* 核心：两端对齐（左边的靠左，右边的靠右） */
    align-items: center;       /* 垂直居中 */
    /*margin-bottom: 30px;        底部间距，与文章卡片隔开 */
    padding-bottom: 15px;      /* 可选：底部内边距 */
    /*border-bottom: 2px solid #f0f0f0;  可选：加一条分割线，增加设计感 */
}

.section-header h1 {
    margin: 0;                 /* 去掉默认 margin，保持对齐 */
    font-size: 1.8rem;
    color: #333;
}

/* 网格布局：3列，每列宽度相等，间距 20px */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 核心：3等分 */
    gap: 30px; /* 卡片之间的间距 */
    margin-bottom: 40px;
}

/* 响应式：屏幕变窄时（如平板/手机），改为1列或2列 */
@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr); /* 平板显示2列 */
    }
}
@media (max-width: 600px) {
    .article-grid {
        grid-template-columns: 1fr; /* 手机显示1列 */
    }
}

/* 卡片样式 */
.article-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 标题样式 */
.card-title {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 10px;
}
.card-title a {
    text-decoration: none;
    color: #333;
}
.card-title a:hover {
    color: #007bff;
}

/* 摘要样式 */
.card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 15px 0;
    flex-grow: 1; /* 让摘要撑开高度，保证底部对齐 */
}

/* 标签样式 */
.card-tags {
    margin-top: auto; /* 将标签推到底部 */
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.tag-pill {
    display: inline-block;
    background: #f8f9fa;
    color: #555;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* More 按钮居中 */
.more-container {
    text-align: center;
    margin-top: 20px;
}

.btn-more {
    display: inline-block;
    padding: 10px 30px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-more:hover {
    background-color: #0056b3;
}