/* 轮播组件样式 */

.carousel {
  width: calc(100% + 48px);
  height: 400px;
  position: relative;
  margin: 0;
  margin-left: -24px;
  margin-right: -24px;
  margin-top: -24px;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 当轮播在主内容区域时，需要突破padding限制 */
.main .carousel {
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  margin-top: -24px;
}

.slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.dots {
  text-align: center;
  margin: 25px 0;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
  margin: 0 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: #94a3b8;
}

.dot.active {
  background: #3b82f6;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 64, 175, 0.8);
  color: white;
  border: none;
  font-size: 28px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(30, 64, 175, 1);
  transform: translateY(-50%) scale(1.05);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

/* 响应式轮播 */
@media (max-width: 768px) {
  .carousel {
    width: calc(100% + 48px);
    height: 250px;
    margin: 0;
    margin-left: -24px;
    margin-right: -24px;
    margin-top: -24px;
  }
  
  .main .carousel {
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
    margin-top: -24px;
  }
  
  .carousel-btn {
    font-size: 20px;
    padding: 8px 12px;
  }
  
  .prev {
    left: 10px;
  }
  
  .next {
    right: 10px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
}
