/* art/type.html */

.art-type-main { flex: 1; }

/* ---------- layout ---------- */
.art-layout {
    max-width: 1760px; margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr 240px;
    gap: 20px;
    padding: 20px 20px 40px;
    align-items: start;
}

/* ---------- left nav ---------- */
.art-leftnav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: sticky;
    top: calc(var(--topbar-h) + 12px);
}
.aln-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    font-size: 14px; color: var(--text-2);
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}
.aln-item:last-child { border-bottom: none; }
.aln-item:hover { color: var(--text-1); background: var(--bg-elevated); }
.aln-item.is-active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.aln-item iconify-icon { font-size: 16px; }

/* ---------- breadcrumb ---------- */
.art-breadcrumb {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px; font-size: 13px; color: var(--text-3);
    margin-bottom: 16px;
}
.art-breadcrumb a { color: var(--text-2); }
.art-breadcrumb a:hover { color: var(--accent); }
.bc-sep { color: var(--text-3); font-size: 12px; }
.bc-current { color: var(--text-1); }

/* ---------- art slider ---------- */
.art-slider {
    position: relative; overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 16/7;
    margin-bottom: 20px;
    background: var(--bg-elevated);
}
.art-slider-track {
    display: flex; transition: transform 0.4s ease;
}
.art-slide { flex-shrink: 0; width: 100%; position: relative; }
.art-slide img { width: 100%; height: 100%; object-fit: cover; }
.art-slide-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 20px 16px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.art-slide-title { font-size: 14px; font-weight: 600; color: #fff; }
.art-slider-dots {
    position: absolute; bottom: 10px; right: 12px;
    display: flex; gap: 6px;
}
.asd {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.2s;
}
.asd.is-active { background: #fff; width: 18px; border-radius: 3px; }

/* ---------- article list ---------- */
.art-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.art-card {
    display: flex; gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.art-card:hover { border-color: var(--border-2); }
.art-card-thumb {
    flex-shrink: 0;
    width: 120px; height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden; background: var(--bg-elevated);
}
.art-card-thumb a { display: block; width: 100%; height: 100%; }
.art-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.art-card:hover .art-card-thumb img { transform: scale(1.05); }
.art-card-body { flex: 1; min-width: 0; }
.art-card-title {
    display: block; font-size: 15px; font-weight: 600;
    color: var(--text-1); margin-bottom: 6px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.art-card-title:hover { color: var(--accent); }
.art-card-desc { font-size: 13px; color: var(--text-3); margin-bottom: 8px; line-height: 1.5; }
.art-card-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-3); }
.art-card-cat {
    padding: 2px 8px; border-radius: 3px;
    background: var(--accent-light); color: var(--accent); font-size: 11px;
}

/* ---------- sidebar ---------- */
.art-sidebar { position: sticky; top: calc(var(--topbar-h) + 12px); }
.art-sb-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.art-sb-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--text-1);
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.art-hot-list { padding: 8px 0; }
.art-hot-list li a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; font-size: 13px; color: var(--text-2);
    transition: color 0.2s;
}
.art-hot-list li a:hover { color: var(--accent); }
.ahl-num {
    flex-shrink: 0; width: 20px; height: 20px;
    border-radius: 3px; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--text-3);
}
.ahl-num--1 { background: #f0b429; color: #1a1a1a; }
.ahl-num--2 { background: #b0b8c8; color: #1a1a1a; }
.ahl-num--3 { background: #c28060; color: #1a1a1a; }
.ahl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.art-sb-read-list { padding: 8px 12px; }
.art-sb-item a { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.art-sb-item:last-child a { border-bottom: none; }
.asi-thumb { flex-shrink: 0; width: 64px; height: 42px; border-radius: 4px; overflow: hidden; background: var(--bg-elevated); }
.asi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asi-info { flex: 1; min-width: 0; }
.asi-title { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-bottom: 4px; }
.art-sb-item a:hover .asi-title { color: var(--accent); }
.asi-cat { font-size: 11px; color: var(--text-3); }

/* ---------- pagination ---------- */
.pagination {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 6px; padding: 20px 0 8px;
}
.pg-btn, .pg-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--bg-elevated); color: var(--text-2); font-size: 13px; transition: all 0.2s;
}
.pg-btn:hover, .pg-num:hover { color: var(--text-1); border-color: var(--border-2); }
.pg-num.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-info { font-size: 12px; color: var(--text-3); margin-left: 8px; }

/* ===== RWD ===== */

/* 平板 ≤ 1023px：收起右侧 sidebar，左侧 nav 缩窄 */
@media (max-width: 1023px) {
    .art-layout {
        grid-template-columns: 140px 1fr;
        gap: 14px;
        padding: 16px 16px 60px;
    }
    .art-sidebar { display: none; }
    .art-card-thumb { width: 100px; height: 68px; }
    .art-card-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* 手机 ≤ 767px：单栏，左侧 nav → 横向滚动标签列 */
@media (max-width: 767px) {
    .art-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 10px 10px 80px;
        overflow-x: hidden;
    }

    /* 左侧分类改为横向滚动列 */
    .art-leftnav {
        position: static;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        border-radius: var(--radius);
        min-width: 0;
        width: 100%;
    }
    .art-leftnav::-webkit-scrollbar { display: none; }
    .aln-item {
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 9px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
    .aln-item:last-child { border-right: none; }

    /* 主内容区块防止超宽 */
    .art-content { min-width: 0; width: 100%; }

    /* 轮播缩小 */
    .art-slider { aspect-ratio: 16/9; margin-bottom: 12px; }

    /* 文章卡片 */
    .art-card { display: flex; flex-direction: row; gap: 12px; padding: 12px; align-items: flex-start; }
    .art-card-thumb { width: 116px; height: 78px; flex-shrink: 0; }
    .art-card-body { flex: 1; min-width: 0; display: block; }
    .art-card-title {
        display: -webkit-box;
        font-size: 14px;
        font-weight: 600;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.45;
        margin-bottom: 5px;
    }
    .art-card-desc {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
        color: var(--text-3);
        margin-bottom: 6px;
    }
    .art-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 11px; }
}
