header {
  position: fixed;
  top: 0; left: 0; width: 100vw;
  z-index: 1000;
  background: rgba(0, 32, 80, 0.1);
  transition: background 0.4s, box-shadow 0.4s;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.10);
  color: #192e66 ;
}

header.header-scrolled {
  background: rgba(0, 32, 80, .8);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.15);
}

.hamburger-space {
  display: none;
  align-items: center;
  gap: 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0 4em;
  height: 84px;
}
.logo {
  margin-right: 1em;
  color: #fff;
  font-size: 1.2em;
}
#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.nav-left, .nav-right {
  display: flex;
  align-items: center;
}
.nav-right {
  gap: 1em;
  margin-left: 2em;
}
nav a, #lang-switch , #lang-switch2{
  color: #fff;
  font-size: 1.1em;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5em 1.2em;
  transition: background 0.2s;
}
nav a:hover, #lang-switch:hover , #lang-switch:hover{
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 1400px) {
  .header-inner {
    height: 64px;
    padding: 0 1em;
  }

  header {
    height: 64px;
  }

  #main-nav {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.2s, gap 0.3s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100vw;
    background: #002050;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  #main-nav.active {
    max-height: 600px;
    opacity: 1;
  }

  .nav-left, .nav-right {
    flex-direction: column;
    margin-left: 0;
  }

  #main-nav .nav-left, #main-nav .nav-right {
    width: 100%;
  }

  #main-nav a, #lang-switch , #lang-switch2{
    width: 100%;
    display: block;
    padding: 0.7em 1.2em;
    box-sizing: border-box;
    background: none;
    border: none;
    text-align: left;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
  }

  #main-nav a:hover, #lang-switch:hover , #lang-switch2:hover{
    background: rgba(255,255,255,0.08);
  }

  .hamburger-space { display: flex; }

  .hamburger { display: flex; margin-right: 1em; }

  .nav-right #lang-switch {
    display: none;
  }

  .menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
  }

  .menu-link:hover {
    background: rgba(255,255,255,0.08);
  }

  .menu-link a {
    width: 100%;
    height: 100%;
    padding: 0.7em 1.2em;
    display: block;
  }
  #main-nav a {
    width: 100%;
    display: block;
    padding: 0.7em 1.2em;
    box-sizing: border-box;
  }
  #main-nav a:hover {
    background: rgba(255,255,255,0.08);
  }
  #main-nav .nav-right{
    gap : 0
  }
}

/* 电脑 */
@media (min-width: 1024px) {
  #main-nav {
    top: 84px !important 
  }
  .header-inner {
    height: 84px;
    padding: 0 4em;
  }
  header {
    height: 84px;
  }
  .logo img {
    height: 48px;
  }
  nav a, #lang-switch , #lang-switch2{
    font-size: 1.15em;
    padding: 0.7em 1.5em;
  }
}

/* 平板 */
@media (min-width: 768px) and (max-width: 1023px) {
  #main-nav {
    top: 64px !important
  }

  .header-inner {
    height: 64px;
    padding: 0 0.5em;
  }
  header {
    height: 64px;
  }
  .logo img {
    height: 40px;
  }
  nav a, #lang-switch , #lang-switch2{
    font-size: 1.08em;
    padding: 0.6em 1.2em;
  }
}

/* 手机 */
@media (max-width: 767px) {
  #main-nav {
    top: 54px
  }

  .header-inner {
    height: 54px;
    line-height: 34px;
    padding: 0 0.5em;
  }

  header {
    height: 54px;
  }
  .logo img {
    height: 46px !important;
  }
  nav a, #lang-switch,#lang-switch2 {
    font-size: 1em;
    height: 54px;
    line-height: 34px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
  }
} 