/* ============================================================
 * Richitek 新闻详情页 (view_article.htm) 专用样式
 * 结构：左侧正文（标题/元信息/富文本/询盘CTA/上下篇） + 右侧相关新闻
 * 布局：流式 Flex，无绝对定位，无高度补偿 JS，移动端自适应
 * ============================================================ */

/* ---------- 变量 ---------- */
.rtk-va-layout {
    --va-font: Source Han Sans, Geneva, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --va-primary: #0066cc;
    --va-primary-light: #00a8ff;
    --va-text: #333;
    --va-text-sub: #777;
}

/* ---------- 面包屑：与 1680px 布局容器同宽对齐（ID 选择器压过 header.css 后加载的同权重规则） ---------- */
#smv_AreaMainWrapper .rtk-crumb-row {
    max-width: 1680px;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---------- PC 端布局 ---------- */
.rtk-va-layout {
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    font-family: var(--va-font);
}

/* 左侧正文 */
.rtk-va-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* 右侧相关新闻 */
.rtk-va-side {
    flex: 0 0 300px;
    min-width: 0;
}

/* ---------- 文章标题 ---------- */
.rtk-va-title {
    font-family: var(--va-font);
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 14px;
}

/* ---------- 元信息 ---------- */
.rtk-va-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #999;
    border-bottom: 1px solid #eef2f7;
}

.rtk-va-views::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #ddd;
    margin-right: 18px;
    vertical-align: -1px;
}

/* ---------- 富文本正文 ---------- */
.rtk-va-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--va-text);
    word-wrap: break-word;
}

/* 富文本基础元素（保留后台编辑器的列表层级） */
.rtk-va-content ul,
.rtk-va-content ol {
    list-style: revert;
    padding-left: 40px;
    margin: 0;
}

.rtk-va-content li {
    list-style: revert;
    margin: 0;
}

.rtk-va-content p {
    margin: 0 0 14px;
}

.rtk-va-content img {
    max-width: 100%;
    height: auto;
}

.rtk-va-content a {
    color: var(--va-primary);
}

.rtk-va-content h2,
.rtk-va-content h3,
.rtk-va-content h4 {
    color: #1a1a1a;
    line-height: 1.4;
    margin: 24px 0 12px;
}

/* ---------- 上下篇导航：渐变箭头徽章 + 标签 + 标题卡片 ---------- */
.rtk-va-prenext {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #eef2f7;
}

.rtk-va-nav {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s;
}

.rtk-va-nav:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(0, 102, 204, 0.18);
}

/* 渐变圆形箭头徽章（纯 CSS 绘制，无图标字体依赖） */
.rtk-va-nav-arrow {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--va-primary), var(--va-primary-light));
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.rtk-va-nav-arrow::after {
    content: '';
    width: 8px;
    height: 8px;
    border: solid #fff;
    border-width: 2px 2px 0 0;
}

.rtk-va-prev .rtk-va-nav-arrow::after {
    transform: rotate(-135deg) translate(1px, 1px);
}

.rtk-va-next .rtk-va-nav-arrow::after {
    transform: rotate(45deg) translate(1px, 1px);
}

.rtk-va-nav:hover .rtk-va-nav-arrow {
    transform: scale(1.1);
    box-shadow: 0 5px 14px rgba(0, 102, 204, 0.4);
}

.rtk-va-next {
    text-align: right;
}

/* 下一篇箭头徽章钉在卡片最右侧（文本列 flex:1 占满剩余空间） */
.rtk-va-next .rtk-va-nav-arrow {
    margin-left: auto;
}

.rtk-va-nav-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rtk-va-nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--va-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.rtk-va-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--va-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.rtk-va-nav:hover .rtk-va-nav-title {
    color: var(--va-primary);
}

/* 无上/下篇时的占位文本 */
.rtk-va-nav-empty {
    align-items: center;
    font-size: 13px;
    color: #aaa;
    background: #fafcfe;
    border-style: dashed;
    box-shadow: none;
    cursor: default;
}

.rtk-va-nav-empty:hover {
    transform: none;
    box-shadow: none;
    border-color: #eef2f7;
}

/* ---------- 右侧相关新闻 ---------- */
.rtk-va-block {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rtk-va-head {
    margin: 0 0 14px;
    padding-bottom: 10px;
    font-family: var(--va-font);
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 2px solid #eef2f7;
    position: relative;
}

.rtk-va-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--va-primary), var(--va-primary-light));
}

