/**
 * 首页文章列表样式
 * 只显示标题，PC端2列布局，移动端1列布局，紧凑设计
 */

/* 首页文章列表容器 - PC端2列布局，移动端1列布局 */
body.home .posts-wrapper,
body.blog .posts-wrapper,
body.archive .posts-wrapper,
.home .posts-wrapper,
.blog .posts-wrapper,
.archive .posts-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 首页文章项 - PC端2列布局 */
body.home .posts-wrapper > article,
body.blog .posts-wrapper > article,
body.archive .posts-wrapper > article,
.home .posts-wrapper > article,
.blog .posts-wrapper > article,
.archive .posts-wrapper > article {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    margin-bottom: 0 !important;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    box-sizing: border-box;
}

/* 减小文章项的 padding */
body.home .posts-wrapper > article.post,
body.blog .posts-wrapper > article.post,
body.archive .posts-wrapper > article.post,
.home .posts-wrapper > article.post,
.blog .posts-wrapper > article.post,
.archive .posts-wrapper > article.post,
body.home .posts-wrapper > article[class*="post-"],
body.blog .posts-wrapper > article[class*="post-"],
body.archive .posts-wrapper > article[class*="post-"],
.home .posts-wrapper > article[class*="post-"],
.blog .posts-wrapper > article[class*="post-"],
.archive .posts-wrapper > article[class*="post-"] {
    padding: 12px 20px !important;
}

/* 针对 post-1 的特定 padding */
#post-1,
article.post-1,
article[class*="post-1"] {
    padding: 6px 10px !important;
}

/* 文章项悬停效果 */
body.home .posts-wrapper > article:hover,
body.blog .posts-wrapper > article:hover,
body.archive .posts-wrapper > article:hover,
.home .posts-wrapper > article:hover,
.blog .posts-wrapper > article:hover,
.archive .posts-wrapper > article:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(8px);
    border-left: 4px solid #667eea;
}

/* 首页文章项：最后一个不显示边框 */
.home .posts-wrapper > article:last-child,
.blog .posts-wrapper > article:last-child,
.archive .posts-wrapper > article:last-child {
    border-bottom: none;
    border-bottom-right-radius: 12px;
}

/* 每行的最后一个文章项（偶数项）不显示右边框 */
.home .posts-wrapper > article:nth-child(2n),
.blog .posts-wrapper > article:nth-child(2n),
.archive .posts-wrapper > article:nth-child(2n) {
    border-right: none;
}

/* 倒数第二个文章项（如果是奇数总数）不显示下边框 */
.home .posts-wrapper > article:nth-last-child(2),
.blog .posts-wrapper > article:nth-last-child(2),
.archive .posts-wrapper > article:nth-last-child(2) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 第一个文章项圆角 */
.home .posts-wrapper > article:first-child,
.blog .posts-wrapper > article:first-child,
.archive .posts-wrapper > article:first-child {
    border-top-left-radius: 12px;
}

/* 第二个文章项圆角 */
.home .posts-wrapper > article:nth-child(2),
.blog .posts-wrapper > article:nth-child(2),
.archive .posts-wrapper > article:nth-child(2) {
    border-top-right-radius: 12px;
}

/* 隐藏缩略图 */
body.home .nv-post-thumbnail-wrap,
body.blog .nv-post-thumbnail-wrap,
body.archive .nv-post-thumbnail-wrap,
.home .nv-post-thumbnail-wrap,
.blog .nv-post-thumbnail-wrap,
.archive .nv-post-thumbnail-wrap {
    display: none !important;
}

/* 隐藏文章元数据 */
body.home .nv-meta-list,
body.blog .nv-meta-list,
body.archive .nv-meta-list,
.home .nv-meta-list,
.blog .nv-meta-list,
.archive .nv-meta-list {
    display: none !important;
}

/* 隐藏摘要内容 */
body.home .excerpt-wrap,
body.blog .excerpt-wrap,
body.archive .excerpt-wrap,
.home .excerpt-wrap,
.blog .excerpt-wrap,
.archive .excerpt-wrap {
    display: none !important;
}

/* 隐藏阅读更多按钮 */
body.home .button,
body.blog .button,
body.archive .button,
.home .button,
.blog .button,
.archive .button {
    display: none !important;
}

