/* 轮播图容器样式 */
.carousel-container {
  width: 800px;
  height: 500px;
  margin: 50px auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 图片容器样式 */
.carousel-images {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s ease;
}

/* 单张图片样式 */
.carousel-image {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 箭头样式 - 修复垂直居中并添加默认隐藏 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  transition: all 0.3s ease;
  opacity: 0; /* 默认隐藏 */
  z-index: 10;
  /* 修复文本基线问题的关键属性 */
  line-height: 1;
  font-family: Arial, sans-serif;
  user-select: none;
}

/* 轮播图悬停时显示箭头 */
.carousel-container:hover .carousel-arrow {
  opacity: 1;
}

/* 箭头悬停效果 */
.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.arrow-left {
  left: 20px;
}

.arrow-right {
  right: 20px;
}

/* 小圆点样式 */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* 小圆点悬停效果 - 亮度介于默认和激活状态之间 */
.carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* 小圆点激活状态 - 保持最亮 */
.carousel-dot.active {
  background-color: white;
}

/* 确保激活状态的小圆点在悬停时仍然保持最亮 */
.carousel-dot.active:hover {
  background-color: white;
}
