/* 主导航（蓝湖「金诚官网-1首页」：Logo 逻辑 173×69；搜索图标 16×16） */

.site-header {
  z-index: 50;
  color: #fff;
  position: relative;
  box-shadow: 0px 8px 9px 0px rgba(0, 0, 0, 0.2);
}

/* PC 全站：导航浮层贴顶，不占文档流；下滑隐藏、上滑显示（见 js/common.js） */
@media (min-width: 769px) {
  .site-header {
    position: fixed;
    top: 0;
    /* 与文档横向滚动同步（--header-sync-x 由 js/common.js 写入） */
    left: calc(-1 * var(--header-sync-x, 0px));
    right: auto;
    /* 不用 100vw，避免滚动条占位导致 scrollX 与视觉错位 */
    width: 100%;
    z-index: 100;
    transform: translateY(var(--header-offset-y, 0));
    transition: transform var(--transition);
    will-change: transform;
  }

  .site-header.is-scroll-hidden {
    --header-offset-y: calc(-1 * var(--header-nav-height));
    pointer-events: none;
  }

  /* 与 body 同宽（1460），左右留白与 .container 对齐；窄屏时不压缩菜单 */
  .site-header__inner {
    width: 100%;
    min-width: var(--page-min-width);
    box-sizing: border-box;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .site-nav {
    flex: 1 1 auto;
    min-width: max-content;
  }
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 48px;
  height: var(--header-nav-height);
}

.site-header__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #232323;
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
  backdrop-filter: blur(12px);
  pointer-events: none;
  background: rgba(35, 35, 35, 0.2);
  box-shadow: 0px 6px 9px 0px rgba(0, 0, 0, 0.2);
}

.site-header__inner > * {
  position: relative;
  z-index: 1;
}

.site-nav-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--site-header-offset);
  z-index: 70;
  opacity: 0;
  /* pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px); */
}

.site-header.is-mega-open .site-nav-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav-mega__inner {
  position: absolute;
  top: 0px;
  left: var(--nav-mega-left, 48px);
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 0;
  padding: 22px 28px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header__logo {
  height: 69px;
  width: auto;
  max-width: 173px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 64px;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  justify-content: center;
}

.site-nav__link {
  position: relative;
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.92;
  transition: opacity var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.site-nav__dropdown {
  position: static;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.site-nav__toggle {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  height: 100%;
}

.site-nav__icon {
  width: 16px;
  height: 16px;
  opacity: 0.88;
  transition: transform var(--transition), opacity var(--transition);
  transform: rotate(0deg);
  display: none;
}

.site-nav__panel {
  display: none;
}

.site-nav__dropdown.is-open .site-nav__icon,
.site-nav__dropdown:hover .site-nav__icon,
.site-nav__dropdown:focus-within .site-nav__icon {
  transform: rotate(90deg);
  opacity: 1;
}

/* Mega menu 布局（相对当前父级菜单左对齐展开） */
.nav-mega {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 26px;
}

.nav-mega__title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 16px;
  padding: 0 12px;
  white-space: nowrap;
}

.nav-mega__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  line-height: 2;
}

.nav-mega__list > li > .nav-mega__link {
  display: block;
  padding: 0 12px;
  min-width: 96px;
  border-radius: 2px;
}

.nav-mega__list > li.is-active > .nav-mega__link,
.nav-mega__link.is-active {
  background: linear-gradient(90deg, #d82f2f 0%, rgba(77, 77, 77, 0) 100%);
  border-radius: 2px;
}

.nav-mega__list--two-col {
  column-count: 2;
  column-gap: 22px;
  display: block;
}

.nav-mega__list--two-col > li {
  break-inside: avoid;
  padding-bottom: 10px;
}

.nav-mega__link {
  font-size: 14px;
  line-height: 2.2;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0.92;
  transition: opacity var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-mega__link:hover {
  opacity: 1;
  color: #f23030;
}

.site-nav__link:hover {
  opacity: 1;
}

.site-nav__link.is-active {
  opacity: 1;
  font-weight: 600;
  color: #f23030;
}

.site-nav__link.is-active::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 150%;
  height: 3px;
  background: #f23030;
}

/* PC 主导航：除「首页/关于我们」外显示向下箭头 */
.site-nav > a.site-nav__link {
  gap: 8px;
}

.site-nav > a.site-nav__link:not(:first-child):not(:last-child)::after {
  content: '';
  width: 10px;
  height: 11px;
  opacity: 0.88;
  background: url('../../assets/images/common/icons/icon-arrow-down.png') no-repeat center / 10px 11px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 190px;
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid #8b8b8b;
  backdrop-filter: blur(10px);
}

.site-search__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.92;
}

.site-search__input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
}

.site-search__input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.site-lang {
  position: relative;
}

.site-lang__toggle {
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid #8b8b8b;
  color: #fff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-lang__label {
  white-space: nowrap;
}

.site-lang__icon {
  width: 16px;
  height: 16px;
  opacity: 0.88;
  transition: transform var(--transition);
  transform: rotate(0deg);
}

.site-lang.is-open .site-lang__icon {
  transform: rotate(90deg);
}

.site-lang__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 20px);
  min-width: 148px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(10, 12, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  display: none;
  z-index: 60;
}

.site-lang.is-open .site-lang__panel {
  display: grid;
  gap: 8px;
}

.site-lang__item {
  height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  text-align: left;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.site-lang__item.is-active {
  background: rgba(211, 47, 47, 0.22);
  border-color: rgba(211, 47, 47, 0.35);
}

.site-burger {
  display: none;
  width: 44px;
  height: 40px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.26);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

/* 移动端：整站头部贴顶固定；汉堡为虚线框 + 图标 */
@media (max-width: 768px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  }

  .site-header__inner {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    height: var(--header-nav-height);
    padding: 0 16px;
    gap: 12px;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: none;
    align-items: center;
  }

  .site-header__inner::before {
    border-radius: 0;
    background: #232323;
  }

  .site-header__logo {
    height: 52px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
  }

  .site-nav {
    display: none;
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .site-search,
  .site-lang {
    display: none;
  }

  .site-burger {
    display: inline-flex;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 6px;
    background-color: transparent;
    background-image: url('../../assets/images/common/icon-mobile-menu@2x.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px auto;
    flex-direction: row;
    gap: 0;
    align-items: center;
    justify-content: center;
  }

  .site-nav-mega {
    display: none !important;
    pointer-events: none;
    visibility: hidden;
  }

  .site-header.is-mega-open .site-nav-mega {
    opacity: 0;
  }
}