/* 只显示标题，紧凑布局 */
body.home .article-content-col,
body.blog .article-content-col,
body.archive .article-content-col,
.home .article-content-col,
.blog .article-content-col,
.archive .article-content-col {
    padding: 0 !important;
}

body.home .article-content-col .content,
body.blog .article-content-col .content,
body.archive .article-content-col .content,
.home .article-content-col .content,
.blog .article-content-col .content,
.archive .article-content-col .content {
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
}

/* 标题样式优化 */
body.home .blog-entry-title,
body.blog .blog-entry-title,
body.archive .blog-entry-title,
.home .blog-entry-title,
.blog .blog-entry-title,
.archive .blog-entry-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    line-height: 1.6 !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
}

body.home .blog-entry-title a,
body.blog .blog-entry-title a,
body.archive .blog-entry-title a,
.home .blog-entry-title a,
.blog .blog-entry-title a,
.archive .blog-entry-title a,
body.home .blog-entry-title.entry-title a,
body.blog .blog-entry-title.entry-title a,
body.archive .blog-entry-title.entry-title a,
.home .blog-entry-title.entry-title a,
.blog .blog-entry-title.entry-title a,
.archive .blog-entry-title.entry-title a,
body.home .blog-entry-title.is-h4 a,
body.blog .blog-entry-title.is-h4 a,
body.archive .blog-entry-title.is-h4 a,
.home .blog-entry-title.is-h4 a,
.blog .blog-entry-title.is-h4 a,
.archive .blog-entry-title.is-h4 a {
    color: #2d3748 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: block !important;
    padding: 4px 0 !important;
    position: relative;
    letter-spacing: -0.3px;
}

body.home .blog-entry-title a::before,
body.blog .blog-entry-title a::before,
body.archive .blog-entry-title a::before,
.home .blog-entry-title a::before,
.blog .blog-entry-title a::before,
.archive .blog-entry-title a::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #cbd5e0;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

body.home .blog-entry-title a:hover,
body.blog .blog-entry-title a:hover,
body.archive .blog-entry-title a:hover,
.home .blog-entry-title a:hover,
.blog .blog-entry-title a:hover,
.archive .blog-entry-title a:hover {
    color: #667eea !important;
    transform: translateX(5px);
}

body.home .blog-entry-title a:hover::before,
body.blog .blog-entry-title a:hover::before,
body.archive .blog-entry-title a:hover::before,
.home .blog-entry-title a:hover::before,
.blog .blog-entry-title a:hover::before,
.archive .blog-entry-title a:hover::before {
    opacity: 1;
    background: #667eea;
    transform: translateY(-50%) scale(1.2);
}

/* 隐藏非网格布局的特殊样式 */
.home .nv-non-grid-article,
.blog .nv-non-grid-article,
.archive .nv-non-grid-article {
    margin-bottom: 0;
    align-items: center;
}

.home .nv-non-grid-article .non-grid-content,
.blog .nv-non-grid-article .non-grid-content,
.archive .nv-non-grid-article .non-grid-content {
    width: 100%;
}

/* 隐藏网格布局的特殊样式 */
.home .layout-grid .content > *,
.blog .layout-grid .content > *,
.archive .layout-grid .content > * {
    margin-bottom: 0;
}

/* 确保容器宽度 */
body.home .nv-index-posts,
body.blog .nv-index-posts,
body.archive .nv-index-posts,
.home .nv-index-posts,
.blog .nv-index-posts,
.archive .nv-index-posts {
    max-width: 1200px !important;
    margin: 60px auto 40px !important;
    padding: 0 40px !important;
}

