/* ============================================================
   Apple 极简律师风格 — template-gamma (优化版 v2)
   设计灵感：Apple 官网设计语言
   - 摄影优先，UI 后退
   - 单蓝色强调色 #0066cc
   - 交替浅色/深色全幅区块
   - SF Pro 字体系统（使用 Inter 替代）
   - 药丸形按钮，极简留白
   优化内容：
   - 增强色彩系统与设计令牌
   - 改进视觉层次与微交互
   - 深度优化移动端/微信浏览器适配
   - 提升加载性能与渲染效率
   ============================================================ */

/* ---- 设计令牌 (增强版) ---- */
:root {
  /* 品牌色 - 保持 #0066cc 核心色不变 */
  --blue: #0066cc;
  --blue-focus: #0071e3;
  --blue-on-dark: #2997ff;
  --blue-active: #004499;
  --blue-subtle: rgba(0, 102, 204, 0.08);
  --blue-glow: rgba(0, 102, 204, 0.15);

  /* 表面色 - 优化对比度 */
  --white: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tile-1: #272729;
  --tile-2: #2a2a2c;
  --tile-3: #252527;
  --pure-black: #000000;
  --chip-gray: #d2d2d7;

  /* 文字色 - 提升可读性（优化对比度） */
  --ink: #1d1d1f;
  --ink-muted-80: #333333;
  --ink-muted-48: #6a6a6a;
  --ink-muted-60: #555555;
  --body-muted: #aaaaaa;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.65);

  /* 分割线与边框 */
  --divider-soft: #f0f0f0;
  --hairline: #e0e0e0;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-on-dark: rgba(255, 255, 255, 0.1);

  /* 圆角 - 更精细的层级 */
  --radius-sm: 5px;
  --radius-md: 11px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* 间距 - 优化视觉节奏 */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 17px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-section: 80px;

  /* 阴影 - Apple 风格微弱阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-product: 0 3px 5px 30px rgba(0, 0, 0, 0.22);
  --shadow-avatar: 0 2px 12px rgba(0, 0, 0, 0.25);

  /* 过渡 - 统一动效曲线 */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-emphatic: cubic-bezier(0.22, 1, 0.36, 1);

  /* 导航尺寸 */
  --nav-height: 44px;

  /* 最大内容宽度 */
  --content-max-width: 980px;
  --nav-max-width: 1240px;

  /* === 列表页 (list-page.css) 覆盖 — 极简蓝主题 === */
  --lp-header-bg-1: var(--pure-black);
  --lp-header-bg-2: var(--tile-1);
  --lp-accent: var(--blue-on-dark);
  --lp-accent-dark: var(--blue);
  --lp-accent-light: var(--blue-subtle);
  --lp-accent-rgb: 41, 151, 255;
  --lp-btn-text: var(--white);
  --lp-header-text: #ffffff;
  --lp-glow-start: rgba(41, 151, 255, 0.12);
  --lp-glow-end: transparent;

  /* === 知识板块 (knowledge-sections.css) 覆盖 — 极简蓝主题 === */
  --ks-accent: var(--blue);
  --ks-accent-light: var(--blue-subtle);
  --ks-accent-hover: var(--blue-active);
  --ks-surface-light: var(--parchment);
  --ks-heading: var(--ink);
  --ks-body: var(--ink-muted-80);
  --ks-muted: var(--ink-muted-60);
  --ks-muted-soft: var(--ink-muted-48);
  --ks-white: #ffffff;
  --ks-border: var(--divider-soft);
  --ks-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --ks-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ---- Reset 增强 ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; /* 防止 iOS 横屏自动缩放 */
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink);
  background-color: var(--white);
  /* 微信浏览器字体渲染优化 */
  -webkit-font-variant-ligatures: no-common-ligatures;
  font-variant-ligatures: no-common-ligatures;
}

/* ---- 选中颜色 ---- */
::selection {
  background: var(--blue);
  color: var(--white);
}

/* ---- 滚动条 (优雅淡化) ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--parchment);
}
::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--chip-gray);
}

/* ---- 容器 (优化最大宽度) ---- */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---- 导航栏 (Apple 风格纯黑细条 - 增强) ---- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  /* 微信浏览器兼容 backdrop-filter */
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  /* 微信浏览器回退方案 */
  background: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.92)), to(rgba(0,0,0,0.92)));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  will-change: transform; /* GPU 加速 */
}

/* 微信浏览器不支持 backdrop-filter 时的纯色回退 */
@supports not (backdrop-filter: blur(20px)) {
  .nav-bar {
    background: var(--pure-black);
  }
}

