/* ========================================
   江苏常宜律师事务所 - 全局样式表
   聚焦：合同纠纷 | 借贷纠纷 | 债务纠纷
   ======================================== */

/* --- CSS变量 --- */
:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0f2440;
  --accent: #c9a227;
  --accent-light: #d4b43a;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #ffffff;
  --bg-light: #f7fafc;
  --bg-dark: #edf2f7;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --transition: all 0.3s ease;
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* --- 重置与基础 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}

/* --- 顶部信息栏 --- */
.top-bar {
  background: var(--primary-dark); color: #cbd5e0; font-size: 0.875rem;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-bar .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.top-bar a { color: #cbd5e0; }
.top-bar a:hover { color: var(--accent); }
.top-bar i { margin-right: 6px; color: var(--accent); }

/* --- 主导航 --- */
.site-header {
  background: var(--bg);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 1000;
}
.site-header .container {
  display: flex; justify-content: space-between; align-items: center; height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--primary); font-size: 1.25rem;
}
.logo-icon {
  width: 40px; height: 40px; background: var(--primary); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); font-size: 1.1rem;
}
.logo span { color: var(--accent); }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  position: relative; padding: 4px 0;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: var(--transition);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--primary); }

.header-cta {
  background: var(--accent); color: var(--primary-dark); padding: 10px 22px;
  border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}
.header-cta:hover { background: var(--accent-light); color: var(--primary-dark); transform: translateY(-1px); }

.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.mobile-menu-btn span {
  display: block; width: 24px; height: 2px; background: var(--primary); transition: var(--transition);
}

/* --- 面包屑 --- */
.breadcrumb {
  background: var(--bg-light); padding: 16px 0; font-size: 0.875rem; color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; color: var(--border); }
.breadcrumb strong { color: var(--text); font-weight: 500; }

/* --- 页脚 --- */
.site-footer {
  background: var(--primary-dark); color: #a0aec0; font-size: 0.9rem;
}
.footer-main { padding: 60px 0 30px; }
.footer-main .container {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { line-height: 1.8; color: #a0aec0; }
.footer-title {
  color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 20px;
  position: relative; padding-bottom: 10px;
}
.footer-title::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--accent);
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #a0aec0; }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact li {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px;
}
.footer-contact i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 0;
  text-align: center; font-size: 0.85rem; color: #718096;
}

/* --- 通用组件 --- */
.section { padding: 80px 0; }
.section-title {
  text-align: center; margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2rem; color: var(--primary); margin-bottom: 12px; position: relative; display: inline-block;
}
.section-title h2::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 3px; background: var(--accent); border-radius: 2px;
}
.section-title p {
  color: var(--text-light); font-size: 1rem; max-width: 600px; margin: 20px auto 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  transition: var(--transition); cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-accent { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }

.card {
  background: var(--bg); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }

.tag {
  display: inline-block; padding: 4px 12px; background: var(--bg-light);
  border: 1px solid var(--border); border-radius: 20px; font-size: 0.8rem; color: var(--text-light);
}

/* --- 回到顶部 --- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 44px; height: 44px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999;
  box-shadow: var(--shadow-lg);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); color: var(--primary-dark); transform: translateY(-3px); }

/* --- 在线客服浮动 --- */
.float-contact {
  position: fixed; right: 20px; bottom: 90px; z-index: 998;
  display: flex; flex-direction: column; gap: 12px;
}
.float-contact a {
  width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  box-shadow: var(--shadow-lg); transition: var(--transition);
}
.float-contact a:hover { background: var(--accent); color: var(--primary-dark); transform: scale(1.1); }
.float-contact .tel-btn { background: var(--accent); color: var(--primary-dark); }
.float-contact .tel-btn:hover { background: var(--primary); color: #fff; }

/* --- 页面横幅 --- */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 80px 0 70px; text-align: center;
}
.page-banner h1 { font-size: 2.25rem; margin-bottom: 12px; }
.page-banner p { font-size: 1.05rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }

/* --- 无障碍 --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* --- 动画 --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeInUp 0.8s ease forwards; }
