/**
 * 火桥（huoqiao）· 文章正文组件（标题 + 引言块）
 * 联系方式：12492501@qq.com
 * 支持正版，从我做起，你的支持是我们前行的动力！
 *
 * @package   huoqiao
 * @author    三木
 * @copyright Copyright (c) 2026-09-01 huoqiao.cn
 * @license   GPL-2.0-or-later
 * @link      https://huoqiao.cn
 * @tags      design-tokens, content-components, blocks, dark-mode
 *
 * 作用域：.hq-prose（全站正文区统一套用）
 *   - 编辑器（WYSIWYG）：ProseMirror 挂载时带 .hq-prose
 *   - 前端文章正文：.article-body 带 .hq-prose
 *   - 预览弹窗：#preview-content 带 .hq-prose
 *   - 普通页面：.page-content 带 .hq-prose
 *   - 法律页：.hq-content 带 .hq-prose
 *   - 留言墙页：.hq-info-content 带 .hq-prose
 * 该文件独立维护，所有标题/引言样式集中于此，改一处全站（编辑器+前端）同步。
 */

/* ========== 设计变量（科技极简商务风，独立可调） ========== */
.hqpub .ProseMirror.hq-prose,
.article-body.hq-prose,
.hqpub__preview.hq-prose,
.page-content.hq-prose,
.hq-content.hq-prose,
.hq-info-content.hq-prose {
    --hqc-accent: #6366f1;
    --hqc-accent-soft: rgba(99, 102, 241, 0.08);
    --hqc-accent-line: rgba(99, 102, 241, 0.05);
    --hqc-text-main: #0f172a;
    --hqc-text-sub: #64748b;
    --hqc-text-soft: #334155;
    --hqc-border: rgba(148, 163, 184, 0.18);
    --hqc-surface: #ffffff;
}

/* 暗色模式：变量跟随主题翻转，组件自动适配 */
[data-theme="dark"] .hqpub .ProseMirror.hq-prose,
[data-theme="dark"] .article-body.hq-prose,
[data-theme="dark"] .hqpub__preview.hq-prose,
[data-theme="dark"] .page-content.hq-prose,
[data-theme="dark"] .hq-content.hq-prose,
[data-theme="dark"] .hq-info-content.hq-prose {
    --hqc-accent: #818cf8;
    --hqc-accent-soft: rgba(99, 102, 241, 0.16);
    --hqc-accent-line: rgba(99, 102, 241, 0.05);
    --hqc-text-main: #e8edf6;
    --hqc-text-sub: #9aa7b8;
    --hqc-text-soft: #c2ccda;
    --hqc-border: rgba(148, 163, 184, 0.22);
    --hqc-surface: #1c2029;
}

/* ========== 标题装饰｜H1/H2/H3（H4 沿用小标题） ========== */

/* 款式 1｜主板块大标题（细分割线 + 圆点标记） */
.hqpub .ProseMirror.hq-prose h1,
.article-body.hq-prose h1,
.hqpub__preview.hq-prose h1,
.page-content.hq-prose h1,
.hq-content.hq-prose h1,
.hq-info-content.hq-prose h1 {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--hqc-text-main);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 28px 0 12px;
}
.hqpub .ProseMirror.hq-prose h1::before,
.article-body.hq-prose h1::before,
.hqpub__preview.hq-prose h1::before,
.page-content.hq-prose h1::before,
.hq-content.hq-prose h1::before,
.hq-info-content.hq-prose h1::before {
    content: "";
    flex: 0 0 auto;
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, var(--hqc-accent), transparent);
}
.hqpub .ProseMirror.hq-prose h1::after,
.article-body.hq-prose h1::after,
.hqpub__preview.hq-prose h1::after,
.page-content.hq-prose h1::after,
.hq-content.hq-prose h1::after,
.hq-info-content.hq-prose h1::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--hqc-accent);
}

