/* 仟法咨询官网 - 统一样式 v2 */
:root {
  --red: #c0392b;
  --red-dark: #922b21;
  --navy: #1f2d3d;
  --navy-light: #34495e;
  --bg: #f5f6f8;
  --text: #2c3e50;
  --muted: #8a94a6;
  --line: #e8eaed;
  --white: #ffffff;
  --dark: #17202b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部信息栏 ===== */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  font-size: 12px;
  padding: 5px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar .links { display: flex; align-items: center; }
.top-bar .links a { color: rgba(255,255,255,.65); margin-left: 18px; }
.top-bar .links a:hover { color: #fff; }

/* ===== 导航 ===== */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 100;
}
.nav .container {
  display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand-text h1 {
  font-size: 21px; color: var(--navy); font-weight: 700; letter-spacing: 3px;
  font-family: "STSong", "SimSun", serif;
}
.brand-text p { font-size: 10px; color: var(--muted); letter-spacing: 3px; margin-top: 1px; }

.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 16px; font-size: 14px; color: #444; border-radius: 3px;
  transition: all .2s; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); background: rgba(192,57,43,.05); }

.nav-phone {
  display: flex; align-items: center; gap: 6px;
  background: var(--red); color: #fff;
  padding: 8px 20px; border-radius: 3px;
  font-weight: 600; font-size: 14px; transition: all .2s;
}
.nav-phone:hover { background: var(--red-dark); }