.nav-container {
  max-width: var(--nav-max-width);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s var(--transition-smooth);
  -webkit-tap-highlight-color: transparent; /* 移动端点击高亮去除 */
}

.logo:hover {
  opacity: 0.8;
}

.logo:active {
  opacity: 0.65;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  flex-shrink: 0;
}

.logo-name {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--on-dark);
  white-space: nowrap;
  margin-left: 10px;
  opacity: 0.88;
}

#main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

.nav-list li a {
  display: block;
  padding: 0 12px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: var(--nav-height);
  transition: color 0.2s var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* 当前页指示器 - 细线下划线替代加粗 */
.nav-list li a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--blue-on-dark);
  border-radius: 1px;
}

.nav-list li a:hover,
.nav-list li a[aria-current="page"] {
  color: var(--on-dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--on-dark);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s var(--transition-smooth);
}

.mobile-menu-btn:active {
  opacity: 0.6;
}

/* ---- 全幅区块 (产品级"瓷砖") ---- */
.section-tile {
  width: 100%;
  padding: var(--space-section) 0;
  text-align: center;
  /* 微妙的交叉淡出背景过度 */
  position: relative;
}

/* 区块间过渡 - 增加深度感 */
.section-tile-light + .section-tile-dark {
  border-top: none;
}

.section-tile-light {
  background: var(--white);
  color: var(--ink);
}

.section-tile-parchment {
  background: var(--parchment);
  color: var(--ink);
}

.section-tile-dark {
  background: var(--tile-1);
  color: var(--on-dark);
}

.section-tile-black {
  background: var(--pure-black);
  color: var(--on-dark);
}

/* ---- Hero 区块 (增强版) ---- */
.hero-tile {
  padding: 120px 0 100px;
  text-align: center;
  background: var(--pure-black);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

/* 微妙的径向渐变叠加，增加深邃感 */
.hero-tile::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center 20%, rgba(41, 151, 255, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at bottom center, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.hero-avatar {
  margin: 0 auto var(--space-xl);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-avatar);
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s var(--transition-smooth);
}

.hero-avatar:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 微信浏览器图片渲染兼容 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.hero-display {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  color: var(--on-dark);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.hero-tagline {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--on-dark-muted);
  margin-bottom: var(--space-xxl);
  position: relative;
  z-index: 1;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ---- 标题系统 (优化层级) ---- */
.section-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-xxl);
}

.section-tile-dark .section-subtitle,
.section-tile-black .section-subtitle {
  color: var(--body-muted);
}

/* ---- 按钮系统 (增强交互反馈) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--transition-smooth);
  border: none;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-pill {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
}

.btn-pill-small {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: -0.224px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-focus);
}

.btn-primary:active {
  background: var(--blue-active);
  transform: scale(0.97);
}

.btn-outline-light {
  background: transparent;
  color: var(--blue-on-dark);
  border: 1px solid var(--blue-on-dark);
}

.btn-outline-light:hover {
  background: var(--blue-on-dark);
  color: var(--pure-black);
}

.btn-outline-light:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-outline:active {
  transform: scale(0.97);
}

/* ---- 文字链接 ---- */
.text-link {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s var(--transition-smooth);
}

.text-link:hover {
  color: var(--blue-focus);
  text-decoration: underline;
}

.text-link-on-dark {
  color: var(--blue-on-dark);
  text-decoration: none;
  transition: color 0.2s var(--transition-smooth);
}

.text-link-on-dark:hover {
  text-decoration: underline;
  color: #66b8ff;
}

/* ---- 面包屑 ---- */
.breadcrumb {
  background: var(--parchment);
  padding: 8px 0;
  margin-top: var(--nav-height);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--ink-muted-48);
}

.breadcrumb-item a {
  color: var(--blue);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  margin-right: 8px;
  color: var(--ink-muted-48);
}

/* ---- 律师资料卡片 ---- */
.lawyer-profile {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-lg);
  text-align: center;
}

.lawyer-name {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: var(--space-xs);
}

.lawyer-firm {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-lg);
}

.lawyer-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xxl);
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  padding: 4px 12px;
  background: var(--parchment);
  color: var(--ink-muted-80);
  border-radius: var(--radius-pill);
  transition: background 0.2s var(--transition-smooth);
}

.tag:hover {
  background: var(--divider-soft);
}

/* ---- 律师信息网格 (增强卡片质感) ---- */
.lawyer-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  text-align: left;
}

