/* ============================================
 * 博客分类页面样式
 * ============================================ */

/* 博客文章列表容器 */
.blog-post {
    display: flex;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

/* 鼠标悬停边框效果 */
.blog-post:hover {
    border-color: #333;
}

/* 奇数行：图片在左，内容在右 */
.blog-post.odd {
    flex-direction: row;
}

/* 偶数行：内容在左，图片在右 */
.blog-post.even {
    flex-direction: row-reverse;
}

/* 图片区域 */
.blog-post-image {
    flex: 0 0 50%;
    height: 300px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 内容区域 */
.blog-post-content {
    flex: 0 0 50%;
    height: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* 奇数行内容背景和颜色 */
.blog-post.odd .blog-post-content {
    background-color: #333;
    color: #fff;
}

/* 偶数行内容背景和颜色 */
.blog-post.even .blog-post-content {
    background-color: #F7F7F7;
    color: #333;
}

/* 文章标题 */
.blog-post-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.blog-post-title a {
    color: inherit;
    text-decoration: none;
}

/* 文章摘要 */
.blog-post-excerpt {
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端垂直布局 */
    .blog-post,
    .blog-post.odd,
    .blog-post.even {
        flex-direction: column;
    }

    .blog-post-image,
    .blog-post-content {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
    }

    .blog-post-image {
        height: 200px;
    }

    .blog-post-content {
        height: auto;
        min-height: 200px;
        padding: 25px;
    }

    .blog-post-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .blog-post-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 480px) {
    .blog-post-image {
        height: 180px;
    }

    .blog-post-content {
        padding: 20px;
        min-height: auto;
    }

    .blog-post-title {
        font-size: 18px;
    }

    .blog-post-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
}

/* ============================================
 * 博客分类页面 内容模板样式
 * ============================================ */

