/* =============================================
   common.css — 李时真学术 · 四页共享样式
   ============================================= */

/* --- RESET & 变量 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #1256a3;
  --navy-light: #1b6bbf;
  --gold: #0891b2;
  --gold-light: #22b8d8;
  --cream: #edf6fd;
  --white: #ffffff;
  --text-dark: #0b1d33;
  --text-mid: #2c4a6a;
  --text-light: #5a7a96;
  --border: #b3d4ec;
  --section-bg: #e2f0fa;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

/* --- NAV --- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
}
.nav-logo {
  font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 700;
  color: var(--navy); letter-spacing: 2px; text-decoration: none;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-mid); font-size: 15px; transition: color 0.2s; letter-spacing: 1px; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a.disabled { color: var(--gold); pointer-events: none; cursor: default; }

/* 下拉菜单 */
.nav-links li { position: relative; }
.nav-links li.has-dropdown > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-links li.has-dropdown > a::after {
  content: ''; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.25s ease; opacity: 0.6;
}
.nav-links li.has-dropdown:hover > a::after { transform: rotate(225deg) translate(-1px, -1px); opacity: 1; }
/* 鼠标移动过渡桥 */
.nav-links li.has-dropdown::after {
  content: ''; position: absolute; top: 100%; left: 0; right: 0;
  height: 14px; pointer-events: none;
}
.nav-links li.has-dropdown:hover::after { pointer-events: auto; }

.dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: white; border-radius: 10px; padding: 5px;
  box-shadow:
    0 0 0 1px rgba(18,86,163,0.06),
    0 18px 48px -8px rgba(18,86,163,0.18),
    0 6px 16px -4px rgba(18,86,163,0.10);
  min-width: 175px; list-style: none;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 110;
}
.dropdown-menu::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px; background: white;
  transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(18,86,163,0.06);
}
.nav-links li.has-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown-menu li { display: block; }
.dropdown-menu li a {
  display: flex; align-items: baseline; gap: 6px; padding: 9px 16px;
  font-size: 14px; color: var(--text-mid); white-space: nowrap;
  border-radius: 6px; transition: background 0.18s ease, color 0.18s ease;
  position: relative; line-height: 1.4; letter-spacing: 0.8px;
}
.dropdown-menu li a::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); opacity: 0;
  transition: opacity 0.18s ease; flex-shrink: 0; align-self: center;
}
.dropdown-menu li a:hover { background: linear-gradient(90deg, rgba(18,86,163,0.06), transparent); color: var(--navy); }
.dropdown-menu li a:hover::before { opacity: 1; }

/* 导航「免费咨询」按钮 */
.nav-cta-wrap { position: relative; }
.nav-cta {
  background: var(--navy); color: white; padding: 9px 24px;
  border-radius: 4px; font-size: 15px; font-weight: 500;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--navy-light); }
.nav-cta-trigger { cursor: pointer; user-select: none; display: inline-block; }

/* --- QR 弹窗（导航栏，向下弹） --- */
.qr-popover {
  position: absolute; top: calc(100% + 14px); right: 0;
  background: white; border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
  box-shadow: 0 12px 36px rgba(18,86,163,0.18);
  width: 220px; text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 110;
}
.qr-popover::before {
  content: ''; position: absolute; top: -7px; right: 30px;
  width: 12px; height: 12px; background: white;
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
  transform: rotate(45deg);
}
.nav-cta-wrap:hover .qr-popover,
.nav-cta-wrap.open .qr-popover { opacity: 1; visibility: visible; transform: translateY(0); }

/* QR 弹窗（正文按钮，向上弹） */
.qr-trigger-wrap { position: relative; display: inline-block; }
.qr-trigger-wrap .qr-popover-up {
  position: absolute; bottom: calc(100% + 14px);
  left: 50%; transform: translateX(-50%) translateY(6px);
  background: white; border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.25);
  width: 220px; text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 95;
}
.qr-trigger-wrap .qr-popover-up::after {
  content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px; background: white;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  transform: rotate(45deg);
}
.qr-trigger-wrap:hover .qr-popover-up,
.qr-trigger-wrap.open .qr-popover-up { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* QR 弹窗公共内容样式 */
.qr-popover img, .qr-popover-up img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 6px; background: var(--section-bg); display: block;
}
.qr-popover .qr-title, .qr-popover-up .qr-title { font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 10px; }
.qr-popover .qr-tip, .qr-popover-up .qr-tip { font-size: 13px; color: var(--text-light); margin-top: 10px; line-height: 1.6; }

