/* ============================================
   高翠平律师官网 - 全局样式表
   版本: v1.0 | 2026-06-09
   路径: /css/global.css
   ============================================ */

/* ===== 1. CSS变量 & 重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
body { color: #333; line-height: 1.6; background: #fff; }
:root {
  --blue: #0a2463;
  --blue-light: #0f3460;
  --blue-dark: #071a43;
  --gold: #d4af37;
  --gold-light: #e8c96a;
  --white: #fff;
  --light-gray: #f8f9fa;
  --text-gray: #666;
}

/* ===== 2. 顶部导航栏 ===== */
.header-nav {
  background: linear-gradient(135deg, #0a2463 0%, #0f3460 50%, #071a43 100%);
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(10, 36, 99, 0.4);
}
.nav-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav-logo { color: var(--gold); font-size: 22px; font-weight: bold; text-decoration: none; letter-spacing: 1px; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px;
  padding: 8px 14px; border-radius: 6px; transition: all 0.3s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: rgba(212, 175, 55, 0.12); }
.nav-phone-btn { background: var(--gold) !important; color: var(--blue) !important; font-weight: bold; padding: 8px 18px !important; border-radius: 6px; }
.nav-phone-btn:hover { opacity: 0.85; }
.hamburger { display: none; background: none; border: none; color: var(--gold); font-size: 26px; cursor: pointer; }

/* ===== 3. 页面Hero区（子页面通用）===== */
.page-hero {
  background: linear-gradient(135deg, #0a2463, #0f3460);
  padding: 50px 40px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1.5px 1.5px at 80px 60px, rgba(255,255,255,0.08), transparent),
    radial-gradient(1px 1px at 150px 30px, rgba(255,255,255,0.1), transparent);
  background-size: 200px 100px;
}
.page-hero h1 { font-size: 32px; color: #fff; margin-bottom: 8px; position: relative; z-index: 1; }
.page-hero p { font-size: 15px; color: rgba(255,255,255,0.7); position: relative; z-index: 1; }

/* ===== 4. 内容布局（子页面通用）===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.page-content { padding: 50px 40px; }
.content-card {
  background: #fff; border-radius: 12px; padding: 32px 28px;
  margin-bottom: 28px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.content-card h2 { font-size: 22px; color: var(--blue); margin-bottom: 16px; }
.content-card h3 { font-size: 18px; color: var(--blue); margin-bottom: 12px; }
.content-card p { font-size: 15px; line-height: 1.9; color: #444; margin-bottom: 14px; }
.content-card ul, .content-card ol { margin-left: 22px; margin-bottom: 16px; color: #444; }
.content-card li { font-size: 15px; line-height: 1.8; margin-bottom: 8px; }

/* ===== 5. 通用区块标题 ===== */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; color: var(--blue); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-gray); }
.section-divider { width: 60px; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 2px; margin: 14px auto 0; }

/* ===== 6. 卡片通用（去下划线）===== */
.service-card, .case-card, .honor-card, .guarantee-card,
.service-card:hover, .case-card:hover, .honor-card:hover, .guarantee-card:hover,
a[class*="card"], a[class*="card"]:hover,
a[class*="card"] *, a[class*="card"]:hover * {
  text-decoration: none !important; border-bottom: none !important;
}

