/* 站群通用增强：页面观感优化 + 文章页小程序引流二维码 */
/* 加载顺序：主题 CSS 之后，用于覆盖与补充 */

/* ---------- 通用细节优化 ---------- */
.site-header { position: sticky; top: 0; z-index: 40; box-shadow: 0 10px 30px rgba(9, 18, 38, .12); }
/* 浅色主题头部原本透明，sticky 后正文会从头部透出，这里补齐不透明底色 */
body.theme-journal .site-header,
body.theme-minimal .site-header,
body.theme-editorial .site-header { background: var(--paper, #ffffff); }
body.theme-horizon .site-header { background: #ffffff; }
.article-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(20, 32, 60, .12); border-color: rgba(120, 140, 180, .45); }
.article-title a:hover, .story-list a:hover { color: var(--accent-dark); }
.read-more { display: inline-flex; align-items: center; gap: 4px; transition: gap .2s ease, color .2s ease; }
.read-more:hover { gap: 9px; text-decoration: none; color: var(--accent-dark); }
.button { transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.button:hover { box-shadow: 0 12px 26px rgba(18, 34, 70, .18); }
.button-primary:hover { transform: translateY(-2px); }
.page-direction:hover, .page-number:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.article-content { text-wrap: pretty; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-content h2, .article-content h3 { letter-spacing: -.015em; }
.article-content li { margin-bottom: .5em; }

/* ---------- 文章页：正文 + 侧边二维码 ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
  padding-top: 46px;
}
.article-layout .article-detail { max-width: none; padding-top: 0; }
.article-layout .article-content { max-width: 100%; }
.article-layout .article-header,
.article-layout .article-footer { max-width: 100%; }
.article-aside { position: sticky; top: 180px; }

/* 二维码卡片 */
.qr-card {
  position: relative;
  overflow: visible;
  padding: 26px 22px 22px;
  background: linear-gradient(165deg, #ffffff 0%, #fff7f5 52%, #ffece8 100%);
  border: 2px solid #ffd0c8;
  border-radius: 22px;
  box-shadow: 0 22px 54px rgba(230, 51, 41, .16);
  text-align: center;
}
.qr-card::before {
  content: "限时福利";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  color: #fff;
  background: linear-gradient(90deg, #ff3d2e, #ff8a3d);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(255, 61, 46, .35);
  white-space: nowrap;
}
.qr-brand {
  margin: 2px 0 4px;
  color: #ff3d2e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
}
.qr-card h2 {
  margin: 0 0 6px;
  color: #1a2033;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.qr-card h2 em {
  font-style: normal;
  color: #ff3d2e;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.qr-card .qr-sub { margin: 0 0 14px; color: #a05d54; font-size: 14px; }
.qr-media {
  padding: 10px;
  background: #fff;
  border: 1px dashed #ffb9ae;
  border-radius: 18px;
  animation: qrBreathe 3.2s ease-in-out infinite;
}
.qr-media img { width: 100%; height: auto; border-radius: 12px; }
.qr-tip { margin: 12px 0 0; color: #8a5a52; font-size: 12px; font-weight: 700; }
.qr-jump { display: none; }
@media (max-width: 960px) {
  .qr-jump {
    display: block;
    margin: 12px 0 0;
    padding: 12px 16px;
    color: #fff;
    background: linear-gradient(90deg, #ff3d2e, #ff8a3d);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(255, 61, 46, .28);
  }
  .qr-jump:active { opacity: .9; }
}
.qr-note {
  margin: 10px 0 0;
  padding-top: 10px;
  color: #6e788c;
  border-top: 1px dashed #f3cdc6;
  font-size: 12px;
  line-height: 1.5;
}
@keyframes qrBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 46, .22); }
  50% { box-shadow: 0 0 0 8px rgba(255, 61, 46, 0); }
}

/* ---------- 站群页脚：小程序二维码 + 联系方式 ---------- */
.mp-band {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  margin: 0 auto 26px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid rgba(255, 61, 46, .18);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(10, 20, 40, .08);
}
.mp-band__qr { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mp-band__qr img {
  flex: none;
  width: 112px;
  height: 112px;
  padding: 5px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(230, 51, 41, .14);
}
.mp-band__copy { min-width: 0; }
.mp-band__copy strong { display: block; margin-bottom: 4px; color: #1a2033; font-size: 18px; font-weight: 800; }
.mp-band__copy p { margin: 0 0 4px; color: #ff3d2e; font-size: 14px; font-weight: 700; }
.mp-band__copy span { color: #6e788c; font-size: 12px; }
.mp-band__contact h3 { margin: 0 0 10px; color: #1a2033; font-size: 15px; font-weight: 700; }
.mp-band__contact p { margin: 0 0 6px; color: #4a5568; font-size: 13px; line-height: 1.6; }
.mp-band__contact a { color: #4a5568; text-decoration: none; }
.mp-band__contact a:hover { color: #e63329; }
@media (max-width: 820px) {
  .mp-band { grid-template-columns: 1fr; gap: 18px; padding: 18px; margin-bottom: 22px; }
  .mp-band__qr img { width: 92px; height: 92px; }
  .mp-band__copy strong { font-size: 16px; }
}

/* ---------- 移动端：底部悬浮领取条 ---------- */
.qr-sticky { display: none; }

/* 修复：部分主题把导流入口样式写在媒体查询之后，导致移动端仍显示并撑破布局 */
@media (max-width: 820px) {
  .primary-nav, .category-strip, .header-actions { display: none !important; }
  .mobile-nav { display: block; }
  .masthead { flex-wrap: wrap; gap: 10px; }
  .brand { min-width: 0; }
  .brand-name { overflow-wrap: anywhere; }
}
html, body { max-width: 100%; overflow-x: clip; }
.article-header h1 { overflow-wrap: anywhere; }
.article-content { overflow-wrap: anywhere; }
.article-layout, .article-layout > * { min-width: 0; }
.article-layout .article-header,
.article-layout .article-content,
.article-layout .article-footer { max-width: 100%; }

/* 图片与网格容器在窄屏下不撑破布局 */
.article-media img, .hero-media img, .article-card img { max-width: 100%; height: auto; }
@media (max-width: 960px) {
  .hero-grid, .article-grid, .service-grid, .footer-grid, .split, .two-col { grid-template-columns: 1fr; }
  .hero-grid > *, .article-grid > *, .service-grid > *, .footer-grid > *, .split > *, .two-col > * { min-width: 0; }
  .article-media, .hero-media { width: 100%; max-width: 100%; }
  .article-media img, .hero-media img { width: 100%; height: auto; display: block; object-fit: cover; }
}
@media (max-width: 960px) {
  .article-layout { display: block; padding-top: 28px; }
  .article-layout .article-detail { width: 100%; max-width: 100%; }
  .article-aside { position: static; max-width: 420px; margin: 8px auto 46px; }
  .qr-sticky {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    color: #fff;
    background: linear-gradient(90deg, #ff3d2e, #ff8a3d);
    box-shadow: 0 -10px 30px rgba(24, 12, 10, .22);
  }
  .qr-sticky img { flex: none; width: 46px; height: 46px; padding: 3px; background: #fff; border-radius: 10px; }
  .qr-sticky-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
  .qr-sticky-copy strong { font-size: 14px; font-weight: 800; }
  .qr-sticky-copy span { font-size: 11px; opacity: .92; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .qr-sticky-btn {
    flex: none;
    padding: 9px 15px;
    color: #e63329;
    background: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
  .qr-sticky-btn:hover { text-decoration: none; opacity: .92; }
  body.page-article { padding-bottom: 78px; }
}

@media (max-width: 600px) {
  .article-layout { padding-top: 20px; }
  .article-content { font-size: 17px; line-height: 1.9; }
  .article-content h2 { font-size: 24px; }
  .article-content h3 { font-size: 20px; }
  .article-content table { display: block; overflow-x: auto; }
  .qr-card { padding: 24px 18px 20px; }
  .qr-card h2 { font-size: 19px; }
  .qr-card h2 em { font-size: 25px; }
}

/* ---------- GEO：文章核心结论 / 关于页问答 ---------- */
.article-takeaway {
  margin: 0 0 26px;
  padding: 18px 22px 18px 24px;
  background: linear-gradient(135deg, rgba(99, 91, 255, .09), rgba(32, 213, 232, .09));
  border: 1px solid rgba(99, 91, 255, .22);
  border-left: 4px solid var(--accent, #635bff);
  border-radius: 14px;
}
.article-takeaway__label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent-dark, #4438d8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}
.article-takeaway p { margin: 0; color: var(--ink, #13243b); font-size: 16px; line-height: 1.8; }

.faq-list { display: grid; gap: 10px; margin-top: 6px; }
.faq-item {
  padding: 14px 18px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #dfe5f0);
  border-radius: 12px;
}
.faq-item summary {
  cursor: pointer;
  color: var(--ink, #13243b);
  font-weight: 700;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q  "; color: var(--accent, #635bff); font-weight: 900; }
.faq-item p { margin: 10px 0 0; color: var(--muted, #617087); }
.faq-item[open] summary { color: var(--accent-dark, #4438d8); }

/* ---------- 增长埋点：文章分享 ---------- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line, #dfe5f0);
}
.share-copy {
  border: 1px solid var(--accent, #635bff);
  background: transparent;
  color: var(--accent-dark, #4438d8);
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.share-copy:hover { background: var(--accent, #635bff); color: #fff; }
.share-hint { color: var(--muted, #617087); font-size: 12px; }
