/* ==========================================================================
   SINGLE POST COMPONENT (PC 1440px 宽屏排版 & 硬件级吸顶 & 移动端卡片包裹)
   Zero Bloat | 0ms TBT Impact | High Conversion B2B Architecture
   ========================================================================== */

/* 核心修复 1：解除父主题 overflow-x: hidden 对 position: sticky 的物理死锁 */
html,
body.single-post {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

.post-layout-wrapper {
    background-color: #f8fafc;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: visible !important;
}

.post-layout-wrapper * {
    box-sizing: border-box;
}

/* 1. PC 端 1440px 宽屏版心 (彻底解决局促感) */
.post-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    overflow: visible !important;
}

/* 2. 标头区域 */
.post-header-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 0 52px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-breadcrumbs {
    font-size: 13.5px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.post-breadcrumbs a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-breadcrumbs a:hover {
    color: #ff5e14;
}

.post-breadcrumbs .bc-sep {
    margin: 0 8px;
    color: #64748b;
}

.post-breadcrumbs .bc-current {
    color: #cbd5e1;
    font-weight: 500;
}

.post-main-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.35;
    color: #ffffff;
    margin: 0;
    max-width: 1100px;
}

/* 3. 主体双列网格 (PC 端宽幅排布) */
.post-body-section {
    padding: 55px 0 90px;
    overflow: visible !important;
}

.post-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    align-items: stretch !important; /* 核心：侧边栏高度撑满，提供全行程吸顶滑轨 */
    position: relative;
    overflow: visible !important;
}

.post-main-article {
    background: #ffffff;
    padding: 48px 52px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

/* 4. 正文开头的说明横条 */
.post-meta-badges-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #64748b;
}

.post-meta-badges-card .cat-pill {
    background: #ff5e14;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-meta-badges-card .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-meta-badges-card .meta-verified {
    color: #0f172a;
    font-weight: 600;
}

.post-meta-badges-card .meta-verified i {
    color: #16a34a;
}

.post-featured-media {
    margin-bottom: 35px;
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 5. 纯净正文排版保障 */
.article-rich-text {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.85;
    font-size: 17px;
    color: #334155;
}

.article-rich-text p {
    margin: 0 0 24px 0;
}

.article-rich-text h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 48px 0 20px;
    padding-left: 14px;
    border-left: 4px solid #ff5e14;
    line-height: 1.35;
}

.article-rich-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 36px 0 16px;
    line-height: 1.4;
}

.article-rich-text h4 {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 28px 0 14px;
}

.article-rich-text strong,
.article-rich-text b {
    color: #0f172a;
    font-weight: 700;
}

.article-rich-text ul,
.article-rich-text ol {
    margin: 0 0 24px 0;
    padding-left: 28px;
}

.article-rich-text li {
    margin-bottom: 9px;
}

.article-rich-text blockquote {
    background: #f8fafc;
    border-left: 4px solid #0f172a;
    padding: 20px 24px;
    margin: 30px 0;
    font-style: italic;
    color: #475569;
    border-radius: 0 8px 8px 0;
}

.article-rich-text img,
.article-rich-text figure,
.article-rich-text iframe,
.article-rich-text video {
    max-width: 100% !important;
    height: auto !important;
}

/* ==========================================================================
   文章表格排版 (PC 端 100% 铺满拉伸，文本自动换行)
   ========================================================================== */
.article-rich-text table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 15px;
    table-layout: auto;
}

