/* 轮播主容器 */
.banner-slider {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  z-index: 1; /* 确保在底部 */
}

.banner-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.banner-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-background-size: cover;
}

/* 头部内容容器 - 浮在轮播图上 */
.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100; /* 确保在轮播图上方 */
  pointer-events: none; /* 允许点击穿透到轮播图 */
}

/* 头部内容本身需要接收鼠标事件 */
.header-overlay .hd-index {
  pointer-events: auto; /* 头部内容可交互 */
  background: transparent; /* 透明背景 */
  position: relative;
}

/* 导航按钮 */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.7;
  pointer-events: auto; /* 确保按钮可点击 */
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

/* 指示器 */
.slider-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  pointer-events: auto; /* 确保指示器可点击 */
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator-dot.active {
  background: white;
  transform: scale(1.2);
}

.indicator-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .banner-slider {
    height: 400px;
  }
  
  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .prev-btn {
    left: 10px;
  }
  
  .next-btn {
    right: 10px;
  }
  
  .slider-indicator {
    bottom: 10px;
  }
  
  .indicator-dot {
    width: 8px;
    height: 8px;
  }
}

/* 确保#banner容器有相对定位 */
#banner {
  position: relative;
  height: 600px; /* 与轮播图高度一致 */
}

@media (max-width: 768px) {
  #banner {
    height: 400px;
  }
}