/**
 * 联德官网：后台富文本（WangEditor 等）在前台展示时的作用域样式
 * 减轻与 bootstrap3、restyle.css 等全局规则的冲突（尤其 a:hover、列表）
 * 页面内容容器需增加 class：liande-rich-text
 */

.liande-rich-text {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  word-break: break-word;
  overflow-wrap: break-word;
}

.liande-rich-text p {
  margin: 0 0 1em;
}

.liande-rich-text p:last-child {
  margin-bottom: 0;
}

.liande-rich-text h1,
.liande-rich-text h2,
.liande-rich-text h3,
.liande-rich-text h4,
.liande-rich-text h5,
.liande-rich-text h6 {
  margin: 1em 0 0.5em;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
}

.liande-rich-text h1 { font-size: 1.75em; }
.liande-rich-text h2 { font-size: 1.5em; }
.liande-rich-text h3 { font-size: 1.25em; }
.liande-rich-text h4 { font-size: 1.1em; }

.liande-rich-text ul,
.liande-rich-text ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.liande-rich-text ul {
  list-style-type: disc;
}

.liande-rich-text ol {
  list-style-type: decimal;
}

.liande-rich-text li {
  margin: 0.25em 0;
  display: list-item;
}

.liande-rich-text li > ul,
.liande-rich-text li > ol {
  margin-top: 0.25em;
  margin-bottom: 0;
}

/* 覆盖 restyle.css 等全局 a:hover，保证正文内链接可辨 */
.liande-rich-text a {
  color: #5d9939;
  text-decoration: underline;
}

.liande-rich-text a:hover {
  color: #4a8030 !important;
  text-decoration: underline !important;
}

.liande-rich-text img,
.liande-rich-text video {
  max-width: 100%;
  height: auto;
}

.liande-rich-text table {
  border-collapse: collapse;
  max-width: 100%;
  margin: 1em 0;
}

.liande-rich-text th,
.liande-rich-text td {
  border: 1px solid #ddd;
  padding: 8px 12px;
}

.liande-rich-text blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 4px solid #5d9939;
  background: #f9f9f9;
  color: #555;
}

.liande-rich-text pre,
.liande-rich-text code {
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 0.9em;
}

.liande-rich-text pre {
  overflow-x: auto;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 4px;
}

/* 荣誉列表页 .titletext 区域为深绿渐变底，需浅色正文 */
.titletext .liande-rich-text {
  color: rgba(255, 255, 255, 0.95);
}

.titletext .liande-rich-text a {
  color: #e8fff0;
  text-decoration: underline;
}

.titletext .liande-rich-text a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.titletext .liande-rich-text h1,
.titletext .liande-rich-text h2,
.titletext .liande-rich-text h3,
.titletext .liande-rich-text h4,
.titletext .liande-rich-text h5,
.titletext .liande-rich-text h6 {
  color: #fff;
}

/* personInfo 中全局 li 字号较大，避免套在富文本上显得突兀 */
.personInfo-content-article .liande-rich-text li {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