/* 款式 2｜次级标题｜极简方块标记 */
/* .hq-legal-h1/.hq-legal-h2：法务页（关于我们/条款/隐私）渲染时把 h1/h2 降级为 div（page-legal.php），
   此处承接与 h2 完全相同的款式，保证视觉不变 */
.hqpub .ProseMirror.hq-prose h2,
.article-body.hq-prose h2,
.hqpub__preview.hq-prose h2,
.page-content.hq-prose h2,
.hq-content.hq-prose h2,
.hq-info-content.hq-prose h2,
.hq-content.hq-prose .hq-legal-h1,
.hq-content.hq-prose .hq-legal-h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    color: var(--hqc-text-main);
    line-height: 1.35;
    margin: 32px 0 10px;
    /* 重置主题 .article-body h2 遗留的左侧竖线装饰，避免与方块标记叠加 */
    padding-left: 0;
    border-left: 0;
}
.hqpub .ProseMirror.hq-prose h2::before,
.article-body.hq-prose h2::before,
.hqpub__preview.hq-prose h2::before,
.page-content.hq-prose h2::before,
.hq-content.hq-prose h2::before,
.hq-info-content.hq-prose h2::before,
.hq-content.hq-prose .hq-legal-h1::before,
.hq-content.hq-prose .hq-legal-h2::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    background: var(--hqc-accent);
    border-radius: 2px;
}

/* 款式 3｜小标题｜文本前缀符号，轻量化 */
.hqpub .ProseMirror.hq-prose h3,
.article-body.hq-prose h3,
.hqpub__preview.hq-prose h3,
.page-content.hq-prose h3,
.hq-content.hq-prose h3,
.hq-info-content.hq-prose h3,
.hq-content.hq-prose .hq-legal-h3,
.hqpub .ProseMirror.hq-prose h4,
.article-body.hq-prose h4,
.hqpub__preview.hq-prose h4,
.page-content.hq-prose h4,
.hq-content.hq-prose h4,
.hq-info-content.hq-prose h4 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--hqc-text-soft);
    line-height: 1.4;
    margin: 24px 0 8px;
    /* 重置主题 .article-body h3 遗留的左侧竖线装饰 */
    padding-left: 0;
    border-left: 0;
}
.hqpub .ProseMirror.hq-prose h3::before,
.article-body.hq-prose h3::before,
.hqpub__preview.hq-prose h3::before,
.page-content.hq-prose h3::before,
.hq-content.hq-prose h3::before,
.hq-info-content.hq-prose h3::before,
.hq-content.hq-prose .hq-legal-h3::before,
.hqpub .ProseMirror.hq-prose h4::before,
.article-body.hq-prose h4::before,
.hqpub__preview.hq-prose h4::before,
.page-content.hq-prose h4::before,
.hq-content.hq-prose h4::before,
.hq-info-content.hq-prose h4::before {
    content: "\25B9";
    flex: 0 0 auto;
    color: var(--hqc-accent);
    font-size: 20px;
    line-height: 1;
}

/* ========== 引言块（blockquote 三式） ========== */

/* 基础样式 = 引言 A：柔光背景｜重点核心介绍 */
.hqpub .ProseMirror.hq-prose blockquote,
.article-body.hq-prose blockquote,
.hqpub__preview.hq-prose blockquote,
.page-content.hq-prose blockquote,
.hq-content.hq-prose blockquote,
.hq-info-content.hq-prose blockquote {
    margin: 18px 0 36px;
    padding: 28px 32px;
    border: 1px solid var(--hqc-border);
    border-radius: 14px;
    background: var(--hqc-accent-soft);
}
.hqpub .ProseMirror.hq-prose blockquote p,
.article-body.hq-prose blockquote p,
.hqpub__preview.hq-prose blockquote p,
.page-content.hq-prose blockquote p,
.hq-content.hq-prose blockquote p,
.hq-info-content.hq-prose blockquote p {
    color: var(--hqc-text-main);
    line-height: 1.75;
    font-size: 16px;
    margin: 0 0 10px;
}
.hqpub .ProseMirror.hq-prose blockquote p:last-child,
.article-body.hq-prose blockquote p:last-child,
.hqpub__preview.hq-prose blockquote p:last-child,
.page-content.hq-prose blockquote p:last-child,
.hq-content.hq-prose blockquote p:last-child,
.hq-info-content.hq-prose blockquote p:last-child {
    margin-bottom: 0;
}

