/* ============================================================
   article-body.css  —  文章正文专属样式
   仅由 模板/lxj/html/news.html（文章详情模块）引用，
   作用域严格限制在 .content_text / .article_title，
   不影响引用 style.min.css 的其它模块（首页/产品/单页等）。
   解决：{content:content} 原样输出为裸 HTML 后，
   全局样式没有针对正文排版的规则，导致标题过大、图片溢出、
   列表/引用/代码/表格无样式等问题。
   ============================================================ */

/* ---------- 标题（文章主标题，news.html 内 {content:title}） ---------- */
.article_title {
    font-size: 26px;
    line-height: 1.35;
    font-weight: 700;
    color: #222;
    margin: 0 0 .35em;
}

/* ---------- 正文容器 ---------- */
.content_text {
    font-size: 16px;
    line-height: 1.9;
    color: #555;                 /* 对齐主题 --paracolor */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ---------- 段落 ---------- */
.content_text p {
    margin: 0 0 1.1em;
    color: #555;
}

/* ---------- 各级小标题（修复：原继承首页板块标题 2rem 过大） ---------- */
.content_text h2,
.content_text h3,
.content_text h4 {
    margin: 1.7em 0 .75em;
    line-height: 1.45;
    font-weight: 700;
    color: #18941e;             /* 对齐主题 --bgcolor 品牌绿 */
    position: relative;
    padding-left: 14px;
}
.content_text h2 { font-size: 21px; }
.content_text h3 { font-size: 18px; }
.content_text h4 { font-size: 16px; }

/* 左侧绿色装饰条 */
.content_text h2::before,
.content_text h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: .16em;
    bottom: .16em;
    width: 4px;
    border-radius: 2px;
    background: #18941e;
}
.content_text h4::before { display: none; }
.content_text h4 { padding-left: 0; }

/* ---------- 图片（修复：原无 max-width 约束，宽图溢出容器） ---------- */
.content_text img {
    display: block;
    max-width: 100%;
    width: auto;                /* 覆盖编辑器内联 width 属性，保证响应式 */
    height: auto;
    margin: 1.2em auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
.content_text p img { margin: 1.2em auto; }

/* ---------- 列表（防止被全局 reset 影响，显式恢复项目符号与缩进） ---------- */
.content_text ul,
.content_text ol {
    margin: 0 0 1.1em;
    padding-left: 1.6em;
}
.content_text ul { list-style: disc; }
.content_text ol { list-style: decimal; }
.content_text li {
    margin: .4em 0;
    line-height: 1.8;
}
.content_text li p { margin: .2em 0; }

/* ---------- 链接 ---------- */
.content_text a {
    color: #18941e;
    text-decoration: none;
    border-bottom: 1px solid rgba(24, 148, 30, .35);
}
.content_text a:hover {
    color: #2c9b50;
    border-bottom-color: #2c9b50;
}

/* ---------- 强调 ---------- */
.content_text strong,
.content_text b {
    font-weight: 700;
    color: #222;
}

/* ---------- 引用 ---------- */
.content_text blockquote {
    margin: 1.2em 0;
    padding: .8em 1.2em;
    background: #f3f9f4;
    border-left: 4px solid #18941e;
    border-radius: 0 8px 8px 0;
    color: #555;
}
.content_text blockquote p { margin: .3em 0; }

/* ---------- 行内代码 / 代码块 ---------- */
.content_text code {
    background: #f3f3f3;
    color: #c7254e;
    padding: .15em .4em;
    border-radius: 4px;
    font-size: .92em;
    font-family: Consolas, Monaco, "Courier New", monospace;
}
.content_text pre {
    background: #2b2b2b;
    color: #f8f8f2;
    border-radius: 8px;
    padding: 1em;
    overflow: auto;
    font-size: 14px;
    line-height: 1.6;
}
.content_text pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ---------- 表格 ---------- */
.content_text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 14px;
}
.content_text th,
.content_text td {
    border: 1px solid #e3e3e3;
    padding: .6em .8em;
    text-align: left;
}
.content_text th {
    background: #f3f9f4;
    font-weight: 600;
}

/* ---------- 分割线 ---------- */
.content_text hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1.5em 0;
}
