/* ==========================================================================
   花镇案例 · 详情页（最终移动端 UI）
   适配：360 / 375 / 390 / 414 px 移动端，桌面端 420px 以下走全屏、超出 420 用桌面手机壳容器
   设计 token：保留蓝紫 / 珊瑚粉 / 绿 VI，参考图暖粉紫风格提高精致度
   字段映射：见 detail.html 顶部注释
   ========================================================================== */

:root {
  /* 品牌色（VI） */
  --hz-rose: #ed7772;          /* 珊瑚粉（资历证书按钮） */
  --hz-rose-2: #f4778a;        /* 浅珊瑚（链接/次级按钮） */
  --hz-deep: #5f70d4;          /* 品牌蓝紫（主信息色、按钮描边） */
  --hz-deep-2: #7286f0;        /* 浅蓝紫（hover/强调） */
  --hz-soft: #e9ecfa;          /* 蓝紫底（标签/装饰块） */
  --hz-soft-2: #f5f2fb;        /* 浅紫底（页面底色） */
  --hz-green: #45c526;         /* 业务 CTA 绿 */
  --hz-green-2: #3aa91f;       /* 绿 hover */
  --hz-line: #ebeaf3;          /* 描边/分割线 */
  --hz-line-2: #dedef0;        /* 卡片描边 */
  --hz-text: #1b1d2b;          /* 文本主色（接近黑） */
  --hz-text-2: #303348;        /* 次文本 */
  --hz-muted: #6f7286;         /* 辅助文本 */
  --hz-bg: #f7f8fc;            /* 页面背景 */

  /* 圆角 / 阴影 */
  --hz-r-sm: 8px;
  --hz-r-md: 12px;
  --hz-r-lg: 16px;
  --hz-r-xl: 20px;
  --hz-r-2xl: 24px;
  --hz-r-pill: 999px;
  --hz-shadow-1: 0 1px 0 rgba(95, 112, 212, 0.04);
  --hz-shadow-2: 0 6px 18px rgba(95, 112, 212, 0.08);
  --hz-shadow-3: 0 12px 32px rgba(31, 33, 60, 0.12);
}

/* -------------------------------------------------------------------------- */
/* 重置与基础                                                                 */
/* -------------------------------------------------------------------------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Alibaba PuHuiTi Local", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hz-text);
  background: var(--hz-bg);
  font-weight: 400;
  /* 点阵装饰：靠 radial-gradient 模拟，贴近参考图1 的浅紫网格 */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(95, 112, 212, 0.08) 1px, transparent 1.2px);
  background-size: 18px 18px;
  background-position: 0 0;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: #000; font-weight: 700; }
h1 { font-size: 20px; line-height: 1.35; letter-spacing: 0.2px; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 15px; line-height: 1.45; color: var(--hz-deep); }

/* -------------------------------------------------------------------------- */
/* 顶部导航                                                                   */
/* -------------------------------------------------------------------------- */
.hz-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--hz-line);
}
.hz-nav-back {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-deep);
  font-size: 22px;
  font-weight: 600;
  border-radius: var(--hz-r-pill);
}
.hz-nav-back:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }
.hz-nav-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hz-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hz-nav-act {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--hz-r-pill);
  background: var(--hz-soft);
  color: var(--hz-deep);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* -------------------------------------------------------------------------- */
/* Hero（标签 / H1 / 摘要）                                                    */
/* -------------------------------------------------------------------------- */
.hz-detail-hero {
  position: relative;
  padding: 16px 16px 18px;
  background: linear-gradient(180deg, #f5f2fb 0%, #f7f8fc 100%);
  border-bottom: 1px solid var(--hz-line);
  overflow: hidden;
}
.hz-detail-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 119, 114, 0.18) 0%, rgba(237, 119, 114, 0) 70%);
  pointer-events: none;
}
.hz-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hz-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-deep);
  background: var(--hz-soft);
  border-radius: var(--hz-r-pill);
}
.hz-tag.is-warn { color: var(--hz-rose); background: rgba(237, 119, 114, 0.12); }
.hz-detail-hero h1 {
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}
.hz-detail-sub {
  font-size: 13px;
  color: var(--hz-muted);
  line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 共鸣模块                                                                   */
/* -------------------------------------------------------------------------- */
.hz-section { padding: 18px 16px 0; }
.hz-section + .hz-section { padding-top: 22px; }
.hz-section h2 {
  font-size: 17px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hz-section h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--hz-rose);
}
.hz-match-list {
  background: var(--hz-card-bg, #fff);
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-lg);
  box-shadow: var(--hz-shadow-1);
  overflow: hidden;
}
.hz-match-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--hz-text-2);
  line-height: 1.6;
}
.hz-match-item + .hz-match-item { border-top: 1px dashed var(--hz-line); }
.hz-match-item::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--hz-deep);
}

