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

@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);
  line-height: 1.6;
}

.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: 58px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  position: relative;
  left: min(0px, calc((1400px - 100vw) / 2 + 20px));
}

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

.nav-desktop a {
  font-size: 1.05rem;
  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;
  padding: 0;
  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);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.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: 1100px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

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

  .mega-menu {
    align-items: flex-start;
  }

  .mega-menu .mega-menu-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: auto;
    padding: 100px 20px 40px;
    max-width: none;
    margin: 0;
  }

  .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;
  }
}

/* ===========================================
   页脚 Logo 样式（honors/products/news/about/partners/contact 页面专用）
   =========================================== */

/* 页脚背景色与基础样式（和首页 site-footer 一致） */
.page-footer {
  color: rgba(255, 255, 255, 0.72);
  background: #061F17;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 页脚 Logo 白色卡片（和首页通用 .footer-logo 完全一致） */
.page-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.page-footer .footer-logo img {
  height: 81px;
  width: auto;
  max-width: none;
  margin: -20px -14px;
  display: block;
}

/* ===========================================
   子页面 Hero 全屏背景轮播（hero-carousel.js 渲染）
   子页面不加载 style.css，故轮播样式在此统一提供
   =========================================== */

/* 媒体容器：绝对定位铺满 Hero，压在渐变背景之上、内容之下 */
.hero-bg-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

/* 无数据兜底时容器为空，不遮挡原渐变背景 */
.hero-bg-carousel:empty {
  display: none;
}

/* 媒体上方的可读性遮罩（仅当有轮播媒体时出现） */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 61, 46, 0.45) 0%, rgba(11, 61, 46, 0.72) 100%);
}

/* 容器为空（无轮播数据）时遮罩也隐藏，保留页面原有静态视觉 */
.hero-bg-carousel:empty + .hero-bg-overlay {
  display: none;
}

/* 让 Hero 内容层浮在媒体+遮罩之上 */
.hero .hero-grid,
.hero-plain .hero-stack,
.hero-plain .hero-info-strip,
.split-hero .split-hero-inner {
  position: relative;
  z-index: 2;
}

/* 轮播内部结构（脚本注入 .hero-carousel > .hero-slide） */
.hero-bg-carousel .hero-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg-carousel .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-bg-carousel .hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-bg-carousel .hero-slide img,
.hero-bg-carousel .hero-slide video,
.hero-bg-carousel .hero-slide a {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 圆点（插入到 .hero 顶层） */
.hero .hero-dots,
.hero-plain .hero-dots,
.split-hero .hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 6;
}

.hero-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.hero-dots .dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* 左右箭头 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

@media (max-width: 768px) {
  .hero-arrow {
    display: none;
  }
  .header .logo-img {
    position: static;
    left: 0;
    height: 36px;
  }
}

/* 页脚 logo 白盒（chanpin/zhuyingchanpin 专用） */
.footer-logo-bar {
  padding-top: 30px;
}

.footer .footer-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.footer .footer-logo img {
  height: 60px;
  margin: -10px -8px;
  display: block;
}

/* 移动端去掉页脚 Logo 负边距 */
@media (max-width: 600px) {
  .footer .footer-logo img {
    margin: 0;
  }
}