.info-item {
  padding: var(--space-md);
  background: var(--parchment);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: border-color 0.2s var(--transition-smooth),
              box-shadow 0.2s var(--transition-smooth);
}

.info-item:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  text-transform: uppercase;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-xxs);
}

.info-value {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  word-break: break-word;
}

.info-value a {
  color: var(--blue);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

/* ---- 卡片网格 ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* ---- 问题答疑 FAQ (增强折叠体验) ---- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  text-align: left;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--divider-soft);
}

.faq-item:first-child {
  border-top: 1px solid var(--divider-soft);
}

.faq-question {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin-bottom: var(--space-sm);
}

.faq-answer {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink-muted-48);
}

/* ---- 流程列表 ---- */
.procedure-list {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}

.procedure-item {
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--divider-soft);
}

.procedure-item:first-child {
  border-top: 1px solid var(--divider-soft);
}

.section-tile-dark .procedure-item {
  border-bottom-color: var(--border-on-dark);
}

.section-tile-dark .procedure-item:first-child {
  border-top-color: var(--border-on-dark);
}

.procedure-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.procedure-body {
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink-muted-48);
}

/* ---- 案例卡片 (增强悬停反馈) ---- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.case-item {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  border: 1px solid transparent;
}

.case-item:hover {
  background: var(--divider-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.case-item:active {
  transform: translateY(0);
}

.case-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin-bottom: var(--space-sm);
}

.case-excerpt {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--ink-muted-48);
}

/* ---- 观点列表 ---- */
.opinion-list {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}

.opinion-item {
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--divider-soft);
}

.opinion-item:first-child {
  border-top: 1px solid var(--divider-soft);
}

.opinion-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.opinion-conclusion {
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-sm);
}

.opinion-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

/* ---- 指南列表 ---- */
.guide-list {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
}

.guide-item {
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--divider-soft);
}

.guide-item:first-child {
  border-top: 1px solid var(--divider-soft);
}

.guide-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.guide-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

/* ---- 认证列表 ---- */
.cert-card {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  border: 1px solid transparent;
  transition: all 0.3s var(--transition-smooth);
}

.cert-card:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.cert-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  margin-bottom: var(--space-xs);
}

.cert-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--ink-muted-48);
}

/* ---- 列表页头部 ---- */
.list-page-header {
  padding: var(--space-section) 0 var(--space-xxl);
  text-align: center;
  background: var(--parchment);
}

.list-page-header h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: var(--space-sm);
}

.list-page-subtitle {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: var(--ink-muted-48);
}

.list-page-content {
  padding: var(--space-section) 0;
}

/* ---- 分类 / 标签徽章 ---- */
.item-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.item-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -0.12px;
  padding: 2px 8px;
  background: var(--blue-subtle);
  color: var(--blue);
  border-radius: var(--radius-pill);
  margin-left: 6px;
}

/* ---- 模态框 (增强动画) ---- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20000;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s var(--transition-smooth);
}

.modal.active {
  display: flex;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--space-xxl);
  position: relative;
  animation: modalContentIn 0.3s var(--transition-emphatic);
}

@keyframes modalContentIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--parchment);
  color: var(--ink-muted-48);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  background: var(--hairline);
}

/* ---- 回到顶部 (增强交互) ---- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s var(--transition-smooth);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 0.85;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* ---- 页脚 ---- */
footer[role="contentinfo"] {
  background: var(--parchment);
  color: var(--ink-muted-48);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  line-height: 1.3;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg) var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xxl);
  margin-bottom: var(--space-xxl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--hairline);
}

.footer-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--ink-muted-80);
  margin-bottom: var(--space-sm);
}

.footer-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

.footer-text a {
  color: var(--blue);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-legal {
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-muted-48);
}

.footer-legal a {
  color: var(--ink-muted-48);
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.beian-icon {
  height: 14px;
  width: auto;
  vertical-align: middle;
}

/* ---- 静态构建 Footer (generate-static.js 输出结构) ---- */
footer[role="contentinfo"] .footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg) var(--space-xl);
}

footer[role="contentinfo"] .footer-main-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xxl);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--hairline);
}

footer[role="contentinfo"] .footer-section h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--ink-muted-80);
  margin-bottom: var(--space-sm);
}

footer[role="contentinfo"] .footer-section,
footer[role="contentinfo"] .footer-section p,
footer[role="contentinfo"] .footer-section div {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

footer[role="contentinfo"] .footer-section a {
  color: var(--blue);
  text-decoration: none;
}

footer[role="contentinfo"] .footer-section a:hover {
  text-decoration: underline;
}

footer[role="contentinfo"] .footer-copyright {
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-muted-48);
}

