/* ============================================
   Hero 区域和内容 Slides 样式
   ============================================ */

/* 图片加载性能优化 */
.et-hero-tabs,
.et-slide {
  backface-visibility: hidden;
}

/* 全屏滚动模式 - 所有section固定定位并叠加 */
.et-hero-tabs,
.et-slide,
#et-fancy-footer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--app-viewport-height, 100vh);
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: transform;
  z-index: 2;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Hero区域滚动配置 - 垂直禁用，水平默认隐藏 */
.et-hero-tabs {
  overflow-y: hidden !important;
  overflow-x: hidden;
}

/* 禁用动画的辅助类 - 用于初始化时防止动画 */
.et-hero-tabs.no-transition,
.et-slide.no-transition,
#et-fancy-footer.no-transition {
  transition: none !important;
}

/* 激活状态的section显示在屏幕内 */
.et-hero-tabs.active,
.et-slide.active,
#et-fancy-footer.active {
  transform: translateY(0);
  z-index: 3;
}

/* 之前的section在上方 */
.et-hero-tabs.prev,
.et-slide.prev,
#et-fancy-footer.prev {
  transform: translateY(-100%);
  z-index: 2;
}

.et-hero-tabs {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(173, 216, 230, 0.25) 0%,    /* 淡蓝色 */
    rgba(216, 191, 216, 0.22) 25%,   /* 淡紫色 */
    rgba(175, 238, 238, 0.24) 50%,   /* 淡青色 */
    rgba(152, 251, 152, 0.20) 65%,   /* 淡绿色 */
    rgba(255, 228, 196, 0.18) 80%,   /* 淡橙色 */
    rgba(173, 216, 230, 0.25) 100%   /* 回到淡蓝色 */
  );
  background-size: 400% 400%;
  animation: colorfulGradient 20s ease-in-out infinite;
  text-align: center;
  padding: 0 2em;
  padding-top: 12vh;
  padding-bottom: 1vh;
  box-sizing: border-box;
  max-width: 100vw;
  gap: 2vh;
}

.et-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #eee;
  text-align: center;
  padding: 0 2em;
  box-sizing: border-box;
  max-width: 100vw;
}

.et-hero-tabs h1,
.et-slide h1 {
  font-size: 2rem;
  margin: 0;
  margin-bottom: 1rem;
  letter-spacing: 1rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 2;
  order: 1;
}

.et-hero-tabs h3,
.et-slide h3 {
  font-size: 1rem;
  margin: 0;
  letter-spacing: 0.3rem;
  opacity: 0.9;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 2;
  order: 2;
}

/* Hero区域文字颜色 - 适配灰白色背景 */
.et-hero-tabs h1 {
  color: #333;
  text-shadow: none;
}

.et-hero-tabs h3 {
  color: #666;
  text-shadow: none;
  opacity: 1;
}

/* 为每个内容区域添加不同的背景图片 */
#tab-es6 {
  background: url('../imgs/1.jpg') center center/cover no-repeat;
}

#tab-flexbox {
  background: url('../imgs/2.jpg') center center/cover no-repeat;
}

#tab-react {
  background: url('../imgs/3.jpg') center center/cover no-repeat;
}

#tab-angular {
  background: url('../imgs/4.jpg') center center/cover no-repeat;
}

#tab-other {
  background: url('../imgs/5.jpg') center center/cover no-repeat;
}

/* 为所有内容区域添加半透明遮罩层 */
.et-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Hero区域遮罩层 - 灰白色背景不需要遮罩 */
.et-hero-tabs::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* 灰白色背景不需要遮罩层 */
  z-index: 1;
}

/* 多彩渐变光晕动画 - 缓慢均匀移动 */
@keyframes colorfulGradient {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 75%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 25%;
  }
  100% {
    background-position: 0% 50%;
  }
}
