/* 基础容器 */
.post-list {
    padding: 15px;
    background: #fff;
}

.post-list .title {
    width: 100%;
    border-bottom: 1px solid #ddd;
    padding: 0 0 3px 0;
    overflow: hidden;
    margin-bottom: 10px; /* 标题与列表之间增加间距 */
}

.main-title {
    float: left;
    line-height: 40px;
    font-size: 18px;
    font-weight: normal;
    position: relative;
    text-indent: 10px;
    margin: 0;
}

.main-title:before {
    content: '';
    border-left: 2px solid #0590d6;
    display: inline-block;
    height: 18px;
    position: absolute;
    left: 0;
    bottom: 10px;
}

.post-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 增加列表项间距 - 上下留白更多 */
.post-item {
    width: 100%;
    padding: 30px 0; /* 从25px增加到30px，让文章之间更宽松 */
    border-bottom: 1px solid #eee;
    position: relative;
}

/* 核心左右布局 */
.post-link {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    position: relative;
}

.post-thumb {
    width: 160px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.post-meta {
    flex: 1;
    margin-left: 20px;
    text-align: left;
    min-width: 0;
    overflow: hidden;
}

.post-title {
    font-size: 16px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: normal;
    margin: 0;
    line-height: 1.4;
}

.post-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    margin: 12px 0 0 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.post-date {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    display: block;
}

/* 分类标签定位在图片左上角，留出10px边距 */
.category-title {
    position: absolute;
    left: 10px;      /* 距离图片左边缘10px */
    top: 40px;       /* 30px(post-item padding-top) + 10px(间距) */
    padding: 6px 10px; /* 稍微增加内边距，更易点击 */
    font-size: 12px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, .7); /* 稍微加深背景，确保文字清晰 */
    border-radius: 3px;
    text-decoration: none;
    z-index: 2;      /* 确保在图片之上 */
}

/************************************* 响应式（保持左右布局） ****************************************/

@media screen and (max-width: 768px) {
    .post-list {
        padding: 10px;
    }

    .main-title {
        font-size: 16px;
        line-height: 36px;
    }

    .main-title:before {
        height: 16px;
        bottom: 10px;
    }

    /* 平板端间距 */
    .post-item {
        padding: 25px 0; /* 从20px增加到25px */
    }

    .post-thumb {
        width: 120px;
        height: 90px;
        font-size: 16px;
    }

    .post-meta {
        margin-left: 15px;
    }

    .post-title {
        font-size: 15px;
    }

    .post-desc {
        font-size: 13px;
        line-height: 1.5;
        margin-top: 10px;
    }

    .post-date {
        margin-top: 10px;
        font-size: 11px;
    }

    /* 对应padding-top: 25px，标签距顶部35px */
    .category-title {
        left: 10px;
        top: 35px; /* 25px + 10px */
        padding: 5px 8px;
        font-size: 11px;
    }
}

@media screen and (max-width: 480px) {
    .post-list {
        padding: 8px;
    }

    /* 手机端间距 */
    .post-item {
        padding: 22px 0; /* 从18px增加到22px */
    }

    .post-thumb {
        width: 100px;
        height: 75px;
        font-size: 12px;
    }

    .post-meta {
        margin-left: 12px;
    }

    .post-title {
        font-size: 14px;
        line-height: 1.4;
    }

    .post-desc {
        font-size: 12px;
        line-height: 1.5;
        margin-top: 8px;
        -webkit-line-clamp: 2;
    }

    .post-date {
        margin-top: 8px;
        font-size: 10px;
    }

    /* 对应padding-top: 22px，标签距顶部32px */
    .category-title {
        left: 8px;  /* 稍微减少边距，适配小屏 */
        top: 32px;  /* 22px + 10px */
        padding: 4px 6px;
        font-size: 10px;
    }
}

@media screen and (max-width: 375px) {
    .post-item {
        padding: 20px 0;
    }

    .post-thumb {
        width: 80px;
        height: 60px;
        font-size: 12px;
    }

    .post-meta {
        margin-left: 10px;
    }

    .post-title {
        font-size: 13px;
    }

    .post-desc {
        font-size: 11px;
        margin-top: 6px;
        -webkit-line-clamp: 1;
    }

    .post-date {
        margin-top: 6px;
    }

    /* 对应padding-top: 20px，标签距顶部30px */
    .category-title {
        left: 8px;
        top: 30px; /* 20px + 10px */
        padding: 3px 5px;
        font-size: 10px;
    }
}