footer[role="contentinfo"] .footer-copyright a {
  color: var(--ink-muted-48) !important;
  text-decoration: none;
}

footer[role="contentinfo"] .footer-copyright a:hover {
  text-decoration: underline;
}

/* ---- 加载状态 ---- */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--ink-muted-48);
  font-size: 14px;
}

/* ---- 工具类 ---- */
.section-meta {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted-48);
  margin-top: var(--space-xl);
}

/* 区块内链接包装 */
.section-link-wrapper {
  margin-top: var(--space-xl);
}

/* 标签组容器 (深色背景适配) */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  max-width: 600px;
  margin: 0 auto;
}

/* 深色背景上的标签 */
.tag-on-dark {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--body-muted) !important;
}

.tag-on-dark:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

/* ---- 流程内容样式 ---- */
.conclusion {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-sm);
}

.procedure-overview {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

/* ---- 专业标签按钮行 ---- */
.section-tile-dark .text-link-on-dark {
  font-size: 17px;
  font-weight: 400;
}

/* ==================================================================
   静态构建兼容样式 — 适配 generate-static.js / render.js 输出的 HTML
   保持 Apple 设计语言，但覆盖实际渲染的类名
   ================================================================== */

/* ---- 通用区块（静态构建输出的 section） ---- */
section.certifications,
section.faqs,
section.procedures,
section.cases,
section.opinions,
section.guides {
  padding: var(--space-section) 0;
  text-align: center;
}

/* 首页区块交替：白 → 羊皮纸 → 深色 → 羊皮纸 → 白... */
#certifications { background: var(--parchment); }
#faqs { background: var(--white); }
#procedures { background: var(--tile-1); color: var(--on-dark); }
#cases { background: var(--parchment); }
#opinions { background: var(--white); }
#guides { background: var(--tile-1); color: var(--on-dark); }

/* 深色区块内的标题和副文本 */
#procedures h2,
#guides h2 {
  color: var(--on-dark);
}
#procedures .section-meta,
#guides .section-meta {
  color: var(--body-muted);
}

/* 通用 h2 标题（静态构建直接输出 <h2>） */
section h2 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: var(--space-xxl);
  text-align: center;
}

#procedures h2,
#guides h2 {
  color: var(--on-dark);
}

/* ---- 认证卡片（静态构建用 .card / .card-icon / .card-title） ---- */
.card {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  border: 1px solid transparent;
  transition: all 0.3s var(--transition-smooth);
}

.card:hover {
  background: var(--divider-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.card-icon {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  margin-bottom: var(--space-xs);
}

.card p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--ink-muted-48);
}

#certifications .card {
  background: var(--white);
}

/* ---- FAQ 手风琴 ---- */
/* 静态构建默认展开答案；JS 加载后通过 .active 类切换折叠 */
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 0;
  margin: 0;
  transition: color 0.2s var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
  color: var(--blue);
}

.faq-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin: 0;
  flex: 1;
  padding-right: var(--space-md);
}

.faq-toggle {
  font-size: 24px;
  font-weight: 300;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform 0.3s var(--transition-smooth);
  line-height: 1;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  transition: max-height 0.4s var(--transition-smooth),
              opacity 0.3s var(--transition-smooth),
              padding 0.3s var(--transition-smooth);
  padding-top: var(--space-lg);
  padding-bottom: 0;
}

/* JS 折叠模式：默认折叠，点击展开 */
.js-mode .faq-answer {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.js-mode .faq-item.active .faq-answer {
  max-height: 3000px;
  opacity: 1;
  padding-top: var(--space-lg);
  padding-bottom: 0;
}

.faq-conclusion {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--ink);
  margin-bottom: var(--space-md);
  white-space: pre-line;
}

.faq-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
  white-space: pre-line;
}

.faq-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--divider-soft);
  font-size: 12px;
  color: var(--ink-muted-48);
  line-height: 1.6;
}

.faq-footer .item-tags {
  margin-bottom: var(--space-xs);
}

.faq-footer .item-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  padding: 2px 8px;
  background: var(--blue-subtle);
  color: var(--blue);
  border-radius: var(--radius-pill);
  margin: 2px 4px 2px 0;
}

.faq-footer .item-date {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted-48);
}

#procedures .faq-footer,
#guides .faq-footer {
  border-top-color: var(--border-on-dark);
}