.rtk-va-news {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rtk-va-newsitem {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #eef2f7;
}

.rtk-va-newsitem:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rtk-va-newsitem:first-child {
    padding-top: 0;
}

.rtk-va-newspic {
    flex: 0 0 92px;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f8fc;
}

.rtk-va-newspic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.rtk-va-newsitem:hover .rtk-va-newspic img {
    transform: scale(1.06);
}

.rtk-va-newsbody {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.rtk-va-newstitle {
    margin: 0;
    font-family: var(--va-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rtk-va-newstitle a {
    color: var(--va-text);
    text-decoration: none;
    transition: color 0.2s;
}

.rtk-va-newsitem:hover .rtk-va-newstitle a {
    color: var(--va-primary);
}

.rtk-va-newsdate {
    margin-top: auto;
    font-size: 12px;
    color: #aaa;
}

/* ---------- 询盘 CTA 框：PC 端宽度跟随正文栏自适应（!important 覆盖 CMS 粘贴版内联的 max-width:820px 与水平居中 margin） ---------- */
.rtk-va-main .cta-enquiry-box {
    max-width: 100% !important;
    margin: 40px 0 10px !important;
}

/* ---------- 响应式（PC 端窄屏 / 平板，≤1000px 由移动端模板接管） ---------- */
@media (max-width: 1180px) {
    .rtk-va-layout {
        gap: 20px;
        padding: 20px 16px 40px;
    }

    .rtk-va-side {
        flex: 0 0 240px;
    }

    .rtk-va-title {
        font-size: 22px;
    }

    .rtk-va-newspic {
        flex: 0 0 78px;
    }
}

/* ---------- 询盘 CTA 框（移动端响应式适配，适用于页面内所有 CTA 实例） ---------- */
@media (max-width: 1000px) {
    .cta-enquiry-box {
        max-width: 100% !important;
        margin: 20px 0 16px !important;
        padding: 18px 16px !important;
        border-left-width: 4px !important;
    }

    .cta-enquiry-box h2 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .cta-enquiry-box p {
        font-size: 14px !important;
        margin-bottom: 14px !important;
    }

    .cta-enquiry-box p:last-of-type {
        font-size: 12px !important;
    }

    .cta-enquiry-box .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px !important;
    }

    .cta-enquiry-box .cta-buttons a {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        text-align: center;
        box-sizing: border-box;
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
}

/* ============================================================
 * 移动端适配（≤1000px，与全站 pc-show/mobile-show 切换断点一致）
 * 单套代码响应式：隐藏侧栏，正文与上下篇自适应（参数取自原移动端区块）
 * ============================================================ */
@media (max-width: 1000px) {
    /* 轮播图高度适配（特异性对齐 banner.css 的 div.pc-banners 前缀） */
    div.pc-banners .carousel-container {
        height: 340px;
    }

    /* 布局：隐藏侧边栏，主体单列全宽 */
    .rtk-va-layout {
        display: block;
        padding: 14px 12px 24px;
    }

    .rtk-va-side {
        display: none !important;
    }

    .rtk-va-title {
        font-size: 20px;
        margin: 10px 0 10px;
        line-height: 1.4;
    }

    .rtk-va-meta {
        padding-bottom: 12px;
        margin-bottom: 16px;
        font-size: 12px;
        gap: 0;
    }

    .rtk-va-views {
        margin-left: 14px;
    }

    /* 富文本正文：参数取自原 rtk-vam-content */
    .rtk-va-content {
        font-size: 14px;
        line-height: 1.75;
    }

    .rtk-va-content ul,
    .rtk-va-content ol {
        list-style: revert;
        padding-left: 32px;
        margin: 0;
    }

    .rtk-va-content li {
        list-style: revert;
        margin: 0;
    }

    .rtk-va-content p {
        margin: 0 0 12px;
    }

    .rtk-va-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 上下篇导航：纵向单列（参数取自原 rtk-vam-prenext） */
    .rtk-va-prenext {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .rtk-va-nav {
        padding: 12px 14px;
        border-radius: 10px;
        gap: 10px;
        box-shadow: 0 2px 6px rgba(17, 24, 39, 0.04);
    }

    .rtk-va-nav-arrow {
        width: 28px;
        height: 28px;
    }

    .rtk-va-nav-arrow::after {
        width: 6px;
        height: 6px;
        border-width: 2px 2px 0 0;
    }

    .rtk-va-nav-label {
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .rtk-va-nav-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .rtk-va-nav:active .rtk-va-nav-title {
        color: var(--va-primary);
    }

    .rtk-va-nav-empty {
        font-size: 12px;
        background: #fafcfe;
        border-style: dashed;
    }
}