.article-rich-text table caption {
    text-align: left;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.article-rich-text table th,
.article-rich-text table td {
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    text-align: left;
    white-space: normal; /* PC 端允许正常换行，杜绝单行撑爆 */
    word-wrap: break-word;
    line-height: 1.6;
}

.article-rich-text table th {
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 700;
}

.article-rich-text table tr:nth-child(even) {
    background-color: #f8fafc;
}

.post-article-footer {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
}

.post-tags-list .tag-label {
    color: #64748b;
    font-weight: 600;
}

.post-tags-list a {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tags-list a:hover {
    background: #ff5e14;
    color: #ffffff;
}

/* 6. 上一篇 / 下一篇 导航卡片 */
.post-navigation-card {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #e2e8f0;
}

.post-navigation-card .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-post-link {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-post-link:hover {
    background: #ffffff;
    border-color: #ff5e14;
    box-shadow: 0 6px 20px rgba(255, 94, 20, 0.12);
    transform: translateY(-2px);
}

.nav-post-link .nav-direction {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ff5e14;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-post-link.nav-next {
    text-align: right;
}

.nav-post-link.nav-next .nav-direction {
    justify-content: flex-end;
}

.nav-post-link .nav-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-post-link.nav-disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f1f5f9;
}

.nav-post-link.nav-disabled .nav-direction {
    color: #94a3b8;
}

/* ==========================================================================
   7. 全局基础 CTA 卡片声明 (核心修复 2：全端统一背景与卡片化包裹)
   ========================================================================== */
.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;
    box-sizing: border-box !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.5 !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;
}

/* ==========================================================================
   8. PC 端专属强力全屏滚动吸顶体系 (>= 992px)
   ========================================================================== */
@media (min-width: 992px) {
    .post-sidebar {
        height: 100% !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* 内部容器执行吸顶，跟随父级高度全程滑动 */
    .sidebar-sticky-box {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 86px !important;
        z-index: 40 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        will-change: transform;
    }

    /* 第二张紧随其后的即时报价浮动卡片 */
    .sidebar-sticky-box .floating-inquiry-widget {
        background: #0b1120 !important;
        border: 1px solid rgba(255, 94, 20, 0.45) !important;
        border-radius: 12px !important;
        padding: 18px 20px !important;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
    }

    .sidebar-sticky-box .floating-body {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .sidebar-sticky-box .floating-icon {
        width: 38px !important;
        height: 38px !important;
        background: rgba(255, 94, 20, 0.15) !important;
        color: #ff5e14 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        flex-shrink: 0 !important;
    }

    .sidebar-sticky-box .floating-info strong {
        display: block !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        margin-bottom: 3px !important;
    }

    .sidebar-sticky-box .floating-info p {
        margin: 0 !important;
        color: #94a3b8 !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .sidebar-sticky-box .btn-floating-inquiry {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        padding: 11px 14px !important;
        background: linear-gradient(135deg, #ff6b00 0%, #ff5e14 100%) !important;
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }

    .sidebar-sticky-box .btn-floating-inquiry:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 18px rgba(255, 94, 20, 0.35) !important;
    }
}

/* ==========================================================================
   9. 移动端专属断点 (< 992px：卡片包裹清晰、隐藏多余浮层)
   ========================================================================== */
@media (max-width: 991px) {
    .floating-inquiry-widget,
    .sidebar-inquiry-subcard {
        display: none !important;
        visibility: hidden !important;
    }

    .post-container {
        padding: 0 16px;
    }

    .post-header-section {
        padding: 35px 0 30px;
    }

    .post-main-title {
        font-size: 23px;
        line-height: 1.3;
    }

    .post-body-section {
        padding: 30px 0 60px;
    }

    .post-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-main-article {
        padding: 22px 16px;
        border-radius: 8px;
    }

    .post-meta-badges-card {
        gap: 10px;
        font-size: 12px;
        padding-bottom: 16px;
        margin-bottom: 22px;
    }

    .post-meta-badges-card .cat-pill {
        padding: 3px 8px;
        font-size: 11px;
    }

    .article-rich-text {
        font-size: 15.5px;
        line-height: 1.75;
    }

    .article-rich-text h2 {
        font-size: 20px;
        margin: 32px 0 14px;
        padding-left: 10px;
        border-left-width: 3px;
    }

    .article-rich-text h3 {
        font-size: 18px;
        margin: 24px 0 12px;
    }

    .article-rich-text h4 {
        font-size: 16px;
        margin: 20px 0 10px;
    }

    .article-rich-text ul,
    .article-rich-text ol {
        padding-left: 18px;
        margin-bottom: 18px;
    }

    .article-rich-text blockquote {
        padding: 12px 14px;
        margin: 18px 0;
        font-size: 14.5px;
    }

    /* 移动端上/下一篇导航堆叠排版 */
    .post-navigation-card .nav-links {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nav-post-link.nav-next {
        text-align: left;
    }

    .nav-post-link.nav-next .nav-direction {
        justify-content: flex-start;
    }

    .sidebar-sticky-box {
        position: static !important;
    }

    /* 移动端卡片内边距收敛，保持稳固视觉块 */
    .quote-cta-widget {
        padding: 26px 20px !important;
        margin-top: 10px !important;
    }
}

@media (max-width: 640px) {
    .post-container {
        padding: 0 14px;
    }

    .post-main-title {
        font-size: 21px;
    }

    .post-main-article {
        padding: 18px 12px;
    }

    .article-rich-text {
        font-size: 15px;
    }

/* ==========================================================================
   移动端表格专属防爆破处理 (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .article-rich-text table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .article-rich-text table th,
    .article-rich-text table td {
        white-space: nowrap; /* 手机端强制不换行，以激活原生左右滑动 */
        padding: 12px 14px;
    }
}