
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Global Typography & Language Support */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 中文版字体栈 */
body.lang-zh,
[lang="zh-CN"] body {
  font-family: "Roboto", "PingFang SC", "Lantinghei SC", "Microsoft YaHei", "HanHei SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* 日本語版字体栈 */
body.lang-jp,
[lang="ja"] body {
  font-family: "FrutigerNeueLTW10-Regul", "FrutigerNeueW01-Regular", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", "Roboto", "PingFang SC", "Microsoft Yahei", sans-serif;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  background-color: rgba(255, 255, 255, 0.90); /* 初始即为 0.90 不透明 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);    /* 始终保持阴影或根据需要调整 */
  transition: box-shadow 0.3s ease;
}


.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  width: 100%;
  position: relative;
  z-index: 99;
}


.logo img {
  width: 93px;
  height: auto;
  max-height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}


.nav-container {
  display: flex;
  align-items: stretch;
  gap: 10px;
  justify-content: flex-end;
}


.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  border-radius: 2px;
  padding: 12px 20px;
  flex-wrap: wrap;
  justify-content: center;
}


.nav a {
  color: #051243;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  position: relative;
  transition: color 0.3s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(265deg, #1892EE 5.11%, #0032D6 93.64%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav a:hover {
  color: #0032D6;
}

.nav a:hover::after {
  transform: scaleX(1);
}


.nav .line {
  width: 1px;
  height: 20px;
  opacity: 0.4;
  background: #4A4A4A;
  flex-shrink: 0;
}


.nav .web {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.nav .web-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}
.nav .web-dropdown-icon {
  width: 12px;
  height: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.nav .web-dropdown-icon.active {
  transform: rotate(180deg);
}


.nav-container .mail {
  width: 72px;
  border-radius: 2px;
  background: #0068B6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-container .mail img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}
.nav-container .mail .mail-text {
  display: none;
}

.nav .lang-text {
  display: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}


.dropdown-icon {
  width: 12px;
  height: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.dropdown-icon.active {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 200%;
  left: 0;
  background: #ffffff;
  padding: 12px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  border: none;
}
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
  text-decoration: none;
  color: #051243;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}
.dropdown-menu a:hover {
  background:  #F2F7FB;
}

.web-lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.lang-menu {
  position: absolute;
  top: 120%;
  right: 0;
  min-width: 80px;
  background: #fff;
  padding: 8px 0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 101;
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
}

.lang-menu a {
  display: block;
  padding: 6px 16px;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}

.lang-menu a:hover {
  background: #F2F7FB;
}

.mobile-nav-top {
  display: none;
}

/* Hamburger Toggle (Hidden on Desktop) */
.hamburger {
  display: none;
  position: relative;
  width: 24px;
  height: 20px;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #051243;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

/* Mobile responsive menu */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 24px;
  }
  
  .logo img {
    max-width: 80px;
    max-height: 28px;
  }

  /* Show Hamburger */
  .hamburger {
    display: block;
  }

  /* Hamburger active state */
  .hamburger.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
  }

  .nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 24px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 99; /* Below hamburger z-index 101 */
  }

  .nav-container.open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav-top {
    display: flex;
    align-items: center;
    height: 60px;
    width: 100%;
    flex-shrink: 0; /* Keep top logo always at top */
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
  }

  .mobile-nav-top .logo img {
    max-width: 80px;
    max-height: 28px;
  }

  .nav {
    flex-direction: column;
    background: transparent;
    padding: 10px 0 0;
    gap: 16px;
    width: 100%;
    align-items: flex-start !important;
  }

  .nav-item {
    flex-direction: column;
    width: 100%;
    align-items: flex-start !important;
  }

  .nav a {
    font-size: 16px;
    padding: 12px 0;
    text-align: left;
    display: block;
    width: 100%;
  }

  .nav a::after {
    display: none; /* Disable underline effect on mobile */
  }

  .nav .line {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  /* Mobile Dropdown styles: Stacked accordion style */
  .nav-item.has-dropdown {
    position: relative;
    cursor: pointer;
    width: 100%;
  }
  
  .nav-item.has-dropdown > a.nav-link {
    margin-right: 0;
  }
  
  .dropdown-icon, .web-dropdown-icon {
    position: absolute;
    right: 0; /* Push to the right edge */
    top: 12px; /* Set to match the link padding */
    width: 24px;
    height: 24px;
    padding: 5px; /* Increase clickable area */
    transform: none; /* Removed translateY since top padding sets vertical center */
  }

  /* Override active transform */
  .dropdown-icon.active, .nav .web-dropdown-icon.active {
    transform: rotate(180deg);
  }
  
  .web-lang {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 0;
    position: relative;
  }

  .nav .lang-text {
    display: none;
  }

  .web-lang .web-dropdown-icon {
    right: 0;
    position: absolute;
    top: 5px; /* Manually positioning to match icon level */
    width: 24px;
    height: 24px;
    padding: 5px;
    margin-left: 0;
    transform: none; /* Removed transform to avoid offset */
  }

  .web-lang .web-dropdown-icon.active {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f8f9fa;
    width: 100%;
    padding: 8px 16px; /* Left indent child links */
    opacity: 0;
    display: none;
    visibility: visible;
    transform: none;
    text-align: left;
  }

  .dropdown-menu.show {
    opacity: 1;
    display: block;
  }

  .dropdown-menu a {
    padding: 10px 16px;
    font-size: 14px;
  }

  .lang-menu {
    position: static;
    margin-top: 12px;
    width: 100%;
  }

  .nav-container .mail {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 24px;
    border-radius: 4px;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: linear-gradient(265deg, #1892EE 5.11%, #0032D6 93.64%);
    flex-shrink: 0;
  }
  
  .nav-container .mail .mail-text {
    display: inline-block;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
  }
  
  .nav-container .mail img {
    width: 24px;
    height: 24px;
  }
}