/**
 * 博客集合页面样式
 * 模板: template-blog.php
 */

/* ===== 博客页面整体布局 ===== */
.blog-collection-page {
    padding-bottom: 60px !important;
}

.blog-collection-page .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 页面标题区域 ===== */
.blog-page-header {
    text-align: center;
    padding: 80px 0 30px;
}

.blog-page-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 10px 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.blog-page-title i {
    color: #6366f1;
    font-size: 28px;
}

.blog-page-subtitle {
    font-size: 16px;
    color: #888;
    margin: 0;
}

/* ===== 博客网格容器 ===== */
.blog-grid-container {
    width: 100%;
}

/* ===== 博客卡片网格 ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
}

/* ===== 单个博客卡片 ===== */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f5;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

/* 卡片链接 */
.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ===== 卡片图片区域 ===== */
.blog-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

/* 分类标签 */
.blog-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

/* ===== 卡片内容区域 ===== */
.blog-card-content {
    padding: 16px;
}

.blog-card-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    line-height: 1.4 !important;
    margin: 0 0 10px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
    color: #6366f1 !important;
}

.blog-card-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 卡片底部元信息 ===== */
.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f0f0f5;
}

.blog-card-date {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-card-date i {
    font-size: 12px;
}

.blog-card-readmore {
    font-size: 12px;
    color: #6366f1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-readmore {
    gap: 8px;
}

.blog-card-readmore i {
    font-size: 10px;
}

/* ===== 空状态 ===== */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
}

.blog-empty-icon {
    color: #d1d5db;
    margin-bottom: 20px;
}

.blog-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.blog-empty p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* ===== 分页样式 ===== */
.blog-collection-page .posts-nav {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f5;
}

.blog-collection-page .posts-nav a,
.blog-collection-page .posts-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    margin: 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-collection-page .posts-nav a:hover {
    color: #fff;
    background: #6366f1;
    border-color: #6366f1;
}

.blog-collection-page .posts-nav .current {
    color: #fff;
    background: #6366f1;
    border-color: #6366f1;
}

/* ===== 响应式：平板 (2列) ===== */
@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ===== 响应式：小平板 (2列) ===== */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .blog-page-header {
        padding: 30px 0 20px;
    }

    .blog-page-title {
        font-size: 24px !important;
    }

    .blog-page-title i {
        font-size: 22px;
    }

    .blog-card-image {
        height: 140px;
    }

    .blog-card-content {
        padding: 12px;
    }

    .blog-card-title {
        font-size: 14px !important;
    }

    .blog-card-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

/* ===== 响应式：手机 (1列) ===== */
@media (max-width: 540px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-page-header {
        padding: 20px 0 16px;
    }

    .blog-page-title {
        font-size: 20px !important;
    }

    .blog-page-subtitle {
        font-size: 14px;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-card-content {
        padding: 14px;
    }

    .blog-card-title {
        font-size: 15px !important;
        -webkit-line-clamp: 1;
    }

    .blog-card-excerpt {
        font-size: 13px;
    }

    .blog-empty {
        padding: 60px 20px;
    }
}
