/* carousel.css - 产品轮播图专用样式 */
.display {
  background-color: white;
}
.product-carousel {
  /* margin: 40px auto; */
  /* padding: 20px; */
  max-width: 1200px;
}

.carousel-container {
  display: flex;
  align-items: center;
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-slides {
  flex: 1;
  position: relative;
  height: 400px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
}

.carousel-info {
  width: 350px;
  padding: 30px;
  background: white;
  border-left: 1px solid #eee;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #333;
  background: transparent;
  cursor: pointer;
}

.carousel-btn.active {
  background: #333;
}

.carousel-prev,
.carousel-next {
  background: #333;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* 移动端响应式布局 */
@media (max-width: 768px) {
  .carousel-container {
    flex-direction: column; /* 改为垂直排列 */
    align-items: stretch; /* 取消居中，让内容撑满宽度 */
  }

  .carousel-slides {
    order: 1; /* 图片在上 */
    height: auto; /* 高度自适应 */
    min-height: 250px; /* 最小高度保证显示 */
    padding: 15px; /* 增加内边距 */
  }

  .carousel-info {
    order: 2; /* 文字在下 */
    width: 100%; /* 宽度撑满 */
    border-left: none; /* 移除左边框 */
    border-top: 1px solid #eee; /* 添加顶部边框作为分隔 */
    padding: 20px;
    box-sizing: border-box; /* 包含padding在宽度内 */
  }

  /* 调整图片显示 */
  .carousel-slide img {
    max-height: 250px;
    width: auto;
    max-width: 100%;
  }

  /* 调整控制按钮大小 */
  .carousel-prev,
  .carousel-next {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

/* ------------------------------------------------ */
/* 小程序展示区域样式 */
.mini-programs-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* 为箭头按钮提供定位基准 */
}

.mini-programs-container .section-title {
  text-align: center;
  margin-bottom: 30px;
}

/* 箭头按钮样式 */
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.slide-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.arrow-prev {
  left: -20px; /* 左侧箭头位置 */
}

.arrow-next {
  right: -20px; /* 右侧箭头位置 */
}

/* 小程序卡片容器 */
.mini-programs-container {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  position: relative;
}

.mini-programs-container .section-title {
  text-align: center;
  margin-bottom: 30px;
}

.mini-programs-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 50px; /* 为箭头预留空间 */
}

.mini-programs-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.mini-program-card {
  flex: 0 0 calc(33.333% - 20px); /* 一次显示3张卡片 */
  margin: 0 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.mini-program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.mini-program-card img {
  width: 100%;
  max-width: 230px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mini-program-card h4 {
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.mini-program-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
}

.carousel-arrow:hover {
  background: #555;
}

.carousel-arrow.prev {
  left: 0;
}

.carousel-arrow.next {
  right: 0;
}

.carousel-arrow.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式调整 */
/* 大屏幕 */
@media (min-width: 992px) {
  .mini-program-card img {
    max-width: 240px;
  }
}

/* 平板 */
@media (max-width: 992px) {
  .mini-program-card img {
    max-width: 200px;
  }
}

/* 手机 */
@media (max-width: 768px) {
  .mini-program-card img {
    max-width: 180px;
  }
}

/* 图片放大层样式（移动设备专用） */
.image-modal {
  display: none; /* 默认隐藏 */
  position: fixed;
  z-index: 100; /* 确保在最上层 */
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* 黑色半透明背景 */
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%; /* 最大宽度不超过屏幕90% */
  max-height: 80%; /* 最大高度不超过屏幕80% */
  animation: zoom 0.3s; /* 淡入动画 */
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.modal-close:hover {
  color: #bbb;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* 媒体查询：区分设备的光标样式 */
@media (max-width: 992px) {
  /* 移动设备（992px以下） */
  .mini-program-card img {
    cursor: pointer; /* 显示可点击光标 */
  }
}

@media (min-width: 993px) {
  /* 电脑设备（993px以上） */
  .mini-program-card img {
    cursor: default; /* 默认光标，无点击提示 */
  }
}

/* 视频展示区域样式 */
/* 视频轮播容器 */
.program-videos {
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 0;
  /* padding: 0 20px; */
  position: relative;
}

.video-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 50px; /* 为箭头预留空间 */
}

.video-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.video-item {
  flex: 0 0 calc(50% - 20px); /* 每个视频占50%宽度，减去间距 */
  margin: 0 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.video-item video {
  width: 100%;
  max-width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

.video-item video:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.video-item p {
  margin-top: 15px;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

/* 视频轮播箭头 */
.video-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
}

.video-carousel-arrow:hover {
  /* background: #555; */
}

.video-carousel-arrow.prev {
  left: 0;
}

.video-carousel-arrow.next {
  right: 0;
}

.video-carousel-arrow.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* 视频播放控件美化 */
video::-webkit-media-controls {
  display: flex;
  /* background: rgba(0, 0, 0, 0.3); */
  border-radius: 0 0 12px 12px;
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-mute-button {
  filter: brightness(0) invert(1);
}

video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display {
  color: white;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .video-carousel {
    padding: 0 40px;
  }

  .video-item {
    flex: 0 0 calc(100% - 20px); /* 移动端每页显示1个视频 */
  }

  .video-carousel-arrow {
    width: 35px;
    height: 35px;
  }
}
