/* ==========================================================================
   BLOG ARCHIVE & CATEGORY COMPONENT (宽屏 1440px & 侧边栏吸顶 CTA)
   Zero Bloat | 0ms TBT Impact | High Conversion Feed
   ========================================================================== */

/* 解除全局 overflow 限制，确保 sticky 持续吸顶 */
html,
body.blog,
body.archive {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

.archive-layout-wrapper {
    background-color: #f8fafc;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: visible !important;
}

.archive-layout-wrapper * {
    box-sizing: border-box;
}

.archive-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    overflow: visible !important;
}

/* 1. 顶部 Hero Banner 区域 */
.archive-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 65px 0 55px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.archive-hero-banner .badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 94, 20, 0.15);
    border: 1px solid rgba(255, 94, 20, 0.4);
    color: #ff5e14;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.archive-main-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 auto 14px;
    max-width: 900px;
}

.archive-main-desc {
    font-size: 16px;
    color: #94a3b8;
    max-width: 760px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* 分类胶囊标签导航 (Filter Pills) */
.category-filter-nav {
    display: flex;
    justify-content: center;
}

.filter-pill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-pill-list li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.filter-pill-list li a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

.filter-pill-list li.is-active a {
    background: #ff5e14;
    border-color: #ff5e14;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 94, 20, 0.35);
}

.filter-pill-list .cat-count {
    font-size: 11.5px;
    opacity: 0.85;
}

/* 2. 主体网格布局 */
.archive-body-section {
    padding: 60px 0 95px;
    overflow: visible !important;
}

.archive-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px; /* 左侧文章流 + 右侧 380px 侧栏 */
    gap: 48px;
    align-items: stretch !important; /* 核心：撑满高度，提供吸顶滑轨 */
    overflow: visible !important;
}

/* 3. 文章卡片流 (Posts Feed) */
.posts-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.archive-post-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px 1fr;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.archive-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

/* 缩略图容器 */
.card-media-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 220px;
    background: #0f172a;
}

.card-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.archive-post-card:hover .card-thumbnail-img {
    transform: scale(1.04);
}

.card-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ff5e14;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    z-index: 2;
}

/* 文章信息区 */
.card-content-wrapper {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.card-meta-bar i {
    color: #ff5e14;
}

.card-post-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px;
}

.card-post-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-post-title a:hover {
    color: #ff5e14;
}

.card-excerpt {
    font-size: 14.5px;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 20px;
    flex: 1 1 auto;
}

.card-footer-action {
    display: flex;
    align-items: center;
}

.btn-read-guide {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff5e14;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.btn-read-guide:hover {
    gap: 12px;
    color: #ea580c;
}

/* 4. 原生数字分页导航 */
.archive-pagination {
    margin-top: 50px;
}

.archive-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-pagination .page-numbers li a,
.archive-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.archive-pagination .page-numbers li a:hover {
    border-color: #ff5e14;
    color: #ff5e14;
}

.archive-pagination .page-numbers li span.current {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* 5. 右侧侧边栏吸顶 CTA (同行对齐，滚动吸顶) */
.archive-sidebar {
    height: 100% !important;
    position: relative !important;
    overflow: visible !important;
}

.sidebar-sticky-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 86px !important; /* 避开 66px 导航栏 */
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 20px;
    will-change: transform;
}

/* 主询盘卡片 */
.quote-cta-widget {
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 32px 26px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
}

.widget-tag {
    display: inline-block;
    color: #ff5e14;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.quote-cta-widget h3 {
    color: #ffffff !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    margin: 0 0 12px !important;
    line-height: 1.35 !important;
}

.quote-cta-widget p {
    color: #94a3b8 !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    margin: 0 0 20px !important;
}

.widget-feature-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
}

.widget-feature-list li {
    font-size: 13px !important;
    color: #cbd5e1 !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.widget-feature-list li i {
    color: #ff5e14 !important;
}

.btn-sidebar-quote {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 13px 18px !important;
    background: linear-gradient(135deg, #ff6b00 0%, #ff5e14 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-sidebar-quote:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(255, 94, 20, 0.35) !important;
}

/* 专线支持卡片 */
.archive-support-card {
    background: #0b1120;
    border: 1px solid rgba(255, 94, 20, 0.35);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
}

.support-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.support-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 94, 20, 0.15);
    color: #ff5e14;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.support-header strong {
    display: block;
    color: #ffffff;
    font-size: 14.5px;
}

.support-header span {
    font-size: 12px;
    color: #94a3b8;
}

.archive-support-card p {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0 0 14px;
    line-height: 1.5;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-item-link {
    color: #e2e8f0;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.support-item-link:hover {
    color: #ff5e14;
}

.support-item-link i {
    color: #ff5e14;
}

/* 空状态 */
.no-posts-alert {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.no-posts-alert i {
    font-size: 44px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.no-posts-alert h3 {
    font-size: 22px;
    color: #0f172a;
    margin: 0 0 8px;
}

.no-posts-alert p {
    color: #64748b;
    margin: 0 0 20px;
}

.btn-back-blog {
    display: inline-block;
    background: #ff5e14;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

/* ==========================================================================
   6. 移动端与平板端深度自适应 (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
    .archive-container {
        padding: 0 16px;
    }

    .archive-hero-banner {
        padding: 40px 0 35px;
    }

    .archive-main-title {
        font-size: 26px;
    }

    .archive-main-desc {
        font-size: 14.5px;
        margin-bottom: 22px;
    }

    /* 移动端分类胶囊横向平滑滚动 */
    .filter-pill-list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    .filter-pill-list li {
        flex-shrink: 0;
    }

    .archive-body-section {
        padding: 35px 0 65px;
    }

    .archive-content-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    /* 移动端文章卡片改为单列纵向排列 */
    .archive-post-card {
        grid-template-columns: 1fr;
    }

    .card-media-wrapper {
        min-height: 190px;
        max-height: 220px;
    }

    .card-content-wrapper {
        padding: 20px 18px;
    }

    .card-post-title {
        font-size: 19px;
    }

    .archive-sidebar {
        position: static !important;
    }

    .sidebar-sticky-wrapper {
        position: static !important;
    }

    /* 移动端保留并美化询盘卡片，隐藏次要客服卡片以释放屏宽 */
    .archive-support-card {
        display: none !important;
    }
}