/* 技术文章列表页 — 统一设计语言，参照下载页风格 */

.tech-desk {
    --tech-accent: var(--primary, #2563eb);
    --tech-ink: var(--text-strong, #0f172a);
    --tech-muted: var(--text-muted, #64748b);
    --tech-line: var(--page-divider, #e2e8f0);
    --tech-bg-soft: var(--panel-head-bg, #f8fafc);
}

/* ===== 页面头部（参照下载页 .dl-page-header） ===== */
.tech-page-header {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-bottom: 0.0625rem solid #e5e7eb;
    padding: 1.25rem 0 1rem;
}

.tech-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--tech-ink);
}

.tech-page-title i {
    color: #2563eb;
}

.tech-page-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

/* ===== 选项卡导航（与下载页共用 .dl-tab-bar 样式） ===== */
.dl-tab-bar {
    background: #fff;
    margin-bottom: 1.5rem;
}

.dl-tab-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.dl-tab-btn {
    background: transparent;
    border: 0.0625rem solid transparent;
    color: #334155;
    padding: 0.5rem 1rem;
    border-radius: 62.4375rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    font-family: inherit;
    text-decoration: none;
}

.dl-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dl-tab-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ===== 保留旧样式以兼容其他页面 ===== */
.tech-brief {
    background: var(--tech-bg-soft);
    border: 0.0625rem solid var(--tech-line);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tech-brief h4 {
    margin: 0 0 0.3rem;
    color: var(--tech-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.tech-brief h4 i {
    color: var(--tech-accent);
}

.tech-brief p {
    margin: 0;
    color: var(--tech-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.tech-brief .btn {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999rem;
}

/* ===== 面板通用标题 ===== */
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.panel-heading h3 {
    margin: 0;
    color: var(--tech-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.panel-heading span {
    color: var(--tech-muted);
    font-size: 0.8rem;
}

/* ===== 右侧推荐阅读侧边栏 ===== */
.sidebar-card {
    background: #fff;
    border: 0.0625rem solid var(--tech-line);
    border-radius: 0.75rem;
    overflow: hidden;
}

.sidebar-title {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tech-ink);
    background: var(--tech-bg-soft);
    border-bottom: 0.0625rem solid var(--tech-line);
}

.sidebar-title i {
    color: #f59e0b;
    font-size: 0.85rem;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 0.0625rem solid var(--tech-line);
    transition: background 0.15s ease;
}

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

.sidebar-item:hover {
    background: var(--tech-bg-soft);
}

.sidebar-item:hover h4 {
    color: var(--tech-accent);
}

.sidebar-item h4 {
    margin: 0 0 0.4rem;
    color: var(--tech-ink);
    font-size: 0.85rem;
    line-height: 1.45;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

/* ===== 保留旧推荐样式以兼容 ===== */
.featured-panel {
    margin-bottom: 1.75rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    border: 0.0625rem solid var(--tech-line);
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
    border-color: var(--primary-light, #bfdbfe);
    background: var(--tech-bg-soft);
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.05);
}

.featured-category {
    display: inline-flex;
    align-self: flex-start;
    color: var(--tech-accent);
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    border: 0.0625rem solid var(--primary-light, #bfdbfe);
    padding: 0.15rem 0.55rem;
    border-radius: 999rem;
    margin-bottom: 0.55rem;
}

.featured-card h4 {
    margin: 0 0 0.45rem;
    color: var(--tech-ink);
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 600;
}

.featured-card p {
    flex: 1;
    margin: 0 0 0.75rem;
    color: var(--tech-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card time {
    color: var(--text-soft, #94a3b8);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

/* ===== 文章列表 ===== */
.tech-list {
    background: #fff;
    border: 0.0625rem solid var(--tech-line);
    border-radius: 0.75rem;
    overflow: hidden;
}

/* 统一的列表项结构：标题区（含分类徽章）+ 元信息区 */
.tech-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: baseline;
    padding: 0.875rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 0.0625rem solid var(--tech-line);
    transition: background 0.15s ease;
}

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

.tech-list-item:hover {
    background: var(--tech-bg-soft);
}

/* 标题行：分类徽章 + 文章标题 */
.tech-row-top {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.tech-category {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--tech-accent);
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    border: 0.0625rem solid var(--primary-light, #bfdbfe);
    padding: 0.12rem 0.55rem;
    border-radius: 999rem;
}

.tech-title {
    color: var(--tech-ink);
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.tech-list-item:hover .tech-title {
    color: var(--tech-accent);
}

/* 元信息：日期等 */
.tech-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    color: var(--text-soft, #94a3b8);
    font-size: 0.8rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ===== 空状态 ===== */
.empty-state {
    padding: 3rem 1rem;
    color: var(--tech-muted);
    text-align: center;
    border: 0.0625rem dashed var(--tech-line);
    border-radius: 0.75rem;
    background: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 61.9988rem) {
    .tech-page-header {
        padding: 1rem 0 0.75rem;
    }

    .tech-page-title {
        font-size: 1.25rem;
    }

    .tech-brief {
        flex-direction: column;
    }

    .tech-brief .btn {
        align-self: flex-start;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 47.9988rem) {
    .tech-page-title {
        font-size: 1.1rem;
    }

    .tech-page-subtitle {
        font-size: 0.8rem;
    }

    .dl-tab-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.82rem;
    }

    .tech-list-item {
        gap: 0.6rem;
    }

    .tech-title {
        white-space: normal;
    }

    .tech-meta {
        font-size: 0.75rem;
    }
}
