/* 新头部样式 - 按照图片设计 */

/* 头部容器 - 保持原有背景图 */
.header {
  width: 100%;
  height: auto;
  padding-bottom: 0;
  /* Assuming 1rem = 100px for original design */
  margin: 0 auto;
  background: url(h-background.png) no-repeat top center;
  /*  background-size: 100% 100%; Assuming 19.2rem is full width */
  padding-top: 0.23rem; /* Original padding */
  position: relative;
}

.header .h-logo-box-container {
  background: url(header-bg.jpg) no-repeat top center;
  background-size: cover;
}
.header .logo-content {
  opacity: 0;
}
.header .h-search {
  position: relative;
}

@media (max-width: 768px) {
  .header .h-logo-box-container {
    background-size: contain;
  }
  .header .h-search {
    position: absolute;
  }
}

/* 顶部工具栏 */
.header-top-bar {
  padding: 8px 0;
  position: relative;
  z-index: 2;
}

.top-bar-content {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.top-links a:hover {
  color: #fbbf24;
}

.separator {
  color: #ffffff;
  font-size: 14px;
  margin: 0 4px;
}

.top-utils {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-item {
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lang-item.active {
  color: #fbbf24;
  font-weight: 600;
}

.lang-item:hover {
  color: #fbbf24;
}

.accessibility {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 14px;
}

.accessibility-icon {
  font-size: 16px;
}

.elderly-mode-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.elderly-mode-btn:hover {
  background: #b91c1c;
}

/* 主导航栏 */
.main-navigation {
  padding: 12px 0;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 20px;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  justify-content: center;
  width: 100%;
}

.nav-item {
  position: relative;
  flex: 1;
  text-align: center;
}

.nav-item a {
  display: block;
  padding: 12px 24px;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 3px solid transparent;
}

.nav-item.active a {
  color: #fbbf24;
  font-weight: 600;
}

.nav-item:not(.active) a:hover {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 3px solid #fbbf24;
}

/* Logo和标题区域 */
.logo-title-area {
  padding: 20px 0 50px 0; /* Adjusted padding for search area */
  position: relative;
  z-index: 2;
}

.logo-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.logo-badge {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-emblem {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.title-container {
  text-align: center;
}

.main-title {
  font-size: 0.32rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

.sub-title {
  font-size: 0.18rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

/* 搜索区域 - 位于banner底部，一半在下面 */
.search-area {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-type-selector {
  padding: 16px 20px;
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.search-input {
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #374151;
  background: transparent;
  min-width: 800px;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-btn {
  background: #fbbf24;
  color: #000000;
  border: none;
  padding: 16px 24px;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
  background: #f59e0b;
}

.search-icon {
  font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .top-bar-content {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .top-utils {
    gap: 15px;
  }

  .logo-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .main-title {
    font-size: 0.28rem;
  }

  .sub-title {
    font-size: 0.16rem;
  }

  .search-input {
    min-width: 300px;
  }
}

@media (max-width: 768px) {
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-item a {
    padding: 10px 16px;
    font-size: 14px;
  }

  .logo-badge {
    width: 60px;
    height: 60px;
  }

  .logo-emblem {
    width: 45px;
    height: 45px;
  }

  .main-title {
    font-size: 0.24rem;
  }

  .sub-title {
    font-size: 0.14rem;
  }

  .search-container {
    flex-direction: column;
    gap: 10px;
  }

  .search-input-wrapper {
    border-radius: 8px;
    width: 100%;
  }

  .search-btn {
    border-radius: 8px;
    width: 100%;
    justify-content: center;
  }

  .search-input {
    min-width: auto;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .top-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .top-utils {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-title {
    font-size: 0.2rem;
  }

  .sub-title {
    font-size: 0.12rem;
  }
}