/* 取消主题默认引言装饰（旧引用符号 / 首段缩进），避免与新组件叠加 */
.hqpub .ProseMirror.hq-prose blockquote::before,
.article-body.hq-prose blockquote::before,
.hqpub__preview.hq-prose blockquote::before,
.page-content.hq-prose blockquote::before,
.hq-content.hq-prose blockquote::before,
.hq-info-content.hq-prose blockquote::before,
.hqpub .ProseMirror.hq-prose blockquote::after,
.article-body.hq-prose blockquote::after,
.hqpub__preview.hq-prose blockquote::after,
.page-content.hq-prose blockquote::after,
.hq-content.hq-prose blockquote::after,
.hq-info-content.hq-prose blockquote::after {
    content: none !important;
}
.hqpub .ProseMirror.hq-prose blockquote p:first-child,
.article-body.hq-prose blockquote p:first-child,
.hqpub__preview.hq-prose blockquote p:first-child,
.page-content.hq-prose blockquote p:first-child,
.hq-content.hq-prose blockquote p:first-child,
.hq-info-content.hq-prose blockquote p:first-child {
    padding-top: 0;
}

/* 引言 B：极简边框｜说明、规则、提示文本 */
.hqpub .ProseMirror.hq-prose blockquote[data-variant="note"],
.article-body.hq-prose blockquote[data-variant="note"],
.hqpub__preview.hq-prose blockquote[data-variant="note"],
.page-content.hq-prose blockquote[data-variant="note"],
.hq-content.hq-prose blockquote[data-variant="note"],
.hq-info-content.hq-prose blockquote[data-variant="note"] {
    background: var(--hqc-surface);
    padding: 22px 28px;
}
.hqpub .ProseMirror.hq-prose blockquote[data-variant="note"] p,
.article-body.hq-prose blockquote[data-variant="note"] p,
.hqpub__preview.hq-prose blockquote[data-variant="note"] p,
.page-content.hq-prose blockquote[data-variant="note"] p,
.hq-content.hq-prose blockquote[data-variant="note"] p,
.hq-info-content.hq-prose blockquote[data-variant="note"] p {
    color: var(--hqc-text-sub);
    line-height: 1.7;
    font-size: 15px;
}

/* 引言 C｜侧边细光带｜最轻量引用，适合文档段落 */
.hqpub .ProseMirror.hq-prose blockquote[data-variant="slim"],
.article-body.hq-prose blockquote[data-variant="slim"],
.hqpub__preview.hq-prose blockquote[data-variant="slim"],
.page-content.hq-prose blockquote[data-variant="slim"],
.hq-content.hq-prose blockquote[data-variant="slim"],
.hq-info-content.hq-prose blockquote[data-variant="slim"] {
    padding: 16px 0 16px 20px;
    background: transparent;
    border: 0;
    border-left: 2px solid;
    border-image: linear-gradient(180deg, var(--hqc-accent), var(--hqc-accent-line)) 1;
}
.hqpub .ProseMirror.hq-prose blockquote[data-variant="slim"] p,
.article-body.hq-prose blockquote[data-variant="slim"] p,
.hqpub__preview.hq-prose blockquote[data-variant="slim"] p,
.page-content.hq-prose blockquote[data-variant="slim"] p,
.hq-content.hq-prose blockquote[data-variant="slim"] p,
.hq-info-content.hq-prose blockquote[data-variant="slim"] p {
    color: var(--hqc-text-soft);
    line-height: 1.7;
    font-size: 15px;
}
