/* ====================== Quill富文本编辑器基础内容样式 ====================== */
.ql-editor {
  line-height: 1.6!important;
  white-space: pre-wrap!important; /* 保留换行、空格，适配文档录入 */
  min-height: inherit;
  word-break: break-all; /* 长文本自动换行，防止横向溢出 */
}

/* ====================== 编辑器内图片全局适配 ====================== */
.ql-img {
  max-width: 100%!important;
  height: auto !important;
  margin: 0;
  display: block;
  box-sizing: border-box;
}

/* ====================== 自定义字体类映射 ====================== */
.ql-font-SimSun { font-family: 'SimSun', '宋体', serif !important; }
.ql-font-SimHei { font-family: 'SimHei', '黑体', sans-serif !important; }
.ql-font-Microsoft-YaHei { font-family: 'Microsoft YaHei', '微软雅黑', sans-serif !important; }
.ql-font-KaiTi { font-family: 'KaiTi', '楷体', serif !important; }
.ql-font-FangSong { font-family: 'FangSong', '仿宋', serif !important; }
.ql-font-Arial { font-family: 'Arial', sans-serif !important; }

/* ====================== 自定义字号尺寸 ====================== */
.ql-size-small { font-size: 10px !important; }
.ql-size-12px { font-size: 12px !important; }
.ql-size-14px { font-size: 14px !important; }
.ql-size-16px { font-size: 16px !important; }
.ql-size-18px { font-size: 18px !important; }
.ql-size-20px { font-size: 20px !important; }
.ql-size-22px { font-size: 22px !important; }
.ql-size-huge { font-size: 32px !important; }

/* ====================== 自定义标题层级样式（自定义class实现） ====================== */
.ql-h1 {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin: 1.2em 0 0.5em !important;
}
.ql-h2 {
  font-size: 24px !important;
  font-weight: 700 !important;
  margin: 1em 0 0.4em !important;
}
.ql-h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0.8em 0 0.3em !important;
}
.ql-h4 {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0.7em 0 0.2em !important;
}
.ql-h5 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0.6em 0 0.1em !important;
}
.ql-h6 {
  font-size: 15px !important;
  font-weight: 600 !important;
  margin: 0.5em 0 0 !important;
}
/* 正文常规段落 */
.ql-normal {
  font-size: 14px !important;
  margin: 0.5em 0 !important;
}

/* ====================== 首行缩进 ====================== */
.ql-indent-1 {
  padding-left: 2em !important;
}

/* ====================== 文本对齐方式 ====================== */
.ql-align-center { text-align: center !important; }
.ql-align-left { text-align: left !important; }
.ql-align-justify { text-align: justify !important; }
.ql-align-right { text-align: right !important; }

/* ====================== 工具栏渐变文字/背景按钮 ====================== */
/* 文字渐变按钮 */
.ql-snow .ql-gradient-color {
  background: linear-gradient(45deg, #ff9a9e, #fad0c4) !important;
  border-radius: 3px;
  padding: 2px 4px;
  border: 1px solid transparent;
  position: relative;
}
/* 背景渐变按钮 */
.ql-snow .ql-gradient-background {
  background: linear-gradient(45deg, #84fab0, #8fd3f4) !important;
  border-radius: 3px;
  padding: 2px 4px;
  border: 1px solid transparent;
  position: relative;
}

/* ====================== Quill 新格式列表补丁 ====================== */
/* 管理端 Quill 输出: <li data-list="bullet"> / <li data-list="ordered"> */

/* 兼容旧格式 .ql-list.ql-bullet / .ql-list.ql-ordered（若后端切换格式） */
.article-content .ql-list.ql-bullet { list-style: disc !important; padding-left: 1.5em; margin: 0.8em 0; }
.article-content .ql-list.ql-ordered { list-style: decimal !important; padding-left: 1.5em; margin: 0.8em 0; }

/* ======== 新格式：data-list 属性 ======== */
.article-content ol,
.article-content ul { padding-left: 1.5em; margin: 0.8em 0; }

/* 无序列表 bullet —— 用伪元素还原圆点 */
.article-content li[data-list="bullet"] {
  list-style: none !important;
  position: relative;
  padding-left: 1.8em;
  margin: 0.4em 0;
}
.article-content li[data-list="bullet"]::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  position: absolute;
  left: 0.55em;
  top: 0.9em;
  display: block;
}

/* 有序列表 ordered —— 隐藏原生序号，用伪元素还原 */
.article-content li[data-list="ordered"] {
  list-style: none !important;
  counter-increment: article-li;
  position: relative;
  padding-left: 1.8em;
  margin: 0.3em 0;
}
.article-content li[data-list="ordered"]::before {
  content: counter(article-li) ".";
  color: #374151;
  position: absolute;
  left: 0;
  text-align: right;
  width: 1.4em;
}
.article-content { counter-reset: article-li; }

/* 嵌套列表重置编号 */
.article-content li[data-list="ordered"] ol { counter-reset: article-li; }

/* .ql-ui 占位 span —— 编辑器内部用的，前端展示隐藏 */
.article-content li .ql-ui { display: none !important; }

/* ======== 代码块（新格式 <pre><code data-language="...">）======== */
.article-content pre.ql-syntax,
.article-content pre:has(code[data-language]) {
  background: rgba(0, 0, 0, 0.88);
  color: #e2e8f0;
  padding: 1em 1.2em;
  border-radius: 8px;
  overflow-x: auto;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 1em 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.article-content code[data-language] { background: transparent !important; padding: 0 !important; color: inherit; }
.article-content :not(pre) > code {
  background: #f3f4f6;
  color: #be185d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ====================== 企业简介数字 grid ====================== */
/* fixStatBlock 把 Quill 里用空格对齐的数字行替换成真正的三列 grid */
.article-content .ql-stat-grid {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin: 24px 0 16px;
  border-top: 0;
}
.article-content .ql-stat-item {
  flex: 0 0 auto;
  padding: 0 24px;
  text-align: left;
}
.article-content .ql-stat-item:first-child { padding-left: 0; }
.article-content .ql-stat-num {
  font-weight: 700;
  font-size: 32px;
  color: rgb(58, 112, 238);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.article-content .ql-stat-label {
  font-size: 16px;
  color: rgb(107, 114, 128);
  margin-top: 4px;
  line-height: 1.4;
}