/* ============================================================
   文章列表 / 分类页样式（移植自 ww.w.liuliu1.com qiming 模板 list.css）
   适用：emlog 分类页（log_list.php 的 sortid 分支）
   继承 style.css 的设计令牌
   ============================================================ */

/* ===== 页面头部 ===== */
.page-head {
    margin: 26px 0 18px;
}
.page-head .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-3);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.page-head .breadcrumb a {
    color: var(--text-2);
}
.page-head .breadcrumb a:hover {
    color: var(--brand);
}
.page-head .breadcrumb i {
    font-size: 11px;
    color: #C9BFB6;
}
.page-head h1 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    font-family: var(--serif);
    letter-spacing: 3px;
    display: inline-block;
    position: relative;
    padding-bottom: 12px;
}
.page-head h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand), var(--gold));
}
.page-head .page-sub {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-3);
    letter-spacing: 0.5px;
}
.page-head .page-sub b {
    color: var(--brand);
    font-weight: 800;
}

/* ===== 分类标签 ===== */
.category-tabs-wrapper {
    margin-bottom: 22px;
}
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs.grabbing { cursor: grabbing; }
.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #FBF8F5;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s;
    text-decoration: none;
}
.category-tab i { font-size: 12px; color: var(--brand); opacity: 0.75; }
.category-tab:hover {
    border-color: var(--gold-line);
    color: var(--brand);
    background: var(--brand-soft);
}
.category-tab.active {
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(169, 49, 33, 0.24);
}
.category-tab.active i { color: #fff; opacity: 1; }
.category-tab .tab-count {
    display: inline-block;
    background: rgba(169, 49, 33, 0.08);
    color: var(--brand);
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    margin-left: 2px;
}
.category-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

/* ===== 两栏布局 ===== */
.two-col {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 92px;
}

/* ===== 文章条目 ===== */
.article-list-item {
    display: flex;
    gap: 18px;
    background: #fff;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s;
    position: relative;
    overflow: hidden;
}
.article-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand), var(--gold));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}
.article-list-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold-line);
}
.article-list-item:hover::before {
    transform: scaleY(1);
}
.article-list-item .list-thumb-link {
    flex-shrink: 0;
    width: 200px;
    height: 138px;
    border-radius: 12px;
    overflow: hidden;
    background: #F2EAE2;
}
.article-list-item .list-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.article-list-item:hover .list-thumb-link img {
    transform: scale(1.05);
}
.article-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.article-list-title {
    font-size: 17.5px;
    font-weight: 700;
    margin-bottom: 9px;
    line-height: 1.55;
}
.article-list-title a {
    color: var(--text);
    transition: color 0.2s;
}
.article-list-title a:hover {
    color: var(--brand);
}
.article-list-desc {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-list-meta {
    color: var(--text-3);
    font-size: 13px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--line-soft);
}
.article-list-meta i { margin-right: 4px; color: #C9BFB6; }
.read-more {
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.25s;
}
.read-more:hover { gap: 9px; }
.read-more i { font-size: 11px; margin: 0; color: var(--brand); }

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    margin-left: 6px;
    font-weight: 700;
    vertical-align: middle;
}
.badge-recommend { background: var(--brand-soft); color: var(--brand); }
.badge-hot { background: #FBEDEA; color: #C0392B; }

/* ===== 侧边栏 ===== */
.sidebar-card {
    background: #fff;
    padding: 20px 20px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.sidebar-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    position: relative;
    font-family: var(--serif);
    letter-spacing: 1px;
}
.sidebar-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--gold));
}
.sidebar-card h3 i { color: var(--brand); margin-right: 8px; font-size: 15px; }

.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list li {
    padding: 11px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-2);
    font-size: 14px;
    transition: color 0.2s;
}
.sidebar-list a:hover { color: var(--brand); }
.sidebar-list .list-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}
.sidebar-list .list-views,
.sidebar-list .list-date {
    color: var(--text-3);
    font-size: 12px;
    white-space: nowrap;
    background: #FAF6F1;
    padding: 1px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}
.sidebar-list .sidebar-empty {
    color: #ccc;
    text-align: center;
    padding: 10px 0;
}

/* ===== 分页（适配 emlog pagination() 输出的 a/span/em 结构）===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 10px;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s;
}
.pagination a:hover {
    border-color: var(--gold-line);
    color: var(--brand);
    background: var(--brand-soft);
}
.pagination span {
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    border-color: transparent;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(169, 49, 33, 0.24);
}
.pagination em {
    font-style: normal;
    color: var(--text-3);
    padding: 0 2px;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-3);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.empty-state i {
    font-size: 48px;
    color: #E2D6CA;
    display: block;
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 16px;
    margin-bottom: 18px;
}
.btn-primary {
    display: inline-block;
    padding: 11px 30px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(169, 49, 33, 0.22);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    transform: translateY(-2px);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .sidebar {
        position: static;
        width: 100%;
    }
    .two-col {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .page-head { margin: 18px 0 14px; }
    .page-head h1 { font-size: 22px; letter-spacing: 2px; }
    .article-list-item {
        flex-direction: column;
        padding: 16px;
    }
    .article-list-item .list-thumb-link {
        width: 100%;
        height: 180px;
    }
    .article-list-title { font-size: 15.5px; }
    .article-list-desc { font-size: 13px; }
    .article-list-meta { gap: 12px; font-size: 12px; }
    .read-more { margin-left: 0; }
    .category-tab { padding: 6px 14px; font-size: 13px; }
    .pagination a,
    .pagination span { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
}

/* ===== emlog 主题适配 ===== */
/* style.css 已给 .category-page 34px 顶部内边距、.sidebar 为 flex 纵向布局，这里对齐参考稿间距 */
.category-page { padding-top: 12px; padding-bottom: 40px; }
.category-page .sidebar-card { margin-bottom: 0; }
