.site-header {
  position: relative;
  width: 100%;
  height: 100px;
  background-color: #ffffff;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  width: 310px;
  height: 82px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-block;
  font-size: 20px;
  color: #333333;
  padding: 8px 4px 8px;
  position: relative;
  font-weight: 400;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
  color: var(--primary-color);
}

.nav-item:hover .nav-link::after,
.nav-item.active .nav-link::after {
  width: 100%;
}

.submenu {
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(55, 125, 118, 0.8);
  border-radius: 4px;
  padding: 10px 0;
  min-width: 140px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}

.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.submenu-link {
  display: block;
  padding: 8px 18px;
  font-size: 20px;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.submenu-link:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.search-trigger {
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.search-trigger:hover {
  background-color: #f5f5f5;
}

.search-icon-img {
  width: 22px;
  height: 22px;
}

.weather-widget-box {
  position: relative;
  display: flex;
  align-items: center;
}

.weather-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #555555;
  padding: 6px 10px;
  background: transparent;
  cursor: pointer;
  border-radius: 18px;
  transition: background-color 0.2s ease;
}

.weather-trigger:hover {
  background-color: #f5f5f5;
}

.weather-city {
  font-weight: 500;
  color: #333333;
}

.weather-popup-panel {
  position: absolute;
  top: 55px;
  right: 0;
  width: 420px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #ececec;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.weather-popup-panel.active,
.weather-widget-box:hover .weather-popup-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.weather-popup-panel iframe {
  border: none;
  width: 400px;
  height: 630px;
  display: block;
}

.search-popup-panel {
  position: absolute;
  top: 55px;
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 16px;
  border: 1px solid #ececec;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002;
}

.search-popup-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #dddddd;
  border-radius: 20px;
  padding: 4px 12px;
  background-color: #fafafa;
}

.search-input {
  flex: 1;
  padding: 8px 4px;
  font-size: 14px;
  background: transparent;
  color: #333333;
}

.search-submit-btn {
  background: none;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 16px;
  padding: 4px 8px;
}

.search-close-btn {
  background: none;
  cursor: pointer;
  color: #999999;
  font-size: 18px;
  padding-left: 6px;
}

.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 44px;
  height: 44px;
  margin: -11px 0; /* 保持视觉布局不变，同时扩大触控热区 */
  background: transparent;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  padding: 11px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mobile-toggle-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background-color: #333333;
  transition: all 0.3s ease;
}