/* 服务端富文本匹配区（引言 HTML） */
.hz-match-intro {
  background: var(--hz-card-bg, #fff);
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-lg);
  box-shadow: var(--hz-shadow-1);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--hz-text-2);
  line-height: 1.7;
}
.hz-match-intro p { margin: 0 0 8px; }
.hz-match-intro p:last-child { margin-bottom: 0; }
.hz-match-intro ul,
.hz-match-intro ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hz-match-intro li {
  position: relative;
  padding: 8px 0 8px 16px;
  border-top: 1px dashed var(--hz-line);
}
.hz-match-intro li:first-child { border-top: 0; padding-top: 0; }
.hz-match-intro li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hz-deep);
}
.hz-match-intro li:first-child::before { top: 8px; }

/* -------------------------------------------------------------------------- */
/* 咨询师名片（受理咨询师）                                                    */
/* -------------------------------------------------------------------------- */
.hz-consultant-card {
  background: #fff;
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-xl);
  box-shadow: var(--hz-shadow-2);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hz-consultant-top {
  display: flex;
  gap: 14px;
  align-items: center;
}
.hz-consultant-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--hz-soft);
  background-image: var(--hz-avatar, none);
  background-size: 400% 400%;
  background-position: 0% 0%;
  background-repeat: no-repeat;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--hz-line-2);
}
.hz-consultant-info { flex: 1 1 auto; min-width: 0; }
.hz-consultant-info h2 {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hz-cert-mark {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  background: linear-gradient(90deg, var(--hz-deep), var(--hz-deep-2));
  border-radius: 4px;
}
.hz-consultant-meta {
  font-size: 12px;
  color: var(--hz-muted);
  line-height: 1.6;
}
.hz-consultant-meta span + span { display: block; margin-top: 2px; }
.hz-consultant-meta b { color: var(--hz-text-2); font-weight: 500; }
.hz-consultant-expert {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--hz-rose);
  background: rgba(237, 119, 114, 0.10);
  border-radius: var(--hz-r-pill);
}
.hz-consultant-actions {
  display: flex;
  gap: 10px;
}
.hz-consultant-actions .hz-btn { flex: 1 1 50%; min-width: 0; }

/* -------------------------------------------------------------------------- */
/* 按钮                                                                       */
/* -------------------------------------------------------------------------- */
.hz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--hz-r-md);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.hz-btn:active { transform: translateY(1px); }
.hz-btn:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }

