/* Slider module styles extracted from template-parts/slider.php */

/* Hero Slider — visual spec to match reference */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
}

/* Visibility Utilities for Independent Sliders */
.slider-pc-only {
  display: block;
}

.slider-mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .slider-pc-only {
    display: none;
  }

  .slider-mobile-only {
    display: block;
  }
}

/* 当导航栏吸顶时,为轮播图添加上边距 */
body:has(header.sticky-header) .slider-wrapper {
  margin-top: 80px;
}

.main-slider {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide-image::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Deep blue gradient overlay like the reference */
  background: linear-gradient(180deg,
      rgba(13, 39, 84, 0.88) 0%,
      rgba(13, 39, 84, 0.78) 40%,
      rgba(13, 39, 84, 0.65) 100%);
  z-index: 1;
}

.slider-wrapper.slider-overlay-off .slide-image::after {
  display: none;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  padding: 20px;
  max-width: 1060px;
}

.slide-text-left {
  text-align: left;
  margin-right: auto;
}

.slide-text-center {
  text-align: center;
  margin: 0 auto;
}

.slide-text-right {
  text-align: right;
  margin-left: auto;
}

.slide-title {
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.15;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
  font-size: 52px;
}

.slide-desc {
  font-size: 20px;
  margin: 0 auto 2.2rem;
  line-height: 1.9;
  opacity: 0.95;
  max-width: 980px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.slide-buttons {
  margin-top: 1.8rem;
  display: inline-flex;
  gap: 16px;
}

.slide-text-left .slide-buttons {
  justify-content: flex-start;
}

.slide-text-center .slide-buttons {
  justify-content: center;
}

.slide-text-right .slide-buttons {
  justify-content: flex-end;
}

/* Scope .btn styles to slider to avoid global side-effects */
.slider-wrapper .btn {
  display: inline-block;
  padding: 10px 24px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.slider-wrapper .btn-primary {
  background-color: var(--primary-blue, var(--primary-color, #1d5fbf));
  color: #fff;
}

.slider-wrapper .btn-primary:hover {
  background-color: var(--accent-yellow, #fdb913);
  color: #000 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.slider-wrapper .btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.slider-wrapper .btn-outline:hover {
  background: var(--accent-yellow, #fdb913);
  color: #000 !important;
}

/* Navigation arrows (no circular background) */
.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  background: transparent;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 16px;
}

/* Pagination */
.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .slider-wrapper {
    height: 420px;
  }

  .slide-text {
    padding: 15px;
  }

  .slide-title {
    font-size: 32px;
  }

  .slide-desc {
    font-size: 16px;
    margin-bottom: 1.4rem;
  }

  .slider-wrapper .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }

  body:has(header.sticky-header) .slider-wrapper {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .slider-wrapper {
    height: 340px;
  }

  .slide-text {
    padding: 10px;
  }

  .slide-title {
    font-size: 26px;
  }

  .slide-desc {
    font-size: 14px;
    margin-bottom: 1rem;
  }

  .slider-wrapper .btn {
    padding: 6px 16px;
    font-size: 0.84rem;
    border-radius: 4px;
  }
}