.carousel {
  position: relative;
  width: 800px;
  max-width: 90vw;
  height: 500px;
  margin: 0 auto; /* 整体居中 */
  overflow: hidden;
}

/* 轮播轨道（容纳所有幻灯片） */
.carousel-track {
  display: flex;
  width: 400%; /* 4张图 = 4 × 100% */
  height: 100%;
  transition: transform 0.5s ease;
}

/* 单个幻灯片（占满轨道宽度） */
.carousel-slide {
  width: 25%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column; /* 改为垂直排列 */
  justify-content: center; /* 垂直居中 */
  align-items: center;    /* 水平居中 */
  position: relative;     /* 保留定位基准 */
}

/* 图片容器 */
.slide-image-container {
  width: 60%;
  height: 70%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 图片样式（占幻灯片宽度的60%） */
.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* 文字容器样式 */
.slide-content {
  width: 60%;
  margin-top: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
}
        /* 导航按钮 */
        .carousel-button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.5);
            border: none;
            font-size: 24px;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            z-index: 10;
            transition: all 0.3s;
        }

        .carousel-button:hover {
            background: rgba(255, 255, 255, 0.8);
        }

        .button-prev {
            left: 20px;
        }

        .button-next {
            right: 20px;
        }

        /* 指示点导航 */
        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
        }

        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: background 0.3s;
        }

        .indicator.active {
            background: white;
        }

        /* 响应式设计 */
        @media (max-width: 600px) {
            .carousel {
                height: 400px;
            }
            
            .slide-content h2 {
                font-size: 20px;
            }
        }