.hz-btn-primary { background: var(--hz-green); color: #fff; }
.hz-btn-primary:hover, .hz-btn-primary:focus { background: var(--hz-green-2); }

.hz-btn-rose { background: var(--hz-rose); color: #fff; }
.hz-btn-rose:hover, .hz-btn-rose:focus { background: #d8625d; }

.hz-btn-ghost {
  background: #fff;
  color: var(--hz-deep);
  border: 1px solid var(--hz-deep);
}
.hz-btn-ghost:hover, .hz-btn-ghost:focus { background: var(--hz-soft); }

.hz-btn-soft { background: var(--hz-soft); color: var(--hz-deep); }

/* 手指点击图标（绿色 CTA 尾部），原样展示 assets 内的多彩 SVG */
.hz-hand {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background: url("../images/hand-click.svg") no-repeat center / contain;
}

/* -------------------------------------------------------------------------- */
/* 正文 01-05                                                                 */
/* -------------------------------------------------------------------------- */
.hz-article {
  background: #fff;
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-xl);
  box-shadow: var(--hz-shadow-1);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.hz-article h2 { font-size: 17px; margin-bottom: 10px; }
.hz-article p {
  font-size: 14px;
  color: var(--hz-text-2);
  line-height: 1.75;
  margin: 0 0 10px;
}
.hz-article p:last-child { margin-bottom: 0; }
.hz-article blockquote {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: var(--hz-soft-2);
  border-left: 3px solid var(--hz-rose);
  border-radius: 6px;
  color: var(--hz-text-2);
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* 专家观点                                                                   */
/* -------------------------------------------------------------------------- */
.hz-expert {
  background: linear-gradient(180deg, #fff 0%, #fbf9ff 100%);
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-xl);
  box-shadow: var(--hz-shadow-2);
  padding: 18px 16px 16px;
}
.hz-expert-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hz-expert-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--hz-soft);
  background-image: var(--hz-avatar, none);
  background-size: 400% 400%;
  background-position: 33.33% 0%;
  background-repeat: no-repeat;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--hz-line-2);
}
.hz-expert-info { flex: 1 1 auto; min-width: 0; }
.hz-expert-info b { display: block; font-size: 14px; color: #000; font-weight: 700; }
.hz-expert-info span {
  font-size: 12px;
  color: var(--hz-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hz-expert-question {
  background: var(--hz-soft);
  color: var(--hz-deep);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--hz-r-md);
  margin-bottom: 12px;
}
.hz-expert-list {
  counter-reset: hz-expert;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hz-expert-list li {
  position: relative;
  padding: 10px 12px 10px 36px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--hz-text-2);
  background: #fff;
  border: 1px solid var(--hz-line);
  border-radius: var(--hz-r-md);
}
.hz-expert-list li::before {
  counter-increment: hz-expert;
  content: counter(hz-expert) ".";
  position: absolute;
  left: 12px;
  top: 10px;
  font-weight: 700;
  color: var(--hz-rose);
  font-size: 13px;
}
.hz-expert-cta { margin-top: 14px; }
.hz-expert-cta .hz-btn { width: 100%; height: 42px; font-size: 15px; }

/* -------------------------------------------------------------------------- */
/* 真实性 / 隐私说明 / 安全提醒                                                */
/* -------------------------------------------------------------------------- */
.hz-note {
  background: #fff;
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-lg);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--hz-text-2);
}
.hz-note.is-warn {
  background: rgba(237, 119, 114, 0.06);
  border-color: rgba(237, 119, 114, 0.30);
}
.hz-note h3 { font-size: 14px; margin-bottom: 6px; color: var(--hz-deep); }
.hz-note.is-warn h3 { color: var(--hz-rose); }
.hz-note p { margin: 0 0 6px; }
.hz-note p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------- */
/* 全局移动端底栏（粉 + 绿 双按钮）                                            */
/* -------------------------------------------------------------------------- */
.hz-global-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--hz-line);
  box-shadow: 0 -4px 12px rgba(31, 33, 60, 0.06);
}
.hz-bottom-btn {
  flex: 0 0 calc(40% - 6px);
  min-width: 0;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: var(--hz-r-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.hz-bottom-btn span.icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.hz-bottom-btn.is-rose { background: var(--hz-rose); color: #fff; }
.hz-bottom-btn.is-green {
  flex-basis: calc(60% - 6px);
  background: var(--hz-green);
  color: #fff;
}
.hz-bottom-btn .hz-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hz-bottom-spacer { height: calc(58px + env(safe-area-inset-bottom)); }

/* -------------------------------------------------------------------------- */
/* 证书弹窗                                                                   */
/* -------------------------------------------------------------------------- */
.hz-cert-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 22, 36, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hz-cert-dialog[aria-hidden="false"] { display: flex; }
.hz-cert-dialog-panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: var(--hz-r-2xl);
  padding: 22px 20px 18px;
  box-shadow: var(--hz-shadow-3);
  text-align: center;
  animation: hz-cert-pop 0.18s ease-out;
}
@keyframes hz-cert-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hz-cert-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--hz-muted);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hz-cert-close:hover { color: var(--hz-text-2); background: var(--hz-soft-2); }
.hz-cert-close:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }
.hz-cert-title {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin-bottom: 14px;
  padding-right: 24px;
}
.hz-cert-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--hz-r-lg);
  background: linear-gradient(135deg, #f5f2fb 0%, #fff 100%);
  border: 1px solid var(--hz-line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-deep);
  font-size: 13px;
  margin-bottom: 12px;
  overflow: hidden;
}
.hz-cert-img img { width: 100%; height: 100%; object-fit: cover; }
.hz-cert-name {
  font-size: 14px;
  color: var(--hz-text-2);
  margin-bottom: 4px;
}
.hz-cert-number {
  font-size: 12px;
  color: var(--hz-muted);
  letter-spacing: 0.3px;
}

/* -------------------------------------------------------------------------- */
/* 极窄屏微调（360px）                                                        */
/* -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
  .hz-detail-hero h1 { font-size: 18px; }
  .hz-article h2, .hz-expert h2 { font-size: 16px; }
  .hz-bottom-btn { font-size: 12px; }
  .hz-bottom-btn span.icon { font-size: 12px; width: 12px; height: 12px; }
}

/* 大屏（桌面预览）：把页面居中放进 390 宽手机壳 */
@media (min-width: 421px) {
  body { background-color: #eceef6; background-image: radial-gradient(circle at 1px 1px, rgba(95, 112, 212, 0.05) 1px, transparent 1.2px); }
  .hz-frame {
    max-width: 390px;
    margin: 0 auto;
    background: var(--hz-bg);
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(95, 112, 212, 0.08), 0 24px 60px rgba(31, 33, 60, 0.18);
    position: relative;
  }
}