/* 添加加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home .posts-wrapper > article,
.blog .posts-wrapper > article,
.archive .posts-wrapper > article {
    animation: fadeInUp 0.5s ease-out;
}

.home .posts-wrapper > article:nth-child(1) { animation-delay: 0.1s; }
.home .posts-wrapper > article:nth-child(2) { animation-delay: 0.15s; }
.home .posts-wrapper > article:nth-child(3) { animation-delay: 0.2s; }
.home .posts-wrapper > article:nth-child(4) { animation-delay: 0.25s; }
.home .posts-wrapper > article:nth-child(5) { animation-delay: 0.3s; }
.home .posts-wrapper > article:nth-child(6) { animation-delay: 0.35s; }
.home .posts-wrapper > article:nth-child(7) { animation-delay: 0.4s; }
.home .posts-wrapper > article:nth-child(8) { animation-delay: 0.45s; }

/* 添加日期徽章 */
.home .posts-wrapper > article::after,
.blog .posts-wrapper > article::after,
.archive .posts-wrapper > article::after {
    content: attr(data-post-date);
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.home .posts-wrapper > article:hover::after,
.blog .posts-wrapper > article:hover::after,
.archive .posts-wrapper > article:hover::after {
    color: #667eea;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    opacity: 1;
}

/* 中等屏幕 */
@media (max-width: 1200px) {
    .home .nv-index-posts,
    .blog .nv-index-posts,
    .archive .nv-index-posts {
        padding: 0 30px;
        max-width: 1000px;
    }
    
    .home .posts-wrapper > article,
    .blog .posts-wrapper > article,
    .archive .posts-wrapper > article {
        padding: 18px 25px;
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    /* 减小文章项的 padding */
    .home .posts-wrapper > article.post,
    .blog .posts-wrapper > article.post,
    .archive .posts-wrapper > article.post,
    .home .posts-wrapper > article[class*="post-"],
    .blog .posts-wrapper > article[class*="post-"],
    .archive .posts-wrapper > article[class*="post-"] {
        padding: 10px 18px !important;
    }
    
    /* 每行的最后一个文章项不显示右边框 */
    .home .posts-wrapper > article:nth-child(2n),
    .blog .posts-wrapper > article:nth-child(2n),
    .archive .posts-wrapper > article:nth-child(2n) {
        border-right: none;
    }
    
    .home .posts-wrapper > article::after,
    .blog .posts-wrapper > article::after,
    .archive .posts-wrapper > article::after {
        right: 25px;
    }
}

/* 平板 */
@media (max-width: 992px) {
    .home .nv-index-posts,
    .blog .nv-index-posts,
    .archive .nv-index-posts {
        padding: 0 25px;
        max-width: 800px;
        margin: 50px auto 30px;
    }
    
    .home .posts-wrapper > article,
    .blog .posts-wrapper > article,
    .archive .posts-wrapper > article {
        padding: 16px 20px;
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    /* 减小文章项的 padding */
    .home .posts-wrapper > article.post,
    .blog .posts-wrapper > article.post,
    .archive .posts-wrapper > article.post,
    .home .posts-wrapper > article[class*="post-"],
    .blog .posts-wrapper > article[class*="post-"],
    .archive .posts-wrapper > article[class*="post-"] {
        padding: 8px 15px !important;
    }
    
    /* 每行的最后一个文章项不显示右边框 */
    .home .posts-wrapper > article:nth-child(2n),
    .blog .posts-wrapper > article:nth-child(2n),
    .archive .posts-wrapper > article:nth-child(2n) {
        border-right: none;
    }
    
    .home .blog-entry-title,
    .blog .blog-entry-title,
    .archive .blog-entry-title {
        font-size: 16px !important;
    }
    
    .home .posts-wrapper > article::after,
    .blog .posts-wrapper > article::after,
    .archive .posts-wrapper > article::after {
        right: 20px;
        font-size: 11px;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .home .nv-index-posts,
    .blog .nv-index-posts,
    .archive .nv-index-posts {
        padding: 0 20px;
        margin: 40px auto 20px;
    }

    /* 移动端恢复为1列布局 */
    body.home .posts-wrapper,
    body.blog .posts-wrapper,
    body.archive .posts-wrapper,
    .home .posts-wrapper,
    .blog .posts-wrapper,
    .archive .posts-wrapper {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    body.home .posts-wrapper > article,
    body.blog .posts-wrapper > article,
    body.archive .posts-wrapper > article,
    .home .posts-wrapper > article,
    .blog .posts-wrapper > article,
    .archive .posts-wrapper > article {
        padding: 14px 15px;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        border-right: none !important;
    }
    
    /* 减小文章项的 padding */
    .home .posts-wrapper > article.post,
    .blog .posts-wrapper > article.post,
    .archive .posts-wrapper > article.post,
    .home .posts-wrapper > article[class*="post-"],
    .blog .posts-wrapper > article[class*="post-"],
    .archive .posts-wrapper > article[class*="post-"] {
        padding: 6px 12px !important;
    }

    .home .blog-entry-title,
    .blog .blog-entry-title,
    .archive .blog-entry-title {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }
    
    .home .posts-wrapper {
        border-radius: 8px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }
    
    .home .posts-wrapper > article::after,
    .blog .posts-wrapper > article::after,
    .archive .posts-wrapper > article::after {
        position: static;
        transform: none;
        display: inline-block;
        margin-left: 10px;
        margin-top: 5px;
    }
    
    .home .posts-wrapper > article:hover {
        transform: translateX(4px);
    }
    
    body.home .blog-entry-title a:hover,
    body.blog .blog-entry-title a:hover,
    body.archive .blog-entry-title a:hover,
    .home .blog-entry-title a:hover,
    .blog .blog-entry-title a:hover,
    .archive .blog-entry-title a:hover {
        transform: translateX(3px);
    }
}

/* 小屏幕 */
@media (max-width: 480px) {
    .home .nv-index-posts,
    .blog .nv-index-posts,
    .archive .nv-index-posts {
        padding: 0 15px;
        margin: 30px auto 15px;
    }

    .home .posts-wrapper > article,
    .blog .posts-wrapper > article,
    .archive .posts-wrapper > article {
        padding: 12px 12px;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        border-right: none !important;
    }
    
    /* 减小文章项的 padding */
    .home .posts-wrapper > article.post,
    .blog .posts-wrapper > article.post,
    .archive .posts-wrapper > article.post,
    .home .posts-wrapper > article[class*="post-"],
    .blog .posts-wrapper > article[class*="post-"],
    .archive .posts-wrapper > article[class*="post-"] {
        padding: 5px 10px !important;
    }

    .home .blog-entry-title,
    .blog .blog-entry-title,
    .archive .blog-entry-title {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .home .posts-wrapper {
        border-radius: 6px;
    }
    
    .home .posts-wrapper > article::after,
    .blog .posts-wrapper > article::after,
    .archive .posts-wrapper > article::after {
        font-size: 10px;
        padding: 3px 8px;
        margin-left: 8px;
    }
    
    body.home .blog-entry-title a::before,
    body.blog .blog-entry-title a::before,
    body.archive .blog-entry-title a::before,
    .home .blog-entry-title a::before,
    .blog .blog-entry-title a::before,
    .archive .blog-entry-title a::before {
        left: -10px;
        width: 4px;
        height: 4px;
    }
}

/* 空状态样式 */
.home .posts-wrapper:empty::before,
.blog .posts-wrapper:empty::before,
.archive .posts-wrapper:empty::before {
    content: "暂无文章";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 16px;
    font-style: italic;
}

/* 焦点状态可访问性 */
body.home .blog-entry-title a:focus,
body.blog .blog-entry-title a:focus,
body.archive .blog-entry-title a:focus,
.home .blog-entry-title a:focus,
.blog .blog-entry-title a:focus,
.archive .blog-entry-title a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .home .posts-wrapper,
    .blog .posts-wrapper,
    .archive .posts-wrapper {
        background: #2d3748;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }
    
    .home .posts-wrapper > article,
    .blog .posts-wrapper > article,
    .archive .posts-wrapper > article {
        background: #2d3748;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .home .posts-wrapper > article:hover,
    .blog .posts-wrapper > article:hover,
    .archive .posts-wrapper > article:hover {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    body.home .blog-entry-title a,
    body.blog .blog-entry-title a,
    body.archive .blog-entry-title a,
    .home .blog-entry-title a,
    .blog .blog-entry-title a,
    .archive .blog-entry-title a {
        color: #e2e8f0 !important;
    }
    
    .home .posts-wrapper > article::after,
    .blog .posts-wrapper > article::after,
    .archive .posts-wrapper > article::after {
        background: rgba(45, 55, 72, 0.8);
        border-color: #4a5568;
        color: #a0aec0;
    }
}

