/* ========================================
   轮播图样式 (基于Swiper.js)
   ======================================== */

.my-theme-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.my-theme-slider .swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transition-timing-function: ease-in-out;
}

.my-theme-slider .swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.my-theme-slider .slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.my-theme-slider .slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 移除过渡效果，保持图片静态 */
  /* transition: transform 0.3s ease; */
}

/* 移除鼠标悬停放大效果，保持图片静态 */
/* .my-theme-slider .swiper-slide:hover .slide-image {
  transform: scale(1.05);
} */

.my-theme-slider .slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 40px 30px 30px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.my-theme-slider .swiper-slide-active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.my-theme-slider .slide-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 15px;
  line-height: 1.3;
}

.my-theme-slider .slide-button {
  display: inline-block;
  background: #007cba;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.my-theme-slider .slide-button:hover {
  background: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* 自定义导航箭头样式 */
.my-theme-slider .swiper-button-next,
.my-theme-slider .swiper-button-prev {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  cursor: pointer;
  pointer-events: auto;
}

.my-theme-slider .swiper-button-next:hover,
.my-theme-slider .swiper-button-prev:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #007cba;
}

.my-theme-slider .swiper-button-next::after,
.my-theme-slider .swiper-button-prev::after {
  display: none; /* 隐藏默认箭头，使用自定义SVG */
}

.my-theme-slider .swiper-button-next svg,
.my-theme-slider .swiper-button-prev svg {
  width: 24px;
  height: 24px;
  transition: color 0.3s ease;
}

/* 自定义分页器样式 */
.my-theme-slider .swiper-pagination {
  bottom: 20px;
  text-align: center;
}

.my-theme-slider .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 5px;
}

.my-theme-slider .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.my-theme-slider .swiper-pagination-bullet-active {
  background: white;
  transform: scale(1.3);
}

/* 无内容提示 */
.slider-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .my-theme-slider .swiper-button-next,
  .my-theme-slider .swiper-button-prev {
    width: 40px;
    height: 40px;
  }

  .my-theme-slider .swiper-button-next svg,
  .my-theme-slider .swiper-button-prev svg {
    width: 20px;
    height: 20px;
  }

  .my-theme-slider .slide-content {
    padding: 30px 20px 20px;
  }

  .my-theme-slider .slide-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .my-theme-slider .slide-button {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  .my-theme-slider .swiper-pagination {
    bottom: 15px;
  }

  .my-theme-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
}

@media (max-width: 480px) {
  .my-theme-slider .swiper-button-next,
  .my-theme-slider .swiper-button-prev {
    width: 35px;
    height: 35px;
  }

  .my-theme-slider .swiper-button-next svg,
  .my-theme-slider .swiper-button-prev svg {
    width: 18px;
    height: 18px;
  }

  .my-theme-slider .slide-content {
    padding: 20px 15px 15px;
  }

  .my-theme-slider .slide-title {
    font-size: 1.2rem;
  }

  .my-theme-slider .slide-button {
    padding: 8px 16px;
    font-size: 0.75rem;
  }
}

/* 主横幅轮播图特定样式 */
.main-banner-section .my-theme-slider {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  height: 870px !important;
  position: relative;
  z-index: 10;
}

/* 主横幅轮播图过渡效果增强 */
.main-banner-section .swiper-wrapper {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.main-banner-section .swiper-slide {
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-banner-section .slide-content {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  padding: 60px 80px 40px;
}

.main-banner-section .slide-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-banner-section .slide-button {
  background: #012699;
  padding: 15px 30px;
  font-size: 1rem;
  border-radius: 30px;
  text-transform: none;
  letter-spacing: normal;
}

.main-banner-section .slide-button:hover {
  background: #001a66;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(1, 38, 153, 0.4);
}

.main-banner-section .swiper-button-next,
.main-banner-section .swiper-button-prev {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 100 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.main-banner-section .swiper-pagination-bullet {
  width: 14px;
  height: 14px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  background: transparent;
}

.main-banner-section .swiper-pagination-bullet-active {
  background: #012699;
  border-color: #012699;
}

/* 主横幅响应式调整 */
@media (max-width: 1200px) {
  .main-banner-section .slide-content {
    padding: 50px 60px 30px;
  }

  .main-banner-section .slide-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .main-banner-section .slide-content {
    padding: 40px 30px 25px;
  }

  .main-banner-section .slide-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .main-banner-section .slide-button {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .main-banner-section .swiper-button-next,
  .main-banner-section .swiper-button-prev {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .main-banner-section .slide-content {
    padding: 30px 20px 20px;
  }

  .main-banner-section .slide-title {
    font-size: 1.5rem;
  }

  .main-banner-section .slide-button {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* 加载状态 */
.my-theme-slider:not(.swiper-initialized) {
  background: #f8f9fa;
}

.my-theme-slider:not(.swiper-initialized)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #dee2e6;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 可访问性支持 */
.my-theme-slider:focus-within .swiper-button-prev,
.my-theme-slider:focus-within .swiper-button-next,
.my-theme-slider:focus-within .swiper-pagination-bullet {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* 减少动画的用户偏好支持 */
@media (prefers-reduced-motion: reduce) {
  .my-theme-slider .slide-content,
  .my-theme-slider .slide-image,
  .my-theme-slider .swiper-button-prev,
  .my-theme-slider .swiper-button-next,
  .my-theme-slider .swiper-pagination-bullet,
  .my-theme-slider .slide-button,
  .my-theme-slider .swiper-slide {
    transition: none !important;
  }

  .my-theme-slider .swiper-wrapper {
    transition-duration: 0ms !important;
  }
}