/* ---- 案例卡片（静态构建用 .case-card） ---- */
.case-card {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--transition-smooth);
}

.case-card:hover {
  background: var(--divider-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.case-card .case-link {
  text-decoration: none;
  color: inherit;
}

.case-card .case-link .case-title {
  color: var(--ink);
}

.case-header {
  margin-bottom: var(--space-sm);
}

.case-body .case-conclusion {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-sm);
}

.case-result {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
}

.case-result-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: var(--blue-subtle);
  color: var(--blue);
  border-radius: 50%;
  margin-right: 6px;
  font-size: 12px;
}

/* ---- 流程子元素 ---- */
.procedure-header {
  margin-bottom: var(--space-md);
}

.procedure-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.procedure-category.secondary-tag {
  font-weight: 400;
  text-transform: none;
  padding: 2px 8px;
  background: var(--blue-subtle);
  border-radius: var(--radius-pill);
  margin-left: 6px;
}

.procedure-overview {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted-48);
  margin-bottom: var(--space-lg);
}

.stages {
  margin-top: var(--space-lg);
}

.stage {
  padding: var(--space-lg);
  background: var(--parchment);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.stage h4 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.374px;
  margin-bottom: var(--space-sm);
}

.stage-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted-48);
}

#procedures .stage {
  background: rgba(255, 255, 255, 0.06);
}

.procedure-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--divider-soft);
  font-size: 12px;
  color: var(--ink-muted-48);
  line-height: 1.6;
}

#procedures .procedure-footer {
  border-top-color: var(--border-on-dark);
}

/* ---- 查看全部链接 ---- */
.view-more-bar {
  text-align: center;
  margin-top: var(--space-xl);
}

.view-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  transition: background 0.25s var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.view-more-link:hover {
  background: var(--blue-focus);
}

.view-more-link:active {
  background: var(--blue-active);
  transform: scale(0.97);
}

#procedures .view-more-link,
#guides .view-more-link {
  background: transparent;
  color: var(--blue-on-dark);
  border: 1px solid var(--blue-on-dark);
}

#procedures .view-more-link:hover,
#guides .view-more-link:hover {
  background: var(--blue-on-dark);
  color: var(--pure-black);
}

/* ---- 观点/指南页脚 ---- */
.opinion-footer,
.guide-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--divider-soft);
  font-size: 12px;
  color: var(--ink-muted-48);
  line-height: 1.6;
}

/* ---- 通用标签容器 ---- */
.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-xs);
}

/* ---- 排序等小工具 ---- */
.item-date {
  color: var(--ink-muted-48);
  font-size: 12px;
}

/* ---- 律师资料头像（静态构建兼容） ---- */
.lawyer-profile .lawyer-avatar {
  margin: 0 auto var(--space-xl);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--divider-soft);
  box-shadow: var(--shadow-avatar);
}

.lawyer-profile .lawyer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ---- 列表页适配 ---- */
.list-page-header {
  padding: var(--space-section) 0 var(--space-xxl);
  text-align: center;
}

/* ================================================================
   响应式设计 - 优化断点系统
   ================================================================ */

/* 小桌面 1024px */
@media (max-width: 1068px) {
  :root {
    --space-section: 64px;
  }
  .hero-display {
    font-size: 40px;
  }
  .section-title {
    font-size: 34px;
  }
  section h2 {
    font-size: 34px;
  }
}

