/* 修远律所管理系统官网 - 主样式 */
:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0f2744;
  --accent: #3182ce;
  --accent-hover: #2b6cb0;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius: 8px;
  --header-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(26,54,93,.97);
  box-shadow: var(--shadow);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo-area { display: flex; align-items: center; gap: 12px; color: var(--white); }
.logo-area img {
  height: 44px; width: 44px; object-fit: contain;
  background: transparent; flex-shrink: 0;
}
.logo-text h1 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.logo-text span { font-size: 12px; opacity: .85; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255,255,255,.9); padding: 8px 14px; border-radius: 6px;
  font-size: 15px; transition: all .2s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--white); background: rgba(255,255,255,.15);
}
.btn-consult {
  background: var(--accent); color: var(--white) !important;
  padding: 10px 22px !important; border-radius: 6px; font-weight: 600;
  margin-left: 12px; border: none; cursor: pointer;
}
.btn-consult:hover { background: var(--accent-hover); color: var(--white) !important; }

.menu-toggle {
  display: none; background: none; border: none; color: var(--white);
  font-size: 28px; cursor: pointer; padding: 4px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white); padding: calc(var(--header-h) + 80px) 0 100px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; z-index: 1; }
.hero h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 700; margin-bottom: 20px; line-height: 1.3; }
.hero p { font-size: clamp(16px, 2.5vw, 20px); opacity: .9; max-width: 700px; margin: 0 auto 36px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 6px;
  font-size: 16px; font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: all .2s; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn-secondary { background: var(--gray-100); color: var(--primary); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }

/* Sections */
.section { padding: 80px 0; }
.section-gray { background: var(--gray-50); }
.section-title { text-align: center; margin-bottom: 16px; }
.section-title h2 { font-size: clamp(24px, 4vw, 36px); color: var(--primary); font-weight: 700; }
.section-title p { color: var(--gray-600); font-size: 17px; max-width: 600px; margin: 12px auto 0; }
.section-subtitle { color: var(--accent); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 48px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px 24px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--gray-100);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 40px; margin-bottom: 16px; }
.card-icon.f-icon {
  width: 48px;
  height: 48px;
  color: #2b6cb0;
  font-size: inherit;
}
.card-icon.f-icon svg { width: 100%; height: 100%; display: block; }
.card h3 { font-size: 20px; color: var(--primary); margin-bottom: 10px; }
.card p { color: var(--gray-600); font-size: 15px; }

/* Feature cards with link */
.feature-card { cursor: pointer; }
.feature-card a {
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.feature-card .card-icon.f-icon { margin-left: auto; margin-right: auto; }

/* Solution cards */
.solution-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-top: 48px; }
.solution-card {
  background: var(--white); border-radius: var(--radius); padding: 36px 28px;
  border: 2px solid var(--gray-200); transition: border-color .2s;
}
.solution-card:hover { border-color: var(--accent); }
.solution-card h3 { font-size: 22px; color: var(--primary); margin-bottom: 12px; }
.solution-card .tag { display: inline-block; background: var(--gray-100); color: var(--primary-light); padding: 4px 12px; border-radius: 20px; font-size: 13px; margin-bottom: 16px; }
.solution-card ul { margin: 16px 0; }
.solution-card li { padding: 6px 0; color: var(--gray-700); font-size: 15px; }
.solution-card li::before { content: '✓ '; color: var(--accent); font-weight: bold; }

/* Table */
.table-wrap { overflow-x: auto; margin-top: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); min-width: 700px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.data-table th { background: var(--primary); color: var(--white); font-weight: 600; }
.data-table tr:hover td { background: var(--gray-50); }
.data-table .highlight { background: rgba(49,130,206,.08); font-weight: 600; color: var(--primary); }

/* Page header */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white); padding: calc(var(--header-h) + 60px) 0 60px; text-align: center;
}
.page-header h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.page-header p { opacity: .9; font-size: 17px; max-width: 640px; margin: 0 auto; }
.page-header p.page-header-oneline {
  max-width: 1100px;
  white-space: nowrap;
  font-size: 17px;
  letter-spacing: 0.02em;
}

/* Function page module grid (matches product shot: 4x2 cards) */
.function-module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.function-module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  padding: 36px 20px 28px;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.function-module-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.function-module-card .f-icon {
  width: 56px;
  height: 56px;
  color: #2b6cb0;
  margin-bottom: 18px;
}
.function-module-card .f-icon svg { width: 100%; height: 100%; display: block; }
.function-module-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 10px;
}
.function-module-card p {
  margin: 0;
  font-size: 14px;
  color: #718096;
  line-height: 1.5;
}
/* Function page sidebar (left-right detail layout) */
.function-layout { display: flex; gap: 40px; padding: 0 0 60px; }
.function-sidebar {
  width: 200px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 20px);
  align-self: flex-start;
}
.function-sidebar a {
  display: block; padding: 10px 16px; color: var(--gray-700); border-left: 3px solid transparent;
  font-size: 15px; margin-bottom: 4px; transition: all .2s;
}
.function-sidebar a:hover, .function-sidebar a.active {
  color: var(--accent); border-left-color: var(--accent); background: var(--gray-50);
}
.function-content { flex: 1; min-width: 0; }
.module-block {
  padding: 40px 0; border-bottom: 1px solid var(--gray-200);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.module-block:last-child { border-bottom: none; }
.module-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.module-title .module-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  color: #2b6cb0;
  flex: 0 0 auto;
  margin: 0;
}
.module-title .module-icon svg { width: 100%; height: 100%; display: block; }
.module-block h2 {
  display: inline-block;
  font-size: 26px;
  color: var(--primary);
  margin: 0;
  flex: 0 1 auto;
  line-height: 1.2;
}
.module-block .value { color: var(--accent); font-size: 16px; margin-bottom: 20px; font-weight: 500; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.feature-tags span {
  background: var(--gray-100); color: var(--primary-light);
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
}
.module-block p.desc { color: var(--gray-600); line-height: 1.8; }

/* Contact form */
.contact-layout { display: grid; grid-template-columns: 1fr 360px; gap: 48px; padding: 60px 0; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--gray-700); }
.form-group label .req { color: #e53e3e; }
.form-control {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gray-300);
  border-radius: 6px; font-size: 15px; transition: border-color .2s;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49,130,206,.15); }