/* ===== Hero区（紧凑左右布局） ===== */
.hero {
  background: linear-gradient(rgba(31,45,61,.88), rgba(31,45,61,.92)),
    url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?w=1600&q=80') center/cover;
  color: #fff; padding: 70px 0;
}
.hero .container {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.hero-title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.hero-logo { width: 52px; height: 52px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.3); flex-shrink: 0; }
.hero-left h2 {
  font-size: 42px; font-weight: 700; letter-spacing: 8px; margin-bottom: 0;
  font-family: "STSong", "SimSun", serif;
}
.hero-left .slogan {
  font-size: 17px; color: rgba(255,255,255,.85); letter-spacing: 6px; margin-bottom: 18px;
}
.hero-left .desc {
  font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.8; margin-bottom: 26px;
}
.hero-btns { display: flex; gap: 12px; }
.btn {
  display: inline-block; padding: 11px 28px; border-radius: 3px;
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all .2s; letter-spacing: 1px;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Hero右侧数据卡片 */
.hero-right { display: flex; flex-direction: column; gap: 12px; }
.hero-stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(10px);
}
.hero-stat b { font-size: 26px; color: #fff; }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,.7); text-align: right; }

/* ===== 通用区块 ===== */
section { padding: 48px 0; }
.sec-head { text-align: center; margin-bottom: 32px; }
.sec-head h2 {
  font-size: 24px; color: var(--navy); font-weight: 700;
  font-family: "STSong", "SimSun", serif;
}
.sec-head h2::after {
  content: ''; display: block; width: 40px; height: 2px;
  background: var(--red); margin: 10px auto 0;
}
.sec-head .sub { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ===== 业务领域 ===== */
.svc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.svc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 5px;
  padding: 20px 14px; text-align: center; transition: all .3s; cursor: pointer;
}
.svc-card:hover {
  border-color: var(--red); box-shadow: 0 6px 18px rgba(192,57,43,.1); transform: translateY(-3px);
}
.svc-card .ico {
  width: 46px; height: 46px; background: rgba(192,57,43,.07); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; font-size: 21px;
}
.svc-card h3 { font-size: 14px; color: var(--navy); margin-bottom: 4px; }
.svc-card p { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ===== 服务流程（浅色图文） ===== */
.flow-section { background: #fff; }
.flow-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.flow-step {
  text-align: center; padding: 24px 16px;
  background: var(--bg); border-radius: 6px; border: 1px solid var(--line);
  position: relative; transition: all .3s;
}
.flow-step:hover { border-color: var(--red); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.flow-step .num {
  width: 48px; height: 48px; background: var(--red); color: #fff;
  border-radius: 50%; line-height: 48px; font-size: 20px; font-weight: 700;
  margin: 0 auto 12px;
}
.flow-step h4 { font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.flow-step p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.flow-step .arrow {
  position: absolute; right: -16px; top: 50%; transform: translateY(-50%);
  color: var(--red); font-size: 20px; z-index: 1;
}
.flow-step:last-child .arrow { display: none; }

/* ===== 文书模板入口 ===== */
.tpl-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 8px; padding: 32px 36px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: center;
}
.tpl-hero h3 { font-size: 22px; color: #fff; margin-bottom: 10px; font-family: "STSong", serif; }
.tpl-hero p { color: rgba(255,255,255,.7); font-size: 13px; margin-bottom: 18px; line-height: 1.7; }
.tpl-stats { display: flex; gap: 24px; }
.tpl-stat { text-align: center; }
.tpl-stat b { font-size: 28px; color: #fff; display: block; }
.tpl-stat span { font-size: 11px; color: rgba(255,255,255,.6); }

/* ===== 评价区 ===== */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review-card {
  background: #fff; border-radius: 5px; padding: 20px;
  border: 1px solid var(--line); border-left: 3px solid var(--red);
}
.review-card .stars { color: #f39c12; font-size: 13px; margin-bottom: 8px; }
.review-card p { font-size: 13px; color: #444; margin-bottom: 10px; line-height: 1.7; }
.review-card .meta { font-size: 11px; color: var(--muted); }
.review-actions { text-align: center; margin-top: 24px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.complaint-btn { color: #e67e22 !important; border-color: #e67e22 !important; }
.complaint-btn:hover { background: #e67e22 !important; color: #fff !important; }

/* ===== 联系区（暗色，与抬头呼应，含二维码） ===== */
.contact-section {
  background: linear-gradient(160deg, var(--navy) 0%, #17202b 100%);
  border-top: 3px solid var(--red);
}
.contact-section .sec-head h2 { color: #fff; }
.contact-section .sec-head .sub { color: rgba(255,255,255,.55); }
.contact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.contact-item {
  text-align: center; padding: 24px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px;
  transition: all .25s;
}
.contact-item:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.25); }
.contact-item .ico { font-size: 26px; margin-bottom: 10px; }
.contact-item h4 { font-size: 14px; color: #fff; margin-bottom: 8px; font-weight: 600; }
.contact-item p { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.7; }
.contact-item .phone-big {
  font-size: 21px; font-weight: 700; color: #fff; margin: 6px 0; letter-spacing: 1px;
  font-family: "Consolas", "Microsoft YaHei", monospace;
}
.contact-item .phone-emergency {
  font-size: 13px; color: #f5b041; font-weight: 600; margin-bottom: 4px;
}
.contact-item .phone-emergency a { color: #f5b041; }
.contact-item .phone-hours { font-size: 11px; color: rgba(255,255,255,.5); }
/* 微信卡片：文字在左，二维码在右 */
.contact-item.wechat-card { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 12px; }
.contact-item.wechat-card .wechat-text { flex: 1; }
.contact-item.wechat-card .wechat-text h4 { margin-bottom: 6px; }
.contact-item.wechat-card .wechat-text p { font-size: 12px; }
.contact-item.wechat-card img {
  width: 96px; height: 96px; display: block; border-radius: 4px;
  border: 2px solid #fff; flex-shrink: 0;
}
.contact-item .qr-tip { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 6px; }

/* ===== 页脚 ===== */
footer {
  background: var(--navy); color: rgba(255,255,255,.5);
  padding: 24px 0; text-align: center; font-size: 12px; line-height: 1.9;
}
footer .disclaimer { font-size: 11px; opacity: .7; margin-top: 6px; }

/* ===== 模板库页面 ===== */
.page-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; padding: 32px 0;
}
.page-banner h2 { font-size: 22px; margin-bottom: 6px; font-family: "STSong", serif; }
.page-banner p { font-size: 12px; opacity: .7; }

.tpl-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; margin-top: 20px; }
.tpl-sidebar {
  background: #fff; border: 1px solid var(--line); border-radius: 5px;
  padding: 14px; max-height: 65vh; overflow-y: auto;
}
.tpl-sidebar h3 {
  font-size: 14px; color: var(--navy); padding-bottom: 10px;
  border-bottom: 2px solid var(--red); margin-bottom: 10px;
}
.cat-item {
  padding: 8px 10px; cursor: pointer; border-radius: 3px;
  font-size: 13px; display: flex; justify-content: space-between; transition: all .15s;
}
.cat-item:hover, .cat-item.active { background: rgba(192,57,43,.07); color: var(--red); }
.cat-item .count { color: var(--muted); font-size: 11px; }

.tpl-main { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 16px; }
.tpl-search { display: flex; gap: 10px; margin-bottom: 16px; }
.tpl-search input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 13px;
}
.tpl-search input:focus { outline: none; border-color: var(--red); }
.tpl-search button {
  padding: 10px 28px; background: var(--red); color: #fff;
  border: none; border-radius: 3px; cursor: pointer; font-size: 13px;
}
.tpl-notice { background: #fff8e6; border-bottom: 1px solid #f0e0b0; padding: 10px 0; }
.tpl-notice span { font-size: 12px; color: #8a6d3b; line-height: 1.6; }
.tpl-tip { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; padding: 10px 14px; background: #f7f8fa; border-radius: 6px; border-left: 3px solid var(--red); }
.tpl-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border-radius: 3px; overflow: hidden; }
.tpl-item {
  background: #fff; padding: 13px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.tpl-item:hover { background: #fafafa; }
.tpl-item .info h4 { font-size: 14px; color: var(--navy); margin-bottom: 2px; }
.tpl-item .info p { font-size: 11px; color: var(--muted); }
.tpl-item .meta { display: flex; align-items: center; gap: 14px; }
.tpl-item .downloads { font-size: 11px; color: var(--muted); }
.dl-btn {
  padding: 5px 16px; background: var(--red); color: #fff;
  border-radius: 3px; font-size: 12px; cursor: pointer; border: none;
}
.dl-btn:hover { background: var(--red-dark); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.pagination button {
  padding: 5px 12px; border: 1px solid var(--line); background: #fff;
  border-radius: 3px; cursor: pointer; font-size: 12px;
}
.pagination button.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== 表单 ===== */
.form-card {
  max-width: 460px; margin: 32px auto; background: #fff;
  border-radius: 6px; padding: 32px; box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
.form-card h2 { text-align: center; color: var(--navy); margin-bottom: 6px; font-family: "STSong", serif; }
.form-card .sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; color: #444; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 13px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 90px; }
.agree-box { margin-bottom: 18px; }
.agree-label { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #666; line-height: 1.6; cursor: pointer; }
.agree-label input { margin-top: 3px; flex-shrink: 0; }
.agree-label a { color: var(--red); text-decoration: none; }
.agree-label a:hover { text-decoration: underline; }
.modal-notice { font-size: 11px; color: #999; line-height: 1.6; margin: 0 0 14px; padding: 8px 12px; background: #f7f8fa; border-radius: 4px; border-left: 2px solid #e67e22; }
.form-submit {
  width: 100%; padding: 12px; background: var(--red); color: #fff;
  border: none; border-radius: 3px; font-size: 15px; cursor: pointer; font-weight: 600;
}
.form-submit:hover { background: var(--red-dark); }
.form-link { text-align: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.form-link a { color: var(--red); }

/* ===== 弹窗 ===== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 6px; padding: 28px;
  max-width: 420px; width: 90%; position: relative;
}
.modal h3 { color: var(--navy); margin-bottom: 16px; }
.modal-close { position: absolute; top: 10px; right: 14px; font-size: 22px; cursor: pointer; color: var(--muted); }

/* ===== 在线客服按钮 ===== */
.chat-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px; background: var(--red); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(192,57,43,.4); z-index: 99;
  transition: transform .2s;
}
.chat-float:hover { transform: scale(1.08); }

/* ===== 汉堡菜单 ===== */
.menu-toggle {
  display: none; background: none; border: none; font-size: 24px;
  color: var(--navy); cursor: pointer; padding: 6px 10px;
}
.lang-switch { display: flex; gap: 6px; margin-left: 14px; }
.lang-switch button {
  background: none; border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.7);
  padding: 3px 10px; border-radius: 3px; font-size: 12px; cursor: pointer; transition: all .2s;
}
.lang-switch button.active { background: var(--red); border-color: var(--red); color: #fff; }
.lang-switch button:hover { border-color: #fff; color: #fff; }

/* ===== 响应式 ===== */
@media(max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 10px 20px;
    border-bottom: 1px solid var(--line); box-shadow: 0 6px 16px rgba(0,0,0,.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid #f3f4f6; }
  .nav-links a:last-child { border-bottom: none; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-step .arrow { display: none; }
  .tpl-layout { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-left h2 { font-size: 32px; }
  .review-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-hero { grid-template-columns: 1fr; }
}
@media(max-width: 600px) {
  .brand-text p { display: none; }
  .nav .container { height: 56px; }
  .nav-phone { padding: 7px 12px; font-size: 12px; }
  .hero { padding: 44px 0; }
  .hero-left h2 { font-size: 26px; letter-spacing: 4px; }
  .hero-logo { width: 38px; height: 38px; }
  .hero-title-row { gap: 10px; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { text-align: center; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .svc-card { padding: 14px 8px; }
  .flow-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .tpl-hero { padding: 24px 20px; }
  .tpl-stats { gap: 16px; }
  .tpl-stat b { font-size: 22px; }
  .sec-head h2 { font-size: 20px; }
  section { padding: 36px 0; }
  .contact-item.wechat-card img { width: 84px; height: 84px; }
  .top-bar .links a { margin-left: 10px; }
}
