#main-body {
    padding-top: 5em;
    max-width: 940px;
    margin: 0 auto;
}

.post-grid {
    display: grid;
    gap: 10px;
    margin: 0;
    list-style: none;
    padding: 10px;
    /* 默认：单列（手机） */
    grid-template-columns: repeat(2, 1fr);
}

/* 平板及以上：两列 */
@media (min-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* 桌面：三列 */
@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* 首篇置顶文章（仅首页第一页） */
.post-card--featured {
    grid-column: 1 / -1; /* 横跨整行 */
}

@media (min-width: 768px) {
    .post-card--featured {
        grid-column: span 3; /* 平板占两列 */
    }
}

@media (min-width: 1024px) {
    .post-card--featured {
        grid-column: span 3; /* 桌面占三列 */
    }
}

/* 卡片样式 */
.post-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* 图片区 */
.post-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image {
    transform: scale(1.03);
}

/* 置顶徽章 */
.post-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--main-color, #42b983);
    color: white;
    font-size: 0.8125rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    z-index: 2;
}

/* 卡片内容区 */
.post-card__body {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 140px; /* 保证底部对齐 */
}

.post-card__title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    color: #222;
    flex: 1; /* 占据剩余空间，让 footer 固定在底部 */
}

/* 摘要（可选） */
.post-card__excerpt {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* 底部：日期 + 标签 */
.post-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto; /* 关键：推到底部 */
}

.post-card__date {
    font-size: 0.8125rem;
    color: #888;
    white-space: nowrap;
}

.post-card__tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.post-tag {
    background: #f0f4ff;
    color: #5d7af9;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 3rem;
    text-align: center;
}

.pagination-inner {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-inner a,
.pagination-inner span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-inner a:hover {
    background: #f0f4ff;
    color: var(--main-color, #42b983);
}

.pagination-inner .current {
    background: var(--main-color, #42b983);
    color: white;
}