/* ===== 7. 底部联系栏 - 三栏布局 ===== */
.contact-bar {
  background: linear-gradient(135deg, #0a2463, #071a43);
  color: #fff; padding: 50px 40px 30px;
}
.contact-triple { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; align-items: start; }
.contact-col h3 { font-size: 20px; color: #d4af37; margin-bottom: 16px; font-weight: bold; }
.contact-info-col p { font-size: 14px; line-height: 2.2; color: rgba(255,255,255,0.8); margin: 0; }
.contact-info-col a { color: #d4af37; text-decoration: none; }
.contact-info-col a:hover { text-decoration: underline; }
.qr-col { text-align: center; }
.qr-row { display: flex; gap: 20px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.qr-row .qr-center { margin-top: 0 !important; }
.qr-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-center img { width: 130px; height: auto; border: 2px solid #d4af37; border-radius: 10px; background: #fff; padding: 6px; }
.qr-center span { font-size: 12px; color: #d4af37; }
.contact-footer-note {
  grid-column: 1 / -1; text-align: center; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.contact-footer-note a { color: rgba(255,255,255,0.5); }

/* ===== 8. Footer版权 ===== */
footer {
  background: #050d1e; color: rgba(255,255,255,0.45);
  text-align: center; padding: 18px 40px; font-size: 13px;
}

/* ===== 9. 作者简介（统一只出现一次）===== */
.author-bio {
  background: linear-gradient(135deg, #f8f9fa, #fff);
  border-left: 4px solid var(--gold); padding: 24px 28px;
  margin: 32px 0; border-radius: 0 12px 12px 0;
}
.author-bio-inner { display: flex; gap: 20px; align-items: center; }
.author-photo { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.author-name { font-size: 17px; font-weight: bold; color: var(--blue); margin-bottom: 6px; }
.author-desc { font-size: 14px; line-height: 1.7; color: var(--text-gray); }
.author-phone { color: var(--blue); font-weight: bold; text-decoration: none; }
.author-phone:hover { text-decoration: underline; }

/* ===== 10. 双浮标（唯一标准）===== */
.float-buttons {
  position: fixed; right: 18px; bottom: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 12px;
}
.float-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none; position: relative;
}
.float-btn:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(0,0,0,0.35); }
.robot-btn { background: linear-gradient(135deg, #d4af37, #e8c96a); border: 2px solid #c9a030; }
.robot-btn svg { width: 26px; height: 26px; }
.robot-btn svg path { fill: #0a2463; }
.wechat-btn { background: #07c160; border: 2px solid #06a850; }
.wechat-btn svg { width: 24px; height: 24px; }
.wechat-btn svg path { fill: #fff; }
.qrcode-popup {
  display: none; position: absolute; right: 64px; bottom: 0;
  background: #fff; padding: 14px; border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2); width: 200px;
}
.qrcode-popup p { text-align: center; font-size: 11px; color: #888; margin: 5px 0 3px; }
.qrcode-popup p:first-child { margin-top: 8px; }
.popup-qrcode { width: 100%; height: auto; display: block; border-radius: 6px; }

/* ===== 11. 面包屑导航 ===== */
.breadcrumb { font-size: 13px; color: var(--text-gray); padding: 12px 0; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: #ccc; }

/* ===== 12. 移动端响应式 ===== */
@media (max-width: 1024px) {
  .contact-triple { grid-template-columns: 1fr 1fr; gap: 24px; }
  .container { padding: 0 24px; }
  .page-content { padding: 36px 18px; }
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--blue); padding: 15px 20px; gap: 4px; z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-phone-btn { text-align: center; }
  .page-hero { padding: 36px 18px 28px; }
  .page-hero h1 { font-size: 26px; }
  .container { padding: 0 18px; }
  .content-card { padding: 22px 18px; }
  .section-container { padding: 0 18px; }
  .contact-triple { grid-template-columns: 1fr !important; gap: 24px; text-align: center; }
  .contact-info-col { text-align: center; }
  .qr-col { display: none; }
  .author-bio-inner { flex-direction: column; text-align: center; }
  .float-buttons { right: 12px; bottom: 16px; gap: 10px; }
  .float-btn { width: 46px; height: 46px; }
}
@media (max-width: 480px) {
  .page-hero h1 { font-size: 22px; }
  .content-card { padding: 18px 14px; }
  .content-card h2 { font-size: 19px; }
  .content-card p, .content-card li { font-size: 14px; }
}
/* ===== 13. 文章详情页样式（普法课堂/法律资讯等）===== */
/* 文章容器 - 限制宽度居中 */
.article-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 文章头部 */
.article-header {
  margin-bottom: 30px;
}
.article-header h1 {
  font-size: 26px;
  color: var(--blue);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* 文章元信息 */
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #999;
  flex-wrap: wrap;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 文章标签 */
.article-tag, .pufa-tag {
  display: inline-block;
  background: #e8f0fe;
  color: #0a2463;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 4px;
  margin-right: 8px;
  margin-bottom: 12px;
}

/* 文章主体卡片 */
.article-body {
  background: #fff;
  border-radius: 8px;
  padding: 36px 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.article-body p {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 20px;
  color: #444;
  text-indent: 2em;
}
.article-body h2 {
  font-size: 20px;
  color: var(--blue);
  margin: 30px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--gold);
  text-indent: 0;
}
.article-body h3 {
  font-size: 17px;
  color: var(--blue);
  margin: 24px 0 12px;
  text-indent: 0;
}
.article-body blockquote {
  background: #f8f4eb;
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}
.article-body blockquote p {
  text-indent: 0;
  margin-bottom: 8px;
  color: #5a4a2a;
  font-size: 15px;
}
.article-body ul, .article-body ol {
  margin: 12px 0 20px 2em;
  color: #444;
}
.article-body li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.8;
}

/* 作者简介区 */
.author-bio {
  margin-top: 40px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #f8f4eb 0%, #fef9ef 100%);
  border-radius: 8px;
  border-left: 4px solid #d4af37;
}
.author-bio-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.author-photo {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}
.author-info { flex: 1; }
.author-name {
  font-size: 16px;
  font-weight: bold;
  color: #0a2463;
  margin-bottom: 6px;
}
.author-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}
.author-phone {
  color: #0a2463;
  font-weight: bold;
  text-decoration: none;
}

/* 咨询引导条 */
.consult-bar {
  margin-top: 30px;
  background: linear-gradient(135deg, #0a2463, #1a3a7a);
  border-radius: 8px;
  padding: 24px 30px;
  color: #fff;
}
.consult-bar h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--gold);
}
.consult-bar p {
  font-size: 15px;
  color: #ddd;
  text-indent: 0;
  margin-bottom: 8px;
}
.consult-bar .phone {
  font-size: 22px;
  font-weight: bold;
  color: var(--gold);
  text-indent: 0;
}

/* 底部联系栏 */
.contact-bar {
  margin-top: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 24px 28px;
  border: 1px solid #e8e8e8;
}
.contact-bar h4 {
  font-size: 16px;
  color: var(--blue);
  margin-bottom: 12px;
}
.contact-bar .contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: #666;
}
.contact-bar .contact-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 导航回列表页 */
.back-to-list {
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
}
.back-to-list a {
  color: var(--blue);
  text-decoration: none;
}
.back-to-list a:hover {
  color: var(--gold);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .article-container {
    margin: 20px auto;
    padding: 0 12px;
  }
  .article-body {
    padding: 24px 20px;
  }
  .article-header h1 {
    font-size: 22px;
  }
  .article-meta {
    flex-direction: column;
    gap: 8px;
  }
}
/* AI 悬浮按钮样式 */
.ai-float {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 999;
}
.ai-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(102, 126, 234, 0.6);
}
.ai-icon {
  width: 26px;
  height: 26px;
  color: #fff;
}
.ai-icon svg {
  width: 100%;
  height: 100%;
}
.ai-tooltip {
  display: none;
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.ai-float:hover .ai-tooltip {
  display: block;
}

/* 响应式 */
@media (max-width: 768px) {
  .ai-float {
    right: 12px;
    bottom: 80px;
    width: 46px;
    height: 46px;
  }
  .ai-icon {
    width: 22px;
    height: 22px;
  }
  .ai-tooltip {
    display: none !important;
  }
}


/* ===== 最新文章区块 ===== */
.latest-articles-section {
  padding: 50px 40px;
  background: #f8f9fa;
}
.latest-articles-section .section-header {
  text-align: center;
  margin-bottom: 40px;
}
.latest-articles-section .section-header h2 {
  font-size: 26px;
  color: #0a2463;
  margin-bottom: 8px;
}
.latest-articles-section .section-header p {
  font-size: 15px;
  color: #666;
  margin-bottom: 10px;
}
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.latest-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(10,36,99,0.12);
}
.latest-card-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
  font-weight: 600;
}
.latest-card-title {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
  font-weight: 500;
}
.latest-card-date {
  font-size: 13px;
  color: #999;
}
.latest-section-footer {
  text-align: center;
  margin-top: 36px;
}
.latest-section-footer a {
  display: inline-block;
  padding: 10px 28px;
  background: #0a2463;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s;
}
.latest-section-footer a:hover {
  background: #C9A96E;
}

/* 标签颜色 */
.tag-corporate { background: #e8f0fe; color: #1a73e8; }
.tag-criminal { background: #fce8e6; color: #d93025; }
.tag-labor { background: #e6f4ea; color: #188038; }
.tag-civil { background: #fef7e0; color: #e37400; }

/* 移动端：文章正文、H2、列表行高调整 */
@media (max-width: 768px) {
  article .blog-article p, article .blog-article li {
    font-size: 16px !important;
  }
  article .blog-article h2 {
    font-size: 21px !important;
  }
  article .blog-article li {
    line-height: 1.85 !important;
  }
  .latest-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 上下篇导航 ===== */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 40px auto;
  max-width: 800px;
}
.article-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.article-nav a:hover {
  background: #eef0f3;
}
.article-nav-prev { align-items: flex-start; }
.article-nav-next { align-items: flex-end; }
.article-nav-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}
.article-nav-title {
  font-size: 15px;
  color: #0a2463;
  font-weight: 500;
  line-height: 1.4;
}
.article-nav-placeholder {
  flex: 1;
}
@media (max-width: 600px) {
  .article-nav { flex-direction: column; }
  .article-nav-next { align-items: flex-start; }
}


/* ===== 最新文章区块 交互增强 ===== */
.latest-card {
  cursor: pointer;
}
.latest-card.expanded {
  border-left: 3px solid #0a2463;
  box-shadow: 0 4px 16px rgba(10,36,99,0.15);
}
.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(10,36,99,0.12);
}
.latest-card-readmore:hover {
  text-decoration: underline !important;
}
.latest-section-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
