/* ============================================================
   北京流香画院 · 视觉修复包 v1
   只做「看得见」的修复，不改结构、不改内容、不删图。
   类名基于 CloudPages 运行时的稳定语义类（cp-*），不依赖哈希类。
   ============================================================ */

/* ---------- 1. 首屏对比度 ---------- */
/* 白字压在浅木纹上实测 2.0:1，左侧加墨色渐变，右侧图案保持原样 */
.cp-banner { position: relative; }
.cp-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(20, 17, 10, .72) 0%,
    rgba(20, 17, 10, .52) 38%,
    rgba(20, 17, 10, 0) 66%
  );
}
.cp-banner .cp-banner__content { position: relative; z-index: 2; }
/* 深色纯底的内页 banner 不需要蒙版 */
.cp-banner[style*="38, 36, 25"]::after { background: none; }

/* 首屏主标题与副标题：略微加粗字重与行高，长句不再贴到图案亮区 */
.cp-banner .cp-banner__content { text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }

/* ---------- 2. 按钮统一 ---------- */
.cp-button {
  border-radius: 2px !important;
  transition: filter .18s ease, background-color .18s ease, border-color .18s ease;
}
.cp-button:hover { filter: brightness(1.08); }
/* 首屏描边按钮：描边太淡，加一层半透明底让边界可见 */
.cp-banner .cp-button[style*="rgba(252, 252, 252, 0)"] {
  border: 1px solid rgba(255, 255, 255, .78) !important;
  background: rgba(255, 255, 255, .10) !important;
}

/* ---------- 3. 轮播箭头：白底上原本是白描边，等于看不见 ---------- */
.cp-carousel button.chakra-button {
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cp-carousel.lx-on-light button.chakra-button {
  border-color: #262419 !important;
  color: #262419 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14) !important;
  opacity: .92;
}
.cp-carousel.lx-on-light button.chakra-button:hover { opacity: 1; }

/* ---------- 4. 文章正文排版 ---------- */
.cp-article-detail .cp-section__inner {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 1.85;
  color: #2E2B24;
}
.cp-article-detail .cp-section__inner p {
  margin: 0 0 1em !important;
  text-indent: 2em;
  letter-spacing: normal !important;
}
/* 【主办单位】这类以方括号开头的行不缩进（由 JS 打标记） */
.cp-article-detail .cp-section__inner p.lx-no-indent { text-indent: 0; }
/* 独占一段的加粗小标题：当小标题用 */
.cp-article-detail .cp-section__inner p.lx-h2 {
  text-indent: 0;
  font-size: 19px;
  line-height: 1.6;
  margin: 1.8em 0 .6em !important;
  color: #262419;
}
.cp-article-detail .cp-section__inner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border-radius: 2px;
}
.cp-article-detail .cp-section__inner blockquote {
  margin: 1.6em 0;
  padding: 6px 0 6px 16px;
  border-left: 3px solid #C9A961;
  color: #4A453C;
  text-indent: 0;
}

/* ---------- 5. 手机端 ---------- */
@media (max-width: 768px) {
  /* 首屏按钮原本被拉成通栏空框（flex 交叉轴 stretch 导致） */
  .cp-banner .cp-button {
    width: auto !important;
    min-width: 112px;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    display: inline-flex !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* 图 + 文两栏在窄屏堆叠 */
  .lx-stack { flex-direction: column !important; align-items: stretch !important; }
  .lx-stack > * { width: 100% !important; max-width: 100% !important; }
  /* 触屏不摆箭头，用滑动 */
  .cp-carousel button.chakra-button { display: none !important; }
  /* 正文左右留白 */
  .cp-article-detail .cp-section__inner {
    padding-left: 18px;
    padding-right: 18px;
    font-size: 16px;
  }
  /* 列表行由两栏改堆叠 */
  .cp-article-list .cp-article {
    display: block !important;
  }
  .cp-article-list .cp-article__img {
    width: 100% !important;
    margin: 0 0 12px 0 !important;
  }
}

/* 微信内联字距会把中文拉散，统一收回 */
.cp-article-detail .cp-section__inner *:not(img):not(svg) { letter-spacing: normal !important; }
/* 文章大标题：18px 太小，与正文几乎同级 */
.cp-article-detail .cp-section__title {
  font-size: 28px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
}

/* ---------- 6. 中文字体：子集化 + 不阻塞渲染 ---------- */
/* 原字体 hanyi.ttf 2.39MB，子集后 131KB；同名字体声明覆盖运行时那份 */
@font-face {
  font-family: hanyiyakuhei;
  src: url("/fonts/hanyi-sub.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
  font-style: normal;
}

/* ---------- 7. 首屏加载态：不再白屏 ---------- */
#lx-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #FCFAF5;
  transition: opacity .35s ease;
}
#lx-loading.lx-out { opacity: 0; pointer-events: none; }
#lx-loading .lx-name {
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 26px;
  letter-spacing: .18em;
  color: #262419;
}
#lx-loading .lx-sub {
  font-size: 12.5px;
  letter-spacing: .3em;
  color: #8A847A;
}
#lx-loading .lx-bar {
  width: 132px;
  height: 2px;
  background: #E7E3D8;
  overflow: hidden;
  margin-top: 6px;
}
#lx-loading .lx-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: #C9A961;
  animation: lxslide 1.1s ease-in-out infinite;
}
@keyframes lxslide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ---------- 8. 画院资讯缩略图：完整显示，不再裁切 ---------- */
.cp-article-list .cp-article__img {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: rgba(255, 255, 255, .07);
  aspect-ratio: 16 / 9;
  height: auto !important;
}
@media (max-width: 820px) {
  .cp-article-list .cp-article__img {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    margin: 0 0 12px 0 !important;
  }
}

/* ---------- 8. 画院资讯缩略图：完整显示，不再裁切 ---------- */
.cp-article-list .cp-article__img {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: rgba(255, 255, 255, .07);
  aspect-ratio: 16 / 9;
  height: auto !important;
}
@media (max-width: 820px) {
  .cp-article-list .cp-article__img {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    margin: 0 0 12px 0 !important;
  }
}
