/* ============================================
   湖北盛科律师事务所 - 全局样式
   字体引入、排版、重置、Tailwind补充
   ============================================ */

/* ===== Google Fonts: 思源宋体 + 思源黑体（font-display: swap 防 FOIT） ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Noto+Serif+SC:wght@400;500;600;700;900&display=swap');

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;  /* 防止固定导航遮挡锚点 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-main);
  background-color: var(--color-bg-white);
  overflow-x: hidden;
  /* ✅ 修复：overflow-x:clip 在禁止横向滚动的同时不破坏 position:sticky
     （overflow-x:hidden 会把 body 变成滚动容器，导致深蓝顶栏/侧边栏吸顶失效） */
  overflow-x: clip;
  letter-spacing: 0.3px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 文本选择/复制放开（百度移动搜索白皮书5.0：落地页文本须支持长按复制） */
}

/* ===== 标题体系 ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--color-text-title);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.8px;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

/* ===== 链接 ===== */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

/* ===== 图片 ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 列表 ===== */
ul, ol {
  list-style: none;
}

/* ===== 通用容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Section 通用间距 ===== */
.section {
  padding: var(--section-gap) 0;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.125rem;
  font-weight: 700;
  color: var(--color-text-title);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

/* ===== CTA主按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background-color: var(--color-sky);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--color-sky);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--color-sky-light);
  border-color: var(--color-sky-light);
  color: #fff;
}

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

.btn-primary:disabled {
  background-color: var(--color-btn-disabled);
  border-color: transparent;
  color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* ===== 次要按钮 ===== */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background-color: #fff;
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: var(--color-bg-gray);
  color: var(--color-primary);
}

/* ===== 金色文字链接 ===== */
.link-gold {
  color: var(--color-gold-dark);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.link-gold:hover {
  color: var(--color-gold);
}

/* ===== 通用卡片 ===== */
.card {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-gold);
}

/* ===== 标签/徽章 ===== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-bg-gray);
}

.tag-gold {
  border-color: var(--color-gold);
  color: var(--color-gold-dark);
  background: rgba(148, 120, 73,0.08);
}

.tag-primary {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(26, 36, 54,0.06);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 14px 0;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .separator {
  color: var(--color-border);
  font-size: 0.75rem;
  user-select: none;
}

.breadcrumb .current {
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== 滚动渐现动画 (配合JS) ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 金色下划线hover效果 ===== */
.nav-hover-underline {
  position: relative;
}

.nav-hover-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width var(--transition-normal);
}

.nav-hover-underline:hover::after,
.nav-hover-underline.active::after {
  width: 100%;
}

/* ===== 页面顶部标题区 ===== */
.page-hero {
  background: var(--color-primary);
  padding: 64px 0;
  text-align: center;
  color: #fff;
}

.page-hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.page-hero p {
  color: var(--color-gold-light);
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.7;
}

/* ===== 工具类 ===== */
.hidden {
  display: none !important;
}

/* 屏幕阅读器专用（SEO友好） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== 标签切换器（全站通用） ===== */
.tab-switcher {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 32px;
}

.tab-switcher .tab-btn {
  padding: 12px 28px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-switcher .tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-gold);
}

.tab-switcher .tab-btn:hover {
  color: var(--color-primary);
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 110px;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-normal);
}

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

.back-to-top:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 分享按钮已全站移除 */

