/**
 * 区域 2：首屏 Hero 大图轮播 (Global Maglev Door Manufacturer Hero Carousel)
 * 严格按照 区域2-全球磁悬浮自动门专业智造商 效果图设计
 * 包含 4 帧轮播（源头工厂、设计、证书、案例），淡入淡出过渡，两侧箭头
 */

.hero-carousel {
  position: relative;
  width: 100%;
  /* 固定 600px 在矮屏笔记本/横屏手机上会占掉整个首屏；
     clamp 让高度随视口缩放，同时保持上下限，避免轮播切换时「呼吸」 */
  height: clamp(480px, 66vh, 620px);
  overflow: hidden;
  background-color: #0b1120;
}

/* 轮播帧通用样式 */
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  z-index: 1;
}

/* 在 Banner 背景上叠加浅半透明黑色暗阶遮罩，确保大楼等浅色背景上文字对比度极佳 */
.hero-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

/* 帧 1 的黑色遮罩只覆盖上方图片区域，避免压暗底部 126px 浅灰数据带 */
.hero-slide--factory::before {
  height: calc(100% - 126px);
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Slide 1 - 源头工厂 */
.hero-slide--factory {
  background-image: url("../images/slices/区域2-全球磁悬浮自动门专业智造商/设计元素-源头工厂背景图.webp");
  padding-bottom: 126px; /* 留出底部 126px 数据带空间，使上方正文垂直居中于 474px 空间 */
}

/* Slide 2 - 设计方案 */
.hero-slide--design {
  background-image: url("../images/slices/区域2-全球磁悬浮自动门专业智造商/设计元素-背景.webp");
}

/* Slide 3 - 权威证书 */
.hero-slide--cert {
  background-image: url("../images/slices/区域2-全球磁悬浮自动门专业智造商/设计元素-证书背景.webp");
}

/* Slide 4 - 经典案例 */
.hero-slide--case {
  background-image: url("../images/slices/区域2-全球磁悬浮自动门专业智造商/设计元素-案例背景.webp");
}

/* Slide 文字内容区 */
.hero-slide__content {
  position: relative;
  z-index: 2;
  color: var(--color-text-white);
  max-width: 650px;
}

.hero-slide__eyebrow {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 2px;
  color: #38bdf8; /* 高对比度浅天蓝眉题 */
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-slide__title {
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  /* 用户放大字号或翻译文案变长时宁可省略结尾，也不让文字溢出被 overflow 直接切掉 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-slide__desc {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hero-slide__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 帧 1 专属：源头工厂 4 项实力数据底部展示带 (Hero Bottom Features Bar) */
.hero-factory-features {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 126px;
  background-color: #efedee; /* 接近目标效果图的浅灰色 */
  z-index: 5;
  display: flex;
  align-items: center;
}

.hero-factory-features__inner {
  width: min(1600px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  position: relative;
  padding: 0 12px;
}

/* 在第 2、3、4 项左侧分别绘制一条青绿色竖向分隔线 */
.hero-feature-item + .hero-feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 70px;
  background-color: #007865;
  opacity: 0.85;
}

.hero-feature-item img {
  height: 68px; /* 桌面端接近 67~69px */
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #007865; /* 深青绿色 */
  line-height: 1.15;
}

.hero-feature-value {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* "远销100+国家" 使用略小字号，保持视觉舒适 */
.hero-feature-item:nth-child(4) .hero-feature-value {
  font-size: 32px;
}

.hero-feature-label {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
}

/* 轮播两侧半透明箭头 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: rgba(0, 0, 0, 0.45);
  color: var(--color-text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
  font-size: 24px;
}

.hero-arrow:hover {
  background-color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.hero-arrow--prev {
  left: 32px;
}

.hero-arrow--next {
  right: 32px;
}

/* 响应式适配 */
@media (max-width: 1440px) {
  .hero-feature-item img {
    height: 60px;
  }
  .hero-feature-value {
    font-size: 32px;
  }
  .hero-feature-item:nth-child(4) .hero-feature-value {
    font-size: 27px;
  }
  .hero-feature-label {
    font-size: 19px;
  }
  .hero-feature-item + .hero-feature-item::before {
    height: 60px;
  }
}

@media (max-width: 1023px) {
  .hero-carousel {
    height: clamp(440px, 60vh, 520px);
  }
  .hero-slide--factory {
    padding-bottom: 110px;
  }
  .hero-slide--factory::before {
    height: calc(100% - 110px);
  }
  .hero-factory-features {
    height: 110px;
  }
  .hero-slide__title {
    font-size: 2.25rem;
  }
  .hero-feature-item {
    gap: 10px;
    padding: 0 6px;
  }
  .hero-feature-item img {
    height: 48px;
  }
  .hero-feature-value {
    font-size: 25px;
  }
  .hero-feature-item:nth-child(4) .hero-feature-value {
    font-size: 21px;
  }
  .hero-feature-label {
    font-size: 15px;
  }
  .hero-feature-item + .hero-feature-item::before {
    height: 48px;
  }
}

@media (max-width: 768px) {
  .hero-carousel {
    height: clamp(460px, 64vh, 560px);
  }
  .hero-slide--factory {
    padding-bottom: 150px;
  }
  .hero-slide--factory::before {
    height: calc(100% - 150px);
  }
  .hero-factory-features {
    height: 150px;
    padding: 12px 16px;
  }
  .hero-factory-features__inner {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
  }
  .hero-feature-item {
    justify-content: flex-start;
    padding: 0 8px;
    gap: 10px;
  }
  /* 移动端隐藏竖向分隔线 */
  .hero-feature-item + .hero-feature-item::before {
    display: none;
  }
  .hero-feature-item img {
    height: 44px;
  }
  .hero-feature-value {
    font-size: 20px;
  }
  .hero-feature-item:nth-child(4) .hero-feature-value {
    font-size: 18px;
  }
  .hero-feature-label {
    font-size: 14px;
    margin-top: 2px;
  }
  .hero-slide__title {
    font-size: 1.75rem;
  }
  .hero-slide__desc {
    font-size: var(--font-size-base);
  }
  .hero-arrow {
    width: 44px;
    height: 44px;
  }
  .hero-arrow--prev {
    left: 12px;
  }
  .hero-arrow--next {
    right: 12px;
  }
}

@media (max-width: 375px) {
  .hero-carousel {
    height: clamp(440px, 68vh, 580px);
  }
  .hero-slide--factory {
    padding-bottom: 160px;
  }
  .hero-slide--factory::before {
    height: calc(100% - 160px);
  }
  .hero-factory-features {
    height: 160px;
    padding: 10px 8px;
  }
  .hero-factory-features__inner {
    gap: 8px 8px;
  }
  .hero-feature-item img {
    height: 38px;
  }
  .hero-feature-value {
    font-size: 17px;
  }
  .hero-feature-item:nth-child(4) .hero-feature-value {
    font-size: 15px;
  }
  .hero-feature-label {
    font-size: 12px;
  }
}

/* 横屏矮屏（如 667×375 手机）：首屏只保留标题与行动按钮，隐藏数据带。
   否则 600px 级高度会把整个视口占满，用户要滚很久才能看到下一节。 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-carousel {
    height: 100vh;
    min-height: 300px;
  }
  .hero-slide--factory {
    padding-bottom: 0;
  }
  .hero-slide--factory::before {
    height: 100%;
  }
  .hero-factory-features {
    display: none;
  }
  .hero-slide__title {
    font-size: 1.5rem;
  }
  .hero-slide__desc {
    font-size: 0.875rem;
    margin-bottom: 16px;
  }
}
