/* VAN主题 - 最新文章展示模块样式 */
.van-latest-posts-module {
    position: relative;
}

/* 标题样式增强 - 跟随主题日夜模式 */
.section .van-latest-posts-module .section-title,
.van-latest-posts-module .section-title,
.van-latest-posts-module h3.section-title,
.container .van-latest-posts-module .section-title {
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
    /* 不设置固定颜色，让它继承父主题的颜色系统 */
}

.van-latest-posts-module .section-title i {
    color: #007bff;
    font-size: 1.1em;
}

.van-latest-posts-module .section-title small {
    color: #6c757d;
    font-weight: 400;
    margin-left: 10px;
}

/* 分类按钮样式 */
.van-latest-posts-module .home-cat-nav {
    margin-bottom: 1rem;
}

.van-latest-posts-module .home-cat-nav .btn {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #495057;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.van-latest-posts-module .home-cat-nav .btn:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

.van-latest-posts-module .home-cat-nav .btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 文章列表容器 */
.van-latest-posts-module .posts-wrapper {
    position: relative;
}

/* 网格布局优化 */
.van-latest-posts-module .posts-wrapper.grid .row {
    margin: -0.5rem;
}

.van-latest-posts-module .posts-wrapper.grid .row > div {
    padding: 0.5rem;
}

/* 列表布局优化 */
.van-latest-posts-module .posts-wrapper.list .post {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.van-latest-posts-module .posts-wrapper.list .post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* 分页样式 */
.van-pagination-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.van-pagination-wrapper .pagination {
    justify-content: center;
}

.van-pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    line-height: 1.25;
    color: #007bff;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.van-pagination-wrapper .page-numbers:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.van-pagination-wrapper .page-numbers.current {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .van-latest-posts-module .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .van-latest-posts-module .section-title small {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .van-latest-posts-module .home-cat-nav {
        margin-bottom: 1.5rem;
    }
    
    .van-latest-posts-module .home-cat-nav .btn {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }
}

/* 暗色主题适配 - 让标题颜色跟随父主题系统 */
@media (prefers-color-scheme: dark) {
    /* 移除强制颜色设置，让标题继承父主题的暗色模式颜色 */
    
    .van-latest-posts-module .home-cat-nav .btn {
        background: #343a40;
        color: #f8f9fa;
        border-color: #495057;
    }
    
    .van-latest-posts-module .home-cat-nav .btn:hover {
        background: #007bff;
        border-color: #007bff;
    }
    
    .van-latest-posts-module .posts-wrapper.list .post {
        border-color: #495057;
    }
}

/* 兼容父主题的暗色主题类 - 让标题颜色自然继承 */
/* 移除强制颜色设置，让.dark-open状态下的标题继承父主题样式 */

/* 加载动画 */
.van-latest-posts-module .posts-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.van-latest-posts-module .posts-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: van-spin 1s linear infinite;
}

@keyframes van-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 无文章状态样式 */
.van-latest-posts-module .posts-wrapper .item-none {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.van-latest-posts-module .posts-wrapper .item-none i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 鼠标悬停效果增强 */
.van-latest-posts-module .posts-wrapper .post {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.van-latest-posts-module .posts-wrapper.grid .post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
