/* ============================================
   甘肃省图书馆 - Header（公用）
   ============================================ */

#header {
  position: relative;
  z-index: 100;
}

/* 顶部工具条 */
.header-tools {
  position: absolute;
  top: 28px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 16px;
  color: #666;
  z-index: 10;
}

.ht-access {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #666;
}

.ht-access img {
  width: auto;
  height: 16px;
}

.ht-divider {
  width: 1px;
  height: 17px;
  background: rgba(102, 102, 102, 0.3);
}

.ht-eng {
  color: #666;
}

/* 手机端元素默认隐藏 */
.menu-toggle,
.m-search-box {
  display: none;
}

.header-main {
  min-height: 120px;
  background: #fff;
  position: relative;
}

.header-main .container {
  position: relative;
}

.header-eng {
  position: absolute;
  top: 28px;
  
  color: #666;
  font-size: 16px;
}

.logo {
  float: left;
  display: flex;
  align-items: flex-start;
  height: 120px;
  padding-top: 18px;
}

.logo img {
  width: 322px;
  height: auto;
}

.nav {
  float: right;
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 18px;
  gap: 52px;
}

.nav-item {
  position: relative;
}

.nav-item a {
  font-size: 20px;
  padding: 8px 0;
  transition: font-weight 0.3s;
}

.nav-item a:hover,
.nav-item.active a {
  font-weight: 700;
  color: inherit;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ffc067;
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-item.active::after,
.nav-item:hover::after {
  transform: scaleX(1);
}

/* 导航箭头 */
.nav-arrow {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  vertical-align: 3px;
}

/* 二级面板 - 正常流推下内容 */
.sub-panel {
  max-height: 0;
  overflow: hidden;
  background: rgba(250, 250, 250, 0.92);
  transition: max-height 0.35s ease;
  position: relative;
}

.sub-panel.active {
  max-height: 200px;
}

.sub-panel-inner {
  width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  padding: 8px 0;
}

.sub-panel-inner a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #444;
  padding: 8px 24px;
  position: relative;
  transition: color 0.2s;
}

.sub-panel-inner a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: #e0e0e0;
}

.sub-panel-inner a img {
  max-width: 20px;
  max-height: 20px;
  width: auto;
  height: auto;
}

.sub-panel-inner a:hover {
  color: #2e6aba;
}