/* 导航栏统一样式 - 完全复刻header8de2.css */

/* Material Symbols 字体 */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,500,1,0');

.material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* ========== Header 主导航样式 - 完全复刻原版 ========== */

header {
  background-color: var(--color-white, #ffffff);
}

header nav {
  display: grid;
  grid-template-columns: [logo] 200px [left-nav] auto [right-nav] 30%;
  width: 100%;
  padding-top: 1.5em;
  background: var(--color-white, #ffffff);
  max-width: 1600px;
  margin: auto auto;
}

header nav > a img {
  padding: 0.5em 1.5em 1.5em 2em;
  max-width: 200px;
}

header nav > ul {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: stretch;
}

header nav > ul li {
  list-style-type: none;
  padding: 1em;
  margin: 0;
}

header nav ul li a.nav-link.active {
  color: var(--color-petrol, #005a70);
}

header nav span#site-selector {
  cursor: pointer;
}

header nav button#toggle-button {
  display: none;
}

/* 导航链接样式 */
a:link.nav-link,
a:visited.nav-link {
  border-bottom: transparent 2px solid;
}

a:hover.nav-link {
  border-bottom: var(--color-blue, #0066cc) 2px solid;
}

/* ========== 语言切换按钮样式 ========== */

/* 语言按钮容器位置调整 */
header nav > ul:nth-of-type(2) {
  align-items: center !important;
  margin-left: 50px !important;
}

header nav > ul:nth-of-type(2) > li {
  margin-top: -16px !important;  /* 垂直居中对齐调整 */
  padding: 0 !important;  /* 移除默认padding */
}

.lang-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #334155;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.08s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.09);
}

.lang-btn:active {
  transform: translateY(1px);
}

.lang-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.lang-btn::after {
  content: attr(data-lang);
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 2px 6px;
  min-width: 18px;
  border-radius: 999px;
  font: 700 10px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto;
  letter-spacing: 0.2px;
  text-align: center;
  background: #2563eb;
  color: #fff;
  border: 2px solid #fff;
  transform: translateZ(0);
}

.lang-btn svg {
  width: 24px;
  height: 24px;
}

/* ========== 响应式规则覆盖 - 确保所有屏幕尺寸布局一致 ========== */

/* 强制统一间距（覆盖mobile.css等响应式规则） */
@media (min-width: 1px) {
  header nav > ul:nth-of-type(2) {
    margin-left: 50px !important;
  }
  
  /* 确保grid布局不被覆盖 */
  header nav {
    display: grid !important;
    grid-template-columns: [logo] 200px [left-nav] auto [right-nav] 30% !important;
  }
  
  /* 确保ul样式不被覆盖 */
  header nav > ul {
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
  }
  
  /* 确保li padding不被覆盖 */
  header nav > ul li {
    padding: 1em !important;
    margin: 0 !important;
  }
}