/* ===== 响应式断点预留 ===== */
@media (max-width: 1024px) {
  :root {
    --section-gap: 60px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .section-title {
    font-size: 1.75rem;
  }
}

/* ===== 详情弹窗 (新闻/案例) ===== */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

.detail-modal.open {
  display: flex;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.detail-panel {
  position: relative;
  width: 90%;
  max-width: 680px;
  max-height: 80vh;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: var(--shadow-popup);
  animation: detail-in 0.3s ease;
}

@keyframes detail-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-close {
  position: sticky;
  top: 12px;
  right: 12px;
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-gray);
  border: none;
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.detail-close:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 详情弹窗（隐私政策 / 免责声明等） */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(16,24,32,0.5);
  z-index: 9998; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.detail-box {
  background: #fff; border-radius: 6px; width: 480px; max-width: 92vw;
  max-height: 80vh; overflow-y: auto; border: 1px solid #ddd; box-shadow: none;
}
.modal-close {
  position: sticky; top: 0; float: right; z-index: 1;
  background: #fff; border: none; font-size: 1.5rem; cursor: pointer;
  padding: 12px 16px; color: var(--color-text-secondary); line-height: 1;
}

.detail-body {
  padding: 14px 18px;
  padding-top: 8px;
}

.detail-body h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  padding-right: 40px;
  color: var(--color-primary);
  line-height: 1.4;
}

.detail-meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.detail-summary {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* 隐私政策/法律免责声明：朴素小字 TXT，靠左排列 */
.legal-plain {
  font-size: 0.72rem;
  line-height: 1.55;
  color: #333;
  white-space: pre-wrap;
  word-break: break-all;
  text-align: left;
}

.detail-tags {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== 新闻/案例可点击提示 ===== */
.news-item, .case-card {
  cursor: pointer;
}

/* ===== 内容交叉关联 (案例↔律师) ===== */
/* ===== CTA 咨询转化通栏（全站统一） ===== */
.cta-banner {
  background: var(--color-primary-dark);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: var(--section-gap);
}
.cta-banner .container {
  position: relative;
  z-index: 2;
}
.cta-banner h2 {
  color: #fff;
  font-size: 2.125rem;
  margin-bottom: 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.8px;
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  margin-bottom: 32px;
  line-height: 1.75;
}
.cta-banner .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-banner .btn-primary {
  font-size: 1rem;
  padding: 14px 36px;
  background: var(--color-gold-dark);
  border-color: var(--color-gold);
  color: #fff;
}
.cta-banner .btn-primary:hover {
  background: var(--color-gold);
  color: #fff;
}
.cta-banner .btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.cta-banner .btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ===== 内页通用标题区 ===== */
.page-header {
  text-align: center;
  padding: 48px 0 16px;
}
.page-header .section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 0 auto 1.25rem;
  border-radius: 2px;
}
.page-header .section-title {
  margin-bottom: 0.5rem;
}
.page-header .section-subtitle {
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== Page Hero 背景图支持 ===== */
.page-hero.has-bg-image,
.section.has-bg-image,
.cta-banner.has-bg-image {
  position: relative;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.page-hero.has-bg-image::before,
.section.has-bg-image::before,
.cta-banner.has-bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 36, 54,0.55);
  z-index: 1;
}
.page-hero.has-bg-image > .container,
.section.has-bg-image > .container,
.cta-banner.has-bg-image > .container {
  position: relative;
  z-index: 2;
}

/* ===== 内容交叉关联 (案例↔律师) ===== */
.case-lawyers {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}
.case-lawyer-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.case-lawyer-link:hover {
  color: var(--color-gold);
  text-decoration: underline;
}
.lawyer-case-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-primary);
  background: rgba(26, 36, 54,0.06);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

@media (max-width: 768px) {
  :root {
    --section-gap: 48px;
  }

  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }

  .section-title {
    font-size: 1.375rem;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }

.container {
  padding: 0 16px;
}

.page-hero {
  padding: 40px 0;
}

.cta-banner {
  display: none;   /* 手机端隐藏咨询通栏（王总） */
}
}

/* ===== 全站图片防护 ===== */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* ===== 灰度升级提示条 ===== */
.version-update-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.version-update-bar.show {
  transform: translateY(0);
}

.version-update-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.version-update-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.version-update-text {
  opacity: 0.9;
  line-height: 1.5;
}

.version-update-text strong {
  color: var(--color-gold);
  font-weight: 600;
}

.version-update-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  background: var(--color-gold-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.version-update-btn:hover {
  background: var(--color-gold);
  color: #fff;
}

.version-update-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-left: 4px;
}

.version-update-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* ===== 禁止打印 ===== */
@media print {
  body, body * { display: none !important; }
}

/* ===== 图片查看器 lightbox（百度白皮书5.0 4.3.3.2：正文图片可看大图/捏合缩放/左右滑动） ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.1s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 100001;
}
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 100001;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  z-index: 100001;
}
