/* ==========================================================================
   花镇案例 · 栏目列表页（最终移动端 UI）
   适配：360 / 375 / 390 / 414 px 移动端；>=421 px 桌面以 390 宽手机壳预览
   字段映射：见 list.html 顶部注释
   ========================================================================== */

:root {
  --hz-rose: #ed7772;
  --hz-rose-2: #f4778a;
  --hz-deep: #5f70d4;
  --hz-deep-2: #7286f0;
  --hz-soft: #e9ecfa;
  --hz-soft-2: #f5f2fb;
  --hz-green: #45c526;
  --hz-green-2: #3aa91f;
  --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", "AlibabaPuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hz-text);
  background: var(--hz-bg);
  font-weight: 400;
  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 { margin: 0; color: #000; font-weight: 700; }
h1 { font-size: 20px; line-height: 1.35; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 15px; 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                                                                  */
/* -------------------------------------------------------------------------- */
.hz-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-hero::after {
  content: "";
  position: absolute;
  right: -50px; top: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 112, 212, 0.16) 0%, rgba(95, 112, 212, 0) 70%);
  pointer-events: none;
}
.hz-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--hz-r-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hz-line-2);
  margin-bottom: 14px;
}
.hz-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hz-hero h1 {
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 6px;
}
.hz-hero p.hz-subtitle {
  font-size: 13px;
  color: var(--hz-muted);
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------------------- */
/* 分类筛选                                                                   */
/* -------------------------------------------------------------------------- */
.hz-tabs {
  position: sticky;
  top: 44px;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 10px 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);
  overflow-x: auto;
  scrollbar-width: none;
}
.hz-tabs::-webkit-scrollbar { display: none; }
.hz-tab {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hz-text-2);
  background: var(--hz-soft-2);
  border-radius: var(--hz-r-pill);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.hz-tab[aria-selected="true"] {
  background: var(--hz-deep);
  color: #fff;
}
.hz-tab:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }

/* -------------------------------------------------------------------------- */
/* 案例卡片                                                                   */
/* -------------------------------------------------------------------------- */
.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-case-list { display: flex; flex-direction: column; gap: 12px; }
.hz-case-card {
  background: #fff;
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-lg);
  box-shadow: var(--hz-shadow-1);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hz-case-card:active { transform: translateY(1px); }
.hz-case-card:hover { box-shadow: var(--hz-shadow-2); }

.hz-case-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--hz-muted);
}
.hz-case-meta .hz-tag { font-size: 11px; height: 20px; padding: 0 8px; }
.hz-case-title {
  font-size: 15px;
  line-height: 1.45;
  color: #000;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hz-case-desc {
  font-size: 13px;
  color: var(--hz-text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hz-case-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--hz-muted);
}
.hz-case-foot .hz-read-time { display: inline-flex; align-items: center; gap: 4px; }
.hz-case-foot .hz-case-go { color: var(--hz-deep); font-weight: 600; }

/* 查看更多 */
.hz-more-btn {
  margin-top: 16px;
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: var(--hz-soft-2);
  color: var(--hz-deep);
  font-size: 17px;       /* 与 H2 一致：等同 H 标题字号 */
  font-weight: 700;      /* 标题级加粗 */
  letter-spacing: 0.5px;
  border-radius: var(--hz-r-md);
  border: 1px dashed var(--hz-line-2);
}
.hz-more-btn:active { background: var(--hz-soft); }
.hz-more-btn:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }

/* -------------------------------------------------------------------------- */
/* 咨询师模块（按业务筛选）                                                   */
/* -------------------------------------------------------------------------- */
.hz-consultant-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.hz-consultant-tab {
  flex: 1 1 0;
  height: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hz-text-2);
  background: var(--hz-soft-2);
  border-radius: var(--hz-r-pill);
  border: 1px solid transparent;
}
.hz-consultant-tab[aria-selected="true"] {
  background: var(--hz-rose);
  color: #fff;
  border-color: var(--hz-rose);
}
.hz-consultant-tab:focus-visible { outline: 2px solid var(--hz-deep); outline-offset: 2px; }

.hz-consultant-list { display: flex; flex-direction: column; gap: 12px; }
.hz-consultant-row {
  background: #fff;
  border: 1px solid var(--hz-line-2);
  border-radius: var(--hz-r-lg);
  box-shadow: var(--hz-shadow-1);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hz-consultant-row .hz-consultant-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hz-consultant-row .hz-consultant-avatar {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  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-row .hz-consultant-info { flex: 1 1 auto; min-width: 0; }
.hz-consultant-row .hz-consultant-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hz-consultant-row .hz-consultant-expert {
  display: inline-block;
  font-size: 12px;
  color: var(--hz-rose);
  background: rgba(237, 119, 114, 0.10);
  padding: 2px 8px;
  border-radius: var(--hz-r-pill);
  margin-bottom: 0;
}
.hz-consultant-row .hz-consultant-meta {
  font-size: 12px;
  color: var(--hz-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hz-consultant-actions {
  display: flex;
  gap: 10px;
}
.hz-consultant-actions .hz-btn {
  flex: 1 1 50%;
  min-width: 0;
  height: 36px;
  font-size: 14px;
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* 案例真实性说明                                                             */
/* -------------------------------------------------------------------------- */
.hz-authenticity {
  background: var(--hz-soft-2);
  border: 1px solid var(--hz-line);
  border-radius: var(--hz-r-lg);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--hz-muted);
  line-height: 1.7;
}
.hz-authenticity b {
  display: block;
  color: var(--hz-deep);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* -------------------------------------------------------------------------- */
/* 按钮                                                                       */
/* -------------------------------------------------------------------------- */
.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); }

.hz-hand {
  width: 16px; height: 16px;
  flex: 0 0 16px;
  background: url("../images/hand-click.svg") no-repeat center / contain;
}

/* -------------------------------------------------------------------------- */
/* 全局移动端底栏                                                             */
/* -------------------------------------------------------------------------- */
.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; }

/* 状态消息（toast） */
.hz-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 240;
  max-width: 80%;
  padding: 10px 16px;
  background: rgba(20, 22, 36, 0.92);
  color: #fff;
  font-size: 13px;
  border-radius: var(--hz-r-pill);
  box-shadow: var(--hz-shadow-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hz-toast[aria-hidden="false"] {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* 极窄屏 */
@media (max-width: 360px) {
  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
  .hz-hero h1 { font-size: 18px; }
  .hz-bottom-btn { font-size: 12px; }
  .hz-bottom-btn span.icon { font-size: 12px; width: 12px; height: 12px; }
  .hz-consultant-row .hz-consultant-meta { font-size: 11px; }
  .hz-consultant-actions .hz-btn { font-size: 13px; height: 34px; }
}

/* 桌面预览：把页面放进 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;
  }
}