/* 平板 834px */
@media (max-width: 833px) {
  .hero-display {
    font-size: 34px;
  }
  .section-title {
    font-size: 28px;
  }
  section h2 {
    font-size: 28px;
  }
  .lawyer-info-grid {
    grid-template-columns: 1fr;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-list li a {
    padding: 0 8px;
    font-size: 11px;
  }
}

/* 手机 640px - 核心移动端适配 */
@media (max-width: 640px) {
  :root {
    --space-section: 48px;
  }
  .hero-tile {
    padding: 100px 0 64px;
  }
  .hero-display {
    font-size: 28px;
    letter-spacing: -0.14px;
  }
  .hero-tagline {
    font-size: 18px;
  }
  .section-title {
    font-size: 24px;
  }
  .section-subtitle {
    font-size: 17px;
    margin-bottom: var(--space-xl);
  }
  section h2 {
    font-size: 24px;
    margin-bottom: var(--space-xl);
  }
  .container {
    padding: 0 16px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .lawyer-name {
    font-size: 28px;
  }
  .list-page-header h1 {
    font-size: 28px;
  }
  .list-page-subtitle {
    font-size: 17px;
  }

  /* 移动端导航折叠 (带滑动动画) */
  .mobile-menu-btn {
    display: block;
  }
  #main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    /* 微信浏览器不支持 backdrop-filter 时的回退 */
    background: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.97)), to(rgba(0,0,0,0.97)));
  }
  #main-nav.active {
    display: block;
    animation: navSlideDown 0.25s var(--transition-emphatic);
  }

  @keyframes navSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-list {
    flex-direction: column;
    padding: 0 0 var(--space-md);
  }
  .nav-list li a {
    padding: 10px 22px;
    line-height: 1.5;
    font-size: 14px;
  }
  .nav-list li a[aria-current="page"]::after {
    bottom: 4px;
    left: 22px;
    right: 22px;
  }

  /* 案例卡片简化 */
  .case-item {
    padding: var(--space-lg);
  }
  .case-title {
    font-size: 18px;
  }

  /* 模态框移动端适配 */
  .modal {
    padding: var(--space-sm);
    align-items: flex-end; /* 底部弹出 */
  }
  .modal-content {
    padding: var(--space-lg);
    max-height: 70vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: modalMobileIn 0.3s var(--transition-emphatic);
  }

  @keyframes modalMobileIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 页脚网格简化 */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* 回到顶部按钮位置调整 */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* 律师信息网格内边距调整 */
  .info-item {
    padding: var(--space-sm) var(--space-md);
  }

  /* 列表项间距压缩 */
  .opinion-item,
  .procedure-item,
  .guide-item {
    padding: var(--space-xl) 0;
  }

  .opinion-title,
  .procedure-title,
  .guide-title {
    font-size: 20px;
  }
}

/* 小手机 419px - 极端小屏 */
@media (max-width: 419px) {
  .hero-display {
    font-size: 24px;
  }
  .hero-tagline {
    font-size: 16px;
  }
  .hero-avatar {
    width: 100px;
    height: 100px;
  }
  .btn-pill {
    font-size: 14px;
    padding: 8px 16px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
}

/* ================================================================
   微信浏览器 (WeChat / X5内核) 专用兼容修复
   ================================================================ */

/* 修复微信浏览器 flex 布局兼容性 */
@supports (-webkit-overflow-scrolling: touch) {
  /* 微信内置浏览器 X5 内核 */
  .hero-tile {
    /* 解决 X5 内核下 radial-gradient 渲染异常 */
    background-color: var(--pure-black);
  }
  .hero-tile::before {
    /* 部分 X5 不支持伪元素渐变，回退至纯色 */
    display: none;
  }

  .nav-bar {
    /* 微信 X5 内核下 backdrop-filter 无效，使用纯色回退 */
    background: var(--pure-black) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* 修复 iOS 微信下按钮点击高亮 */
  .btn,
  .nav-list li a,
  .mobile-menu-btn,
  .case-item,
  .faq-question {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }

  /* 修复 iOS 微信下固定定位抖动 */
  .nav-bar,
  .back-to-top {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* 修复 iOS 滚动卡顿 */
  .modal-content {
    -webkit-overflow-scrolling: touch;
  }
}

/* 微信浏览器标识选择 (通过 UA 判断，weixin 或 micromessenger) */
/* 针对微信浏览器的回退方案：禁用背景滤镜相关特性 */

/* ---- 微信浏览器禁用 backdrop-filter ---- */
.wechat-browser .nav-bar {
  background: var(--pure-black) !important;
}

.wechat-browser .modal {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* ---- iOS Safari 安全区域适配 ---- */
@supports (padding: env(safe-area-inset-bottom)) {
  .hero-tile {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .footer-inner {
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  }
  .back-to-top {
    bottom: calc(32px + env(safe-area-inset-bottom));
    right: calc(32px + env(safe-area-inset-right));
  }
}

/* ---- 减少动画偏好 ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- 打印样式 ---- */
@media print {
  .nav-bar,
  .back-to-top,
  .mobile-menu-btn {
    display: none !important;
  }
  .hero-tile {
    padding: 40px 0;
    background: var(--white) !important;
    color: var(--ink) !important;
  }
  .hero-display {
    color: var(--ink);
  }
  .hero-tagline {
    color: var(--ink-muted-48);
  }
  .section-tile-dark {
    background: var(--parchment) !important;
    color: var(--ink) !important;
  }
  .btn {
    border: 1px solid var(--ink);
  }
  .container {
    max-width: 100%;
  }
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}