/* ============================================================
   Hero Slider — 从 bundle.min.css 提取并重构
   使用 CSS 自定义属性适配网站设计系统
   ============================================================ */

/* ---------- 轮播容器 ---------- */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1320px;
  height: 600px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  z-index: 0;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  outline: none;
}

/* ---------- 单张幻灯片 ---------- */
.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 0;
}

.hero-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

/* ---------- 幻灯片背景 ---------- */
.hero-slider .slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slider .slide-bg img,
.hero-slider .slide-bg video {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 渐变遮罩（从下到上，提升文字可读性） ---------- */
.hero-slider .slide .slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
}

/* ---------- 幻灯片内容区 ---------- */
.hero-slider .slide-video .slide-content {
  display: none !important;
}

.hero-slider .slide-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 2rem;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
}

.hero-slider .slide-content .slide-content-inner {
  max-width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ---------- 标题 ---------- */
.hero-slider .slide-content h1,
.hero-slider .slide-content .hero-heading {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: block;
}

/* ---------- 副标题 ---------- */
.hero-slider .slide-content .hero-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.6;
}

/* ---------- 标签（仅第一张幻灯片） ---------- */
.hero-slider .slide-content .hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

/* ---------- 文本对齐 ---------- */
.hero-slider .slide-content.text-center {
  text-align: center;
  justify-content: center;
}

.hero-slider .slide-content.text-center .slide-content-inner {
  margin: 0 auto;
}

.hero-slider .slide-content.text-left,
.hero-slider .slide-content.text-start {
  text-align: left;
  justify-content: flex-start;
}

.hero-slider .slide-content.text-left .slide-content-inner,
.hero-slider .slide-content.text-start .slide-content-inner {
  margin: 40px auto;
}

.hero-slider .slide-content.text-right,
.hero-slider .slide-content.text-end {
  text-align: right;
  justify-content: flex-end;
}

.hero-slider .slide-content.text-right .slide-content-inner,
.hero-slider .slide-content.text-end .slide-content-inner {
  margin: 40px auto;
}

.hero-slider .slide-content.text-center .slide-buttons {
  justify-content: center;
}

.hero-slider .slide-content.text-left .slide-buttons,
.hero-slider .slide-content.text-start .slide-buttons {
  justify-content: flex-start;
}

.hero-slider .slide-content.text-right .slide-buttons,
.hero-slider .slide-content.text-end .slide-buttons {
  justify-content: flex-end;
}

/* ---------- 按钮组 ---------- */
.slide-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}

