/**
 * ===========================================
 * 共享顶部导航栏样式
 * 首页与所有子页面使用同一套导航栏
 * ===========================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 导航栏配色变量（独立命名，避免与各页样式冲突） */
:root {
  --sh-primary: #0B3D2E;
  --sh-primary-light: #156B50;
  --sh-accent: #D4A843;
  --sh-accent-hover: #E8C06A;
  --sh-text-dark: #1A1A1A;
  --sh-text-body: #4A4A4A;
  --sh-text-light: #8A8A8A;
  --sh-bg-gray: #F2F2EF;
  --sh-font-en: 'Inter', sans-serif;
  --sh-font-cn: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

/* 页面顶部留白，避免固定导航遮挡内容 */
body {
  padding-top: 72px;
}

/* 中文模式字体 */
body.cn-mode .header,
body.cn-mode .mega-menu {
  font-family: var(--sh-font-cn);
}


/* ===========================================
   HEADER - 顶部导航栏
   =========================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--sh-font-en);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sh-primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.header .logo-img {
  height: 48px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

/* 桌面端导航 */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sh-text-dark);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sh-accent);
  transition: width 0.3s;
}

.nav-desktop a:hover {
  color: var(--sh-primary);
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* 当前所在页：横杠一直显示 */
.nav-desktop a.active {
  color: var(--sh-primary);
}

.nav-desktop a.active::after {
  width: 100%;
}

/* 右侧操作区 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 语言切换按钮 */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--sh-bg-gray);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-toggle span {
  padding: 6px 14px;
  transition: all 0.25s;
  color: var(--sh-text-light);
}

.lang-toggle span.active {
  background: var(--sh-primary);
  color: #fff;
  border-radius: 20px;
}

/* CTA 按钮 */
.header .btn-cta,
.mega-menu .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.header .btn-primary,
.mega-menu .btn-primary {
  background: var(--sh-primary);
  color: #fff;
}

.header .btn-primary:hover,
.mega-menu .btn-primary:hover {
  background: var(--sh-primary-light);
  transform: translateY(-1px);
}

/* 汉堡菜单按钮（移动端） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sh-text-dark);
  transition: all 0.3s;
  border-radius: 2px;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ===========================================
   MEGA MENU - 全屏覆盖菜单
   =========================================== */

.mega-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #FFFFFF;
  z-index: 1050;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  font-family: var(--sh-font-en);
}

.mega-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mega-menu .mega-menu-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 60px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 60px;
}

.mega-menu .mega-menu-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sh-text-light);
  margin-bottom: 24px;
}

.mega-menu .mega-menu-col a {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--sh-text-dark);
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.25s;
  text-decoration: none;
}

.mega-menu .mega-menu-col a:hover {
  color: var(--sh-primary);
  padding-left: 12px;
}

.mega-menu .mega-menu-contact p {
  font-size: 0.95rem;
  color: var(--sh-text-body);
  margin-bottom: 8px;
}

.mega-menu .mega-menu-contact a.contact-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sh-primary);
  border-bottom: none;
  padding: 4px 0;
  display: inline;
  text-decoration: none;
}


/* ===========================================
   RESPONSIVE - 响应式
   =========================================== */

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header .btn-cta {
    display: none;
  }

  .mega-menu .mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 100px 30px 40px;
  }

  .mega-menu .mega-menu-col a {
    font-size: 1.1rem;
  }

  .header .header-inner {
    padding: 0 20px;
  }
}


/* ===========================================
   SCROLL REVEAL - 滚动渐现动画（全站共享）
   =========================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 依次延迟，营造错落进场效果 */
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