.form-control.error { border-color: #e53e3e; }
.error-msg { color: #e53e3e; font-size: 13px; margin-top: 4px; }
textarea.form-control { min-height: 120px; resize: vertical; }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row img { height: 44px; border-radius: 4px; cursor: pointer; border: 1px solid var(--gray-200); }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-note { font-size: 13px; color: var(--gray-600); margin-top: 16px; }

.contact-info { background: var(--gray-50); border-radius: var(--radius); padding: 32px; }
.contact-info h3 { color: var(--primary); margin-bottom: 24px; font-size: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-start; }
.contact-item .icon { font-size: 20px; width: 32px; text-align: center; }
.contact-item strong { display: block; color: var(--gray-800); margin-bottom: 2px; }
.contact-item span { color: var(--gray-600); font-size: 15px; }
.qrcode { text-align: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--gray-200); }
.qrcode img { width: 160px; height: 160px; object-fit: contain; margin-bottom: 8px; }
.qrcode-inline { margin-top: 8px; }
.qrcode-inline img {
  width: 140px; height: 140px; object-fit: contain; display: block;
  border-radius: 8px; background: #fff; padding: 6px;
  border: 1px solid var(--gray-200);
}
.qrcode-inline p { margin-top: 8px; color: var(--gray-500); font-size: 13px; }
.footer-qrcode { margin-top: 10px; }
.footer-qrcode img {
  width: 96px; height: 96px; object-fit: contain; display: block;
  border-radius: 6px; background: #fff; padding: 4px;
}
.footer-qrcode span { display: block; margin-top: 6px; color: rgba(255,255,255,.7); font-size: 13px; }

/* Footer */
.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,.8); padding: 60px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { color: var(--white); font-size: 20px; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.8; }
.footer-col h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,.7); padding: 4px 0; font-size: 14px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  text-align: center; font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* Float consult */
.float-consult {
  position: fixed; right: 24px; bottom: 32px; z-index: 999;
  background: var(--accent); color: var(--white);
  padding: 14px 22px; border-radius: 50px; font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-lg); cursor: pointer; border: none;
  transition: transform .2s, background .2s;
}
.float-consult:hover { transform: scale(1.05); background: var(--accent-hover); }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5); align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; position: relative; animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--gray-200);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 18px; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-600); line-height: 1; }
.modal-body { padding: 24px; }
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3000;
  padding: 14px 28px; border-radius: 6px; color: var(--white); font-size: 15px;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.success { background: #38a169; }
.toast.error { background: #e53e3e; }

/* TCO & tips */
.info-box {
  background: var(--gray-50); border-left: 4px solid var(--accent);
  padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0;
}
.info-box h4 { color: var(--primary); margin-bottom: 8px; }
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.tip-card { background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.tip-card h4 { color: var(--primary); margin-bottom: 12px; }
.tip-card ul li { padding: 4px 0; color: var(--gray-700); font-size: 15px; }

.motto { text-align: center; font-size: 22px; color: var(--primary); font-weight: 600; letter-spacing: 4px; padding: 40px 0; }

/* About */
.about-content { max-width: 800px; margin: 0 auto; padding: 60px 0; }
.about-block { margin-bottom: 40px; }
.about-block h2 { font-size: 24px; color: var(--primary); margin-bottom: 16px; }
.about-block p { color: var(--gray-700); line-height: 1.9; font-size: 16px; margin-bottom: 12px; }

/* 404 */
.error-page { text-align: center; padding: 120px 20px; }
.error-page h1 { font-size: 80px; color: var(--primary); }
.error-page p { font-size: 18px; color: var(--gray-600); margin: 16px 0 32px; }

/* Responsive */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .function-module-grid { grid-template-columns: repeat(2, 1fr); }
  .function-layout { flex-direction: column; }
  .function-sidebar { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .function-sidebar a { border-left: none; border-bottom: 2px solid transparent; padding: 8px 12px; }
  .tips-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--primary); flex-direction: column; padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; text-align: center; padding: 12px; }
  .menu-toggle { display: block; }
  .hero { padding-bottom: 60px; }
  .section { padding: 50px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .function-module-grid { grid-template-columns: 1fr; }
  .page-header p.page-header-oneline {
    white-space: normal;
    padding: 0 12px;
  }
  .float-consult { right: 16px; bottom: 20px; padding: 12px 18px; font-size: 14px; }
}