/* 关闭按钮（触摸屏用） */
.qr-popover-close {
  position: absolute; top: 8px; right: 10px;
  font-size: 15px; line-height: 1; padding: 2px 5px;
  background: none; border: none; cursor: pointer;
  color: var(--text-light); border-radius: 4px;
}
.qr-popover-close:hover { color: var(--navy); background: rgba(0,0,0,0.05); }
@media (hover: hover) { .qr-popover-close { display: none; } }

/* --- 回到顶部 --- */
.to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
  box-shadow: 0 6px 20px rgba(18,86,163,0.3);
  z-index: 90; border: none;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--navy-light); }
.to-top svg { width: 18px; height: 18px; }

/* --- 子页 Hero 横幅 --- */
.page-hero {
  margin-top: 64px; background: var(--navy);
  padding: 64px 40px; text-align: center;
}
.page-hero h1 { font-family: 'Noto Serif SC', serif; font-size: 42px; color: white; margin-bottom: 12px; }
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.65); max-width: 520px; margin: 0 auto; }

/* --- 通用 Section 布局 --- */
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label { font-size: 13px; letter-spacing: 2px; color: var(--gold); font-weight: 500; margin-bottom: 10px; }
.section-title { font-family: 'Noto Serif SC', serif; font-size: 36px; font-weight: 700; color: var(--navy); margin-bottom: 16px; line-height: 1.3; }
.section-sub, .section-desc { font-size: 16px; color: var(--text-light); max-width: 520px; line-height: 1.8; }

/* --- 页脚 --- */
footer { background: #0b1829; padding: 52px 40px 0; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; padding-bottom: 40px;
}
.footer-col { flex: 1; }
.footer-col-brand { flex: 1.2; }
.footer-logo { font-family: 'Noto Serif SC', serif; font-size: 19px; color: white; letter-spacing: 2px; }
.footer-logo span { color: var(--gold); }
.footer-tagline { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.7; }
.footer-col-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.65); letter-spacing: 1px; margin-bottom: 14px; text-transform: uppercase; }
.footer-nav-links { list-style: none; padding: 0; margin: 0; }
.footer-nav-links li { margin-bottom: 9px; }
.footer-nav-links a { font-size: 14px; color: rgba(255,255,255,0.4); text-decoration: none; transition: color .2s; }
.footer-nav-links a:hover { color: var(--gold); }
.footer-info { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.9; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto; padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
}
.footer-bottom-text { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-bottom a { color: rgba(255,255,255,0.3); text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: rgba(255,255,255,0.65); }

/* --- 共享按钮 --- */
.btn-primary {
  background: var(--navy); color: white; padding: 13px 32px;
  border-radius: 4px; font-size: 16px; font-weight: 500;
  text-decoration: none; transition: background 0.2s; display: inline-block;
}
.btn-primary:hover { background: var(--navy-light); }
.btn-outline {
  border: 1.5px solid var(--navy); color: var(--navy); background: white;
  padding: 13px 32px; border-radius: 4px; font-size: 16px; font-weight: 400;
  text-decoration: none; transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { background: var(--navy); color: white; }
.btn-cta-outline {
  border: 1.5px solid rgba(255,255,255,0.5); color: white;
  padding: 13px 30px; border-radius: 4px; font-size: 16px;
  text-decoration: none; transition: border-color 0.2s; display: inline-block;
}
.btn-cta-outline:hover { border-color: white; }

/* --- 响应式 --- */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .page-hero { padding: 48px 20px; }
  .page-hero h1 { font-size: 32px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-col, .footer-col-brand { text-align: center; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 4px; }
}
