:root {
  --primary: #0B318F;
  --primary-deep: #08256B;
  --primary-light: #2E5BC7;
  --accent: #F5A623;
  --bg: #F4F6FB;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #5A6473;
  --line: #E3E8F2;
  --sidebar-w: 300px;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(11, 49, 143, 0.07);
  --shadow-lg: 0 16px 40px rgba(11, 49, 143, 0.14);
  --c: var(--primary);
  --cbg: #EEF2FF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
}

/* ---------- 左侧导航栏 ---------- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0046FC 0%, #0046FC 150px, #0B318F 45%, #08256B 100%);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-logo {
  padding: 24px 12px 14px;
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: #0046FC;
  border-radius: 10px;
  padding: 14px 0 14px 16px;
}

.logo-en {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-sep {
  width: 2px;
  height: 28px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
}

.logo-zh {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 14px 20px;
  display: flex;
  flex-direction: column;
}

.nav-cats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.18s, color 0.18s;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #fff;
}

.nav-item svg { flex-shrink: 0; width: 18px; height: 18px; color: #9DB8FF; }

.nav-item.active svg { color: #fff; }

.nav-sep {
  margin: 16px 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---------- 主内容区 ---------- */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.content { padding: 0; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, rgba(8, 37, 107, 0.92) 0%, rgba(11, 49, 143, 0.78) 55%, rgba(46, 91, 199, 0.62) 100%), url("../assets/hero-bg.png") center/cover no-repeat;
  color: #fff;
  padding: 64px 48px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 320px at 88% 18%, rgba(245, 166, 35, 0.2), transparent 62%),
    radial-gradient(520px 280px at 72% 92%, rgba(46, 91, 199, 0.55), transparent 65%),
    radial-gradient(420px 240px at 12% 88%, rgba(255, 255, 255, 0.09), transparent 60%);
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.hero .hero-slogan {
  font-size: 21px;
  font-weight: 600;
  color: #FFE9C2;
  margin-bottom: 10px;
}

.hero .hero-sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}

.btn-gold { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(245, 166, 35, 0.4); }
.btn-gold:hover { background: #E0910E; transform: translateY(-2px); }

.btn-outline { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.7); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }

/* ---------- 统计条 ---------- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  margin: -34px 48px 0;
  border-radius: var(--radius);
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.stat {
  flex: 1 1 120px;
  text-align: center;
  padding: 20px 10px;
  min-width: 120px;
}

.stat + .stat { border-left: 1px solid var(--line); }

.stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label { font-size: 13px; color: var(--text-2); }

/* ---------- 通用区块 ---------- */
.section { padding: 52px 48px; max-width: 1180px; margin: 0 auto; }

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 10px;
}

.section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary-light);
  margin: 12px auto 0;
}

.section-desc {
  text-align: center;
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ---------- 公司简介 ---------- */
.intro-wrap { max-width: 880px; margin: 0 auto; }

.intro-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  border-left: 4px solid var(--primary);
}

.intro-card p { margin-bottom: 14px; color: #333; }
.intro-card p:last-child { margin-bottom: 0; }

/* ---------- 了解更多（三按钮面板） ---------- */
.panel-tabs {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.panel-tab {
  padding: 12px 30px;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}

.panel-tab:hover { background: #EEF2FF; }

.panel-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 49, 143, 0.3);
}

/* 保障卡片 */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.guarantee-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
}

.guarantee-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.guarantee-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.guarantee-card h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.guarantee-card p { font-size: 14px; color: var(--text-2); text-align: left; }

/* 服务流程 */
.process-list { max-width: 780px; margin: 0 auto; }

.process-item {
  display: flex;
  gap: 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 14px;
}

.process-num {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-item h3 { font-size: 16px; color: var(--primary); margin-bottom: 4px; }
.process-item p { font-size: 14px; color: var(--text-2); }

/* 师资卡片 */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.teacher-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.teacher-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }

.teacher-avatar {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.teacher-name { font-size: 17px; font-weight: 700; color: var(--text); }
.teacher-title { font-size: 13px; color: var(--text-2); line-height: 1.5; }

.teacher-field { margin-bottom: 8px; }
.teacher-field .label { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 2px; }
.teacher-field .text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.teacher-more {
  margin-top: 10px;
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
}

/* ---------- 产品服务 ---------- */
.page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  padding: 26px 48px 22px;
  border-bottom: 1px solid var(--line);
}

.page-head .head-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--c, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-head .head-icon svg { width: 24px; height: 24px; }

.page-head .head-text { min-width: 0; }

.page-head h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.page-head .head-desc { color: var(--text-2); font-size: 14px; margin-top: 2px; }

.page-head .head-text::after {
  content: "";
  display: block;
  width: 44px; height: 4px;
  border-radius: 2px;
  background: var(--c, var(--accent));
  margin-top: 8px;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.branch-grid[data-cols="1"] { grid-template-columns: 1fr; }
.branch-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.branch-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.branch-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

.branch-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.branch-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c, var(--primary-light));
}

