/* 直接粘贴到文章内容页“文章内容（默认）→ 编辑组件样式 → 样式表”。 */
/* 以下结构与“博达正文组件模板.ftl”配套。 */

.detail-card [data-boda-component-root] {
  display: contents;}

.detail-card .news-detail__header {
  padding: clamp(24px, 3.2vw, 46px) clamp(22px, 4vw, 58px) 12px;
  text-align: center;
  border-bottom: 1px solid #dbe6f2;
  background: transparent;}

.detail-card .news-detail__header h1 {
  width: fit-content;
  max-width: min(100%, 1260px);
  margin: 0 auto;
  color: #000;
  font-size: clamp(26px, 2.1vw, 38px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  white-space: normal;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;}

.detail-card .news-detail__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 20px;
  color: #728198;
  font-size: 15px;
  line-height: 1.7;}

.detail-card .detail-card__body {
  padding: 8px clamp(22px, 4vw, 58px) clamp(28px, 4vw, 58px);
  color: #000;
  font-size: 18px;
  line-height: 2;
  overflow-wrap: anywhere;}

.detail-card .detail-card__body p {
  margin: 0 0 1.2em;
  text-align: justify;
  text-indent: 2em;}

/*
 * 正文图片不再强制宽度、高度、居中或显示方式。
 * 编辑器设置的 width、height、margin、float、text-align 可以正常生效。
 * 仅防止图片超出正文区域。
 */
.detail-card .detail-card__body img {
  max-width: 100%;}

.detail-card .detail-card__pagination,
.detail-card .detail-card__attachments {
  margin: 0 clamp(22px, 4vw, 58px);
  padding: 22px 0;
  border-top: 1px solid #dbe6f2;
  color: #365977;}

.detail-card .detail-card__attachments h2 {
  margin: 0 0 12px;
  color: #073f78;
  font-size: 18px;}

/* 正文页只显示文章标题，隐藏紧邻正文卡片的旧栏目标题。 */
.subpage-content > .subpage-content__header:has(+ .detail-card) {
  display: none;}

.detail-card {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: #000;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;}

/* 覆盖博达组件可能自带的白底。 */
.detail-card .boda-article-detail,
.detail-card .news-detail__header,
.detail-card .detail-card__body {
  background: transparent !important;
  box-shadow: none;}

.detail-card form[name="_newscontent_fromname"],
.detail-card .c1174388 {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0;}

/* 文章标题。 */
.detail-card .c1174388_title,
.detail-card [class$="_title"] {
  display: block;
  width: fit-content;
  max-width: min(100%, 1260px);
  margin: 0 auto;
  color: #000;
  font-size: clamp(26px, 2.1vw, 38px) !important;
  font-weight: 700;
  line-height: 1.4 !important;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  white-space: normal;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;}

/* 标题所在的默认居中段落。 */
.detail-card p[align="center"]:has(.c1174388_title),
.detail-card p[style*="text-align: center"]:has(.c1174388_title) {
  margin: 0;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--color-border, #d7e4f1);}

/* 发布时间、来源、编辑和浏览次数。 */
.detail-card .c1174388_date,
.detail-card .c1174388_source,
.detail-card .c1174388_author,
.detail-card .c1174388_editor,
.detail-card .c1174388_click,
.detail-card .c1174388_clicks,
.detail-card [class$="_date"],
.detail-card [class$="_source"],
.detail-card [class$="_author"],
.detail-card [class$="_editor"],
.detail-card [class$="_click"],
.detail-card [class$="_clicks"] {
  color: var(--color-text-muted, #64748b);
  font-size: 0.92rem !important;
  line-height: 1.7;}

/* 默认组件使用的元数据表格。 */
.detail-card form[name="_newscontent_fromname"]
  > table:not(.vsbcontent-table-container),
.detail-card .c1174388
  > table:not(.vsbcontent-table-container) {
  width: 100% !important;
  margin: 0 auto;
  border: 0 !important;
  border-collapse: collapse;
  color: var(--color-text-muted, #64748b);
  font-size: 0.92rem;
  text-align: center;}

.detail-card form[name="_newscontent_fromname"]
  > table:not(.vsbcontent-table-container) td,
.detail-card .c1174388
  > table:not(.vsbcontent-table-container) td {
  padding: 0.2rem 0.6rem;
  border: 0 !important;}

/* 博达编辑器生成的宽表格外壳。 */
.detail-card .vsbcontent-table-container-outer {
  position: relative;
  width: 100%;
  max-width: 100%;}

.detail-card .vsbcontent-table-container {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;}

/* 正文容器，兼容 id="vsb_content" 和 id="vsb_content_500"。 */
.detail-card [id^="vsb_content"],
.detail-card .v_news_content {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  padding: 0 !important;
  color: #000;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;}

.detail-card .v_news_content > :first-child {
  margin-top: 0;}

.detail-card .v_news_content > :last-child {
  margin-bottom: 0;}

.detail-card .v_news_content p,
.detail-card .v_news_content p span {
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.9 !important;
  background: transparent !important;}

.detail-card .v_news_content p {
  max-width: 100%;
  margin: 0 0 1rem;}

/*
 * 不再使用 width、height、margin 的 !important。
 * 图片大小及左右对齐由文章编辑器设置。
 */
.detail-card .v_news_content img {
  max-width: 100%;
  border-radius: clamp(0.65rem, 1.5vw, 1rem);
  box-shadow: 0 10px 28px rgba(32, 74, 120, 0.14);}

.detail-card .v_news_content video,
.detail-card .v_news_content iframe {
  max-width: 100%;}

.detail-card .v_news_content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;}

.detail-card .v_news_content th,
.detail-card .v_news_content td {
  padding: 0.65rem;
  border: 1px solid var(--color-border, #d7e4f1);}

/* 附件区域。 */
.detail-card .detail-card__attachments,
.detail-card [class$="_附件"],
.detail-card [class*="attachment"] {
  display: grid;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border, #d7e4f1);}

.detail-card a {
  color: var(--color-link, #0e5aa7);}

/* 强制标题使用纯黑色。 */
.detail-card .news-detail__header h1,
.detail-card .news-detail__header h1 *,
.detail-card .c1174388_title,
.detail-card .c1174388_title *,
.detail-card [class$="_title"],
.detail-card [class$="_title"] * {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;}

/* 强制正文文字使用纯黑色。 */
.detail-card .detail-card__body,
.detail-card .detail-card__body *,
.detail-card [id^="vsb_content"],
.detail-card [id^="vsb_content"] *,
.detail-card .v_news_content,
.detail-card .v_news_content * {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;}

@media (max-width: 720px) {
  .detail-card .news-detail__header h1,
  .detail-card .c1174388_title,
  .detail-card [class$="_title"] {
    max-width: 100%;
    font-size: clamp(22px, 6vw, 28px) !important;
    line-height: 1.45 !important;
    letter-spacing: 0;}

  .detail-card form[name="_newscontent_fromname"]
    > table:not(.vsbcontent-table-container),
  .detail-card .c1174388
    > table:not(.vsbcontent-table-container),
  .detail-card .v_news_content table {
    display: block;
    overflow-x: auto;}
}

/* 正文图片保持编辑器设置的尺寸，并强制水平居中。 */
.detail-card .detail-card__body img,
.detail-card [id^="vsb_content"] img,
.detail-card .v_news_content img {
  display: block !important;
  float: none !important;
  margin-right: auto !important;
  margin-left: auto !important;}

