/* 分类头部 */
.category-header {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #0090a5, #0a5a9a);
    color: white;
}

.category-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.category-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* 文章列表 */
.articles-list {
    padding:0 20px;
}

.article-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.article-item:last-child { border-bottom: none; }

.article-thumbnail {
    width: 200px;                 /* 指定宽度 */
    aspect-ratio: 605 / 375;      /* 按 605:375 比例自动算高（≈124px） */
    height: auto;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-title a {
    color: #2c3e50;
    transition: color 0.3s;
}

.article-title a:hover { color: #0090a5; }

.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;           /* 多行省略基础 */
    line-clamp: 2;                  /* 标准属性，增强兼容 */
    -webkit-line-clamp: 2;          /* 限制2行 */
    -webkit-box-orient: vertical;   /* 垂直排列 */
    overflow: hidden;               /* 隐藏溢出 */
    max-height: 3.2em;              /* 1.6行高 * 2 行 = 3.2em */
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.article-meta i {
    margin-right: 5px;
}

/* 列表页：时间与浏览量小图标 */
.article-meta .publish-date::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center/contain;
    vertical-align: -2px;
}

.article-meta .icon-eye {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center/contain;
    vertical-align: -2px;
}

/* 分页 */
.pagination-wrapper {
    padding: 20px;
    text-align: center;
}

/* 兼容多种分页结构（div/pages/nav/ul等） */
.pagination-wrapper .pagination,
.pagination-wrapper .pages,
.pagination-wrapper nav,
.pagination-wrapper ul {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination-wrapper a,
.pagination-wrapper span,
.pagination-wrapper li,
.pagination-wrapper li a,
.pagination-wrapper li span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    margin-right: 5px;
}

/* 当前页与激活状态 */
.pagination-wrapper span.current,
.pagination-wrapper a.active,
.pagination-wrapper li.active a,
.pagination-wrapper li span.current {
    background-color: #0090a5;
    color: #fff;
    border-color: #0090a5;
}

/* 悬停效果 */
.pagination-wrapper a:hover, .pagination-wrapper li a:hover { background-color: #0090a5; color: #fff; border-color: #0090a5; }

/* 禁用状态 */
.pagination-wrapper span.disabled,
.pagination-wrapper li.disabled span,
.pagination-wrapper li.disabled a {
    color: #bbb;
    border-color: #eee;
    background-color: #f9f9f9;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    /* 移动端：左图右文布局，参考首页移动端卡片 */
    .article-item {
        flex-direction: row;
        gap: 12px;
        align-items: stretch;
    }
    
    .article-thumbnail {
        width: 120px;
        height: 80px;
        border-radius: 0;
        overflow: hidden;
    }
    
    .article-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .article-title {
        font-size: 16px;
        line-height: 22px;
        margin-bottom: 8px;
        display: -webkit-box;
        line-clamp: 2;                  /* 标准属性，增强兼容 */
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .article-excerpt {
        display: none;
    }
    
    .article-meta {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        font-size: 12px;
        color: #999;
    }
    
    .category-header {
        padding: 20px 15px;
    }
    
    .category-header h1 {
        font-size: 24px;
    }
    
    .articles-list {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 16px;
    }
    
    .article-excerpt {
        font-size: 14px;
    }
    
    .article-meta {
        font-size: 12px;
    }
}
