﻿/* Banner基础样式 */
.banner {
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: #f5f5f5;
}

.banner-container {
  position: relative;
  width: 100%;
  height: 900px; /* 默认高度，可根据需要调整 */
}

/* 轮播图片容器 */
.banner-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 轮播项样式 */
.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  -webkit-transition: opacity 0.8s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
  z-index: 10;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 轮播文字内容 */
.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  max-width: 800px;
  width: 90%;
}

.banner-text h2 {
  font-size: 42px;
  margin-bottom: 20px;
  animation: fadeInUp 1s;
}

.banner-text p {
  font-size: 18px;
  margin-bottom: 30px;
  animation: fadeInUp 1.2s;
}

.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.3s;
  animation: fadeInUp 1.4s;
}

.banner-btn:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
}

/* 控制按钮 - 无圆圈样式 */
.banner-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px; /* 按钮宽度，根据SVG图标大小调整 */
  height: 60px; /* 按钮高度，根据SVG图标大小调整 */
  background: none; /* 移除背景 */
  border: none; /* 移除边框 */
  cursor: pointer;
  z-index: 30;
  transition: all 0.3s ease;
  padding: 0; /* 清除内边距 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 悬停效果 */
.banner-control:hover {
  transform: translateY(-50%) scale(1.1); /* 悬停时轻微放大 */
  opacity: 0.8; /* 悬停时略微透明 */
}

/* 左箭头按钮 */
.banner-control.prev {
  left: 20px; /* 左侧距离 */
  background-image: url('../images/left-arrow.png.svg');
  background-size: contain; /* 自适应按钮大小 */
  background-position: center;
  background-repeat: no-repeat;
}

/* 右箭头按钮 */
.banner-control.next {
  right: 20px; /* 右侧距离 */
  background-image: url('../images/right-arrow.svg');
  background-size: contain; /* 自适应按钮大小 */
  background-position: center;
  background-repeat: no-repeat;
}

/* 彻底隐藏原有图标字体 */
.banner-control .iconfont {
  display: none !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .banner-control {
    width: 40px;
    height: 40px;
  }
  
  .banner-control.prev {
    left: 10px;
  }
  
  .banner-control.next {
    right: 10px;
  }
}

/* 指示器 */
.banner-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background-color: #fff;
  width: 30px;
  border-radius: 6px;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .banner-container {
    height: 300px;
  }
  
  .banner-text h2 {
    font-size: 28px;
  }
  
  .banner-text p {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .banner-control {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .banner-dots {
    bottom: 20px;
  }
}

@media (max-width: 576px) {
  .banner-container {
    height: 250px;
  }
  
  .banner-text h2 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  
  .banner-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}