/* 主按钮 */
.hero-slider .slide-content .btn-hero-primary {
  padding: 12px 30px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  min-width: 130px !important;
  text-align: center !important;
  border: none !important;
  background-color: var(--accent, #0066cc) !important;
  color: #fff !important;
  line-height: 1.5 !important;
  height: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.hero-slider .slide-content .btn-hero-primary:hover {
  background-color: var(--accent-dark, #0055aa) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 描边按钮 */
.hero-slider .slide-content .btn-hero-outline {
  padding: 12px 30px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  min-width: 130px !important;
  text-align: center !important;
  background: transparent !important;
  color: #fff !important;
  line-height: 1.5 !important;
  height: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

.hero-slider .slide-content .btn-hero-outline:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: #fff !important;
  color: #fff !important;
}

/* 白底按钮（兼容旧样式） */
.hero-slider .slide-content .btn-white {
  background-color: #fff;
  color: var(--bg-dark, #2C2824);
  font-weight: bold;
  padding: 12px 30px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.hero-slider .slide-content .btn-white:hover {
  background-color: #f0f0f0;
}

/* ---------- 条件显示：仅第一张/非第一张 ---------- */
.hero-slider .slide-first-only { display: none !important; }
.hero-slider .slide.active .slide-first-only { display: revert !important; }
.hero-slider .slide-not-first { display: none !important; }
.hero-slider .slide.active .slide-not-first { display: revert !important; }

/* 空按钮文本自动隐藏 */
.hero-slider .slide-btn-visible { }
.hero-slider .slide-btn-visible[href=""],
.hero-slider .slide-btn-visible[href*="slide:btn"],
.hero-slider .slide-btn-visible:empty { display: none; }

/* ---------- 前后切换按钮 ---------- */
.hero-slider .slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
}

.hero-slider:hover .slider-btn {
  opacity: 1;
  visibility: visible;
}

.hero-slider .slider-btn.prev {
  left: 20px;
}

.hero-slider .slider-btn.next {
  right: 20px;
}

.hero-slider .slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: #fff;
}

/* ---------- 圆点指示器 ---------- */
.hero-slider .slider-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}

.hero-slider .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.hero-slider .dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero-slider .dot.active {
  background: #fff;
  width: 30px;
  border-radius: 5px;
}

/* ---------- 认证徽章（跟随文本对齐方式） ---------- */
.hero-slider .cert-overlay {
  z-index: 5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* 居中时居左对齐徽章（居中对齐按钮后的徽章组也居中） */
.hero-slider .slide-content.text-center .cert-overlay {
  justify-content: center;
}

/* 右对齐时 */
.hero-slider .slide-content.text-right .cert-overlay,
.hero-slider .slide-content.text-end .cert-overlay {
  justify-content: flex-end;
}

/* 靠左时（默认） */
.hero-slider .slide-content.text-left .cert-overlay,
.hero-slider .slide-content.text-start .cert-overlay {
  justify-content: flex-start;
}

.hero-slider .cert-overlay .cert-badge {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- 视频播放按钮 ---------- */
.hero-slider .video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slider .video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.hero-slider .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s;
}

.hero-slider .play-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero-slider .play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.hero-slider .play-button.hidden {
  display: none;
}

/* ---------- 内容淡入动画 ---------- */
.slide-content .hero-heading,
.slide-content .hero-subtitle,
.slide-content .hero__label,
.slide-content .slide-buttons {
  opacity: 0;
  transform: translateY(20px);
  animation: slideContentFadeUp 0.6s ease forwards;
}

.slide-content .hero__label { animation-delay: 0.1s; }
.slide-content .hero-heading { animation-delay: 0.3s; }
.slide-content .hero-subtitle { animation-delay: 0.5s; }
.slide-content .slide-buttons { animation-delay: 0.7s; }

@keyframes slideContentFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 非激活幻灯片禁用动画 */
.slide:not(.active) .slide-content * {
  animation: none !important;
  opacity: 0 !important;
}

/* ============================================================
   Video Modal — 视频弹窗及自定义控件
   ============================================================ */
.video-modal {
  display: none;
  position: fixed;
  z-index: 99999999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.video-modal.show {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 80%;
  max-width: 1000px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-modal-content video {
  max-width: 100%;
  height: auto;
  display: block;
}

.video-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-modal-close:hover {
  color: #ccc;
}

/* ---------- 自定义视频控件 ---------- */
.custom-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-modal-content:hover .custom-controls,
.custom-controls:hover {
  opacity: 1;
}

.play-pause-btn,
.fullscreen-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-display {
  color: #fff;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress {
  height: 100%;
  background: #fff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s;
}

/* ---------- 隐藏原生视频控件（WebKit / Firefox） ---------- */
.video-modal-content video::-webkit-media-controls,
.video-modal-content video::-webkit-media-controls-enclosure,
.video-modal-content video::-webkit-media-controls-panel,
.video-modal-content video::-webkit-media-controls-play-button,
.video-modal-content video::-webkit-media-controls-volume-slider,
.video-modal-content video::-webkit-media-controls-mute-button,
.video-modal-content video::-webkit-media-controls-timeline,
.video-modal-content video::-webkit-media-controls-current-time-display,
.video-modal-content video::-webkit-media-controls-time-remaining-display,
.video-modal-content video::-webkit-media-controls-fullscreen-button,
.video-modal-content video::-webkit-media-controls-seek-back-button,
.video-modal-content video::-webkit-media-controls-seek-forward-button,
.video-modal-content video::-webkit-media-controls-rewind-button,
.video-modal-content video::-webkit-media-controls-toggle-closed-captions-button,
.video-modal-content video::-webkit-media-controls-overlay-play-button,
.video-modal-content video::-webkit-media-controls-start-playback-button,
.video-modal-content video::-internal-media-controls-button-panel,
.video-modal-content video::-internal-media-controls-lower-resolution-backdrop,
.video-modal-content video::-internal-media-controls-overflow-menu-list,
.video-modal-content video::-internal-media-controls-overflow-menu-item,
.video-modal-content video::cue {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.video-modal-content video {
  -moz-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
}

.video-modal-content video::-webkit-media-controls-group {
  display: none !important;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 991.98px) {
  .hero-slider .slide-content h1,
  .hero-slider .slide-content h2.hero-heading,
  .hero-slider .slide-content .hero-heading {
    font-size: 1.8rem;
  }

  .hero-slider .slide-content .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-slider .cert-overlay {
    gap: 8px;
  }
}

@media (max-width: 767.98px) {
  .hero-slider {
    width: 100%;
    height: 400px;
    margin: 20px auto;
    border-radius: 8px;
  }

  .hero-slider .slide-content {
    padding: 1.5rem;
  }

  .hero-slider .slide-content h1,
  .hero-slider .slide-content h2.hero-heading,
  .hero-slider .slide-content .hero-heading {
    font-size: 1.3rem;
  }

  .hero-slider .slide-content .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* 移动端隐藏前后箭头 */
  .hero-slider .slider-btn {
    display: none !important;
  }

  .slide-buttons {
    gap: 10px;
  }

  .hero-slider .slide-content .btn-hero-primary,
  .hero-slider .slide-content .btn-hero-outline {
    padding: 10px 20px !important;
    font-size: 13px !important;
    min-width: 110px !important;
  }

  .hero-slider .cert-overlay {
    gap: 8px;
  }

  .hero-slider .cert-overlay .cert-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }

  .video-modal-content {
    width: 95%;
  }

  .custom-controls {
    gap: 8px;
    padding: 10px 12px;
  }

  .time-display {
    font-size: 12px;
    min-width: 70px;
  }
}

@media (max-width: 575.98px) {
  .hero-slider .slide-content h1,
  .hero-slider .slide-content h2.hero-heading,
  .hero-slider .slide-content .hero-heading {
    font-size: 1.3rem;
  }

  .hero-slider .slide-content .hero__label {
    font-size: 0.65rem;
    padding: 0.25rem 0.75rem;
  }

  .hero-slider .slider-dots {
    bottom: 15px;
    gap: 8px;
  }

  .hero-slider .dot {
    width: 8px;
    height: 8px;
  }

  .hero-slider .dot.active {
    width: 24px;
  }
}