.branch-card.active {
  border-color: var(--c, var(--primary-light));
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.branch-card.has-illu { padding: 0; overflow: hidden; }

.branch-card.has-illu .branch-banner {
  aspect-ratio: 3 / 2;
  background: var(--cbg, #EEF2FF);
}

.branch-card.has-illu .branch-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branch-card.has-illu .branch-body { padding: 16px 20px 18px; }

/* 单分支类目：横版大卡片 */
.branch-grid[data-cols="1"] .branch-card.has-illu {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 250px;
}

.branch-grid[data-cols="1"] .branch-banner { flex: 0 0 40%; }

.branch-grid[data-cols="1"] .branch-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 30px;
}

.branch-grid[data-cols="1"] .branch-enter {
  width: auto;
  align-self: flex-start;
  padding: 9px 26px;
}

.branch-head { display: flex; align-items: center; gap: 12px; }

.branch-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cbg, #EEF2FF);
  color: var(--c, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.branch-card.active .branch-icon { background: var(--c, var(--primary)); color: #fff; }

.branch-card .branch-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.branch-card .branch-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.branch-enter {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 0;
  border-radius: 999px;
  background: var(--cbg, #EEF2FF);
  color: var(--c, var(--primary));
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}

.branch-enter svg { transition: transform 0.18s; }

.branch-card:hover .branch-enter,
.branch-card.active .branch-enter {
  background: var(--c, var(--primary));
  color: #fff;
}

.branch-card:hover .branch-enter svg { transform: translateX(3px); }

.branch-detail {
  display: none;
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 960px;
  margin-top: 10px;
}

.branch-card.active + .branch-detail { display: block; animation: fadeSlide 0.25s ease; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* 细则详情（手风琴展开内容） */
.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--c, var(--line));
}

.detail-block {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin-bottom: 18px;
}

.detail-block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 12px;
}

.detail-block h3 .block-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--cbg, #EEF2FF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c, var(--primary));
  flex-shrink: 0;
}

.detail-block p { font-size: 14.5px; color: #333; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; margin: 0 auto; }

.faq-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}

.faq-q .q-badge {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-q .q-text { flex: 1; }

.faq-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-2);
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a-inner {
  padding: 0 24px 20px 68px;
  font-size: 14.5px;
  color: var(--text-2);
}

.faq-item.open .faq-a { max-height: 400px; }

/* ---------- 浮动联系我们 ---------- */
.contact-float {
  position: fixed;
  right: 26px;
  top: 62%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 32px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.5);
  transition: transform 0.18s;
  animation: contactPulse 2.6s ease-out infinite;
}

@keyframes contactPulse {
  0% { box-shadow: 0 10px 30px rgba(245, 166, 35, 0.5), 0 0 0 0 rgba(245, 166, 35, 0.45); }
  70% { box-shadow: 0 10px 30px rgba(245, 166, 35, 0.5), 0 0 0 16px rgba(245, 166, 35, 0); }
  100% { box-shadow: 0 10px 30px rgba(245, 166, 35, 0.5), 0 0 0 0 rgba(245, 166, 35, 0); }
}

.contact-float:hover { transform: translateY(-50%) scale(1.07); }

@media (prefers-reduced-motion: reduce) {
  .contact-float { animation: none; }
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 25, 60, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-mask[hidden] { display: none; }

.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 86vh;
  overflow-y: auto;
  animation: pop 0.22s ease;
}

@keyframes pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.contact-card { text-align: center; }

.contact-card h3 { font-size: 22px; color: var(--primary); margin-bottom: 8px; }
.contact-text { color: var(--text-2); font-size: 14.5px; margin-bottom: 18px; }
.contact-qr { width: 220px; height: 220px; border-radius: 12px; }

.teacher-card-detail .teacher-head { margin-bottom: 16px; }
.teacher-card-detail .teacher-field .text {
  -webkit-line-clamp: unset;
  overflow: visible;
  display: block;
}

/* ---------- 滚动渐入 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- 区块底色：标题区分类色渐变带 ---------- */
.page-section {
  background: linear-gradient(180deg, var(--cbg, #EEF2FF) 0%, #fff 320px);
}

/* ---------- 移动端 ---------- */
.hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 120;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: var(--shadow);
}

.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
}

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 25, 60, 0.5);
  z-index: 99;
}

@media (max-width: 960px) {
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .backdrop.show { display: block; }
  .main { margin-left: 0; padding-top: 56px; }
  .hero { padding: 44px 24px; min-height: 360px; }
  .hero h1 { font-size: 28px; }
  .hero .hero-slogan { font-size: 17px; }
  .section { padding: 36px 20px; }
  .stats-bar { margin: -30px 20px 0; }
  .stat { padding: 14px 6px; min-width: 100px; }
  .stat-num { font-size: 24px; }
  .page-head { padding: 18px 20px 16px; gap: 12px; }
  .page-head h2 { font-size: 20px; }
  .page-head .head-icon { width: 40px; height: 40px; border-radius: 12px; }
  .page-head .head-icon svg { width: 20px; height: 20px; }
  .branch-card { padding: 15px 16px; }
  .branch-icon { width: 40px; height: 40px; }
  .branch-grid[data-cols] { grid-template-columns: 1fr; }
  .branch-grid[data-cols="1"] .branch-card.has-illu { flex-direction: column; min-height: 0; }
  .branch-grid[data-cols="1"] .branch-banner { flex: none; }
  .branch-grid[data-cols="1"] .branch-body { padding: 15px 16px; }
  .faq-a-inner { padding: 0 20px 16px 20px; }
  .contact-float { right: 12px; top: 80%; padding: 13px 20px; font-size: 15px; gap: 7px; }
  .intro-card { padding: 26px 22px; }
}

@media (min-width: 961px) and (max-width: 1280px) {
  .section { padding: 44px 32px; }
  .hero { padding: 52px 36px; }
  .stats-bar { margin-left: 32px; margin-right: 32px; }
  .page-head { padding: 22px 32px 18px; }
  .branch-grid[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
}
