/*
 * @pageName: yawei_company_video
 * @Date: 2025-05-29
 * @Author: yangheng
 * @Description: 公司介绍视频样式 - 视频滚动上来效果
 */

/* 新增：滚动轨道容器 */
.yawei-company-video-scroll-track {
  position: relative;
  width: 100%;
  height: 200vh; /* 动画总滚动行程：100vh视频 + 100vh额外滚动 */
  background: #ffffff; /* 或者与页面背景一致 */
}

/* 修改：yawei-company-video-block 现在是粘性内容块 */
.yawei-company-video-block {
  position: sticky; /* 关键：设置为粘性定位 */
  top: 0;           /* 粘在滚动轨道父元素的顶部 */
  width: 100%;
  height: 100vh;    /* 实际内容高度，始终是100vh */
  background: #ffffff; /* 可选，如果scroll-track有背景则可能不需要 */
  overflow: hidden; /* 裁剪内部动画元素 */
  /* 移除之前的 transition 和特定高度/margin 设置 */
}

/* 修改：video-pin-container 现在是粘性块的子容器 */
.yawei-company-video-block .video-pin-container {
  position: relative; /* 或 absolute，取决于内部布局需求 */
  width: 100%;
  height: 100vh;    /* 填满粘性的父块 .yawei-company-video-block */
  /* background: #ffffff; */ /* 背景现在由父块或轨道控制 */
  z-index: 10;
  /* overflow: hidden; */ /* overflow 现在由 .yawei-company-video-block 控制 */
}

.yawei-company-video-block .video-content-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* 调整为100vh，因为其父级是100vh */
  background: #ffffff;
}

/* 桌面端结构 - 默认显示 */
.yawei-company-video-block .desktop-content {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  display: block;
}

/* 移动端结构 - 默认隐藏 */
.yawei-company-video-block .mobile-content {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  display: none;
}

.yawei-company-video-block .container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100vh; /* 保持100vh，用于标题居中定位 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.yawei-company-video-block .title-wrapper {
  text-align: center;
  color: var(--title-color);
  transform-origin: center center;
  z-index: 100;
  position: relative;
  transform: scale(1);
  opacity: 0.5;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  backface-visibility: hidden;
}

.yawei-company-video-block .company-title {
  font-family: var(--title-font-family);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.1;
  margin: 0 0 1rem 0;
  word-break: break-word;
  color: #E6002D;
}

.yawei-company-video-block .company-subtitle {
  font-family: var(--title-font-family);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 400;
  color: inherit;
  margin: 0;
  line-height: 1.4;
  opacity: 0.8;
}

.yawei-company-video-block .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  z-index: 10;
  backface-visibility: hidden;
}

/* 视频上方的渐变过渡遮罩 */
.yawei-company-video-block .video-gradient-mask {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 45vh;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
  backface-visibility: hidden;
}

.yawei-company-video-block .background-video {
  position: absolute;
  top: 0;
     left: 13%;
    width: 73vw;
    height: 100vh
  object-fit: cover;
  z-index: 5;
  opacity: 1;
  transition: none;
  backface-visibility: hidden;
}

/* 移动端视频封面样式 */
.yawei-company-video-block .mobile-video-wrapper {
  position: relative;
  width:100%;
  height: 100vh;
  z-index: 500;
}

.yawei-company-video-block .video-cover {
  position: relative;
  width:100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  z-index: 510;
}

.yawei-company-video-block .video-cover > a {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.yawei-company-video-block .cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: all 0.3s ease;
}

.yawei-company-video-block .video-cover > a:hover .cover-image {
  transform: scale(1.03);
}

.yawei-company-video-block .cover-placeholder {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 18px;
  transition: all 0.3s ease;
}

.yawei-company-video-block .video-cover > a:hover .cover-placeholder {
  transform: scale(1.03);
  background: #e8e8e8;
}

.yawei-company-video-block .play-button {
  position: absolute;
  z-index: 10;
  left: calc(50% - 55px);
  top: calc(50% - 55px);
  width: 110px;
  height: 110px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--color-primary, #E6002D);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: none; /* 让点击事件传递给父级a标签 */
}

.yawei-company-video-block .play-button::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  background: var(--color-primary, #E6002D);
  opacity: 0.4;
  animation: playButtonPulse1 2s linear infinite;
}

.yawei-company-video-block .play-button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  background: var(--color-primary, #E6002D);
  opacity: 0.2;
  animation: playButtonPulse2 2s linear infinite;
}

.yawei-company-video-block .play-icon {
  font-size: 45px;
  color: white;
  position: relative;
  z-index: 10;
  font-style: normal;
  pointer-events: none;
}

@keyframes playButtonPulse1 {
  from {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
  to {
    transform: scale(1);
  }
}

@keyframes playButtonPulse2 {
  from {
    transform: scale(1);
  }
  50% {
    transform: scale(1.8);
  }
  to {
    transform: scale(1);
  }
}

/* 响应式设计：移动端显示移动端结构，隐藏桌面端结构 */
@media screen and (max-width: 1024px) {
  .yawei-company-video-scroll-track {
    height: auto; /* 移动端不需要复杂的滚动动画行程 */
    background: transparent; /* 或者与 mobile-content 背景一致 */
  }
  .yawei-company-video-block {
    position: relative; /* 移动端不再需要sticky */
    height: auto; /* 整体块高度也自适应 */
  }
  .yawei-company-video-block .desktop-content {
    display: none;
  }
  .yawei-company-video-block .mobile-content {
    display: block;
    height: auto; /* 让mobile-content高度自适应 */
  }
  .yawei-company-video-block .video-pin-container {
    height: auto; /* pin容器也自适应 */
  }
  .yawei-company-video-block .video-content-wrapper {
      height: auto; /* wrapper也自适应 */
  }
  .yawei-company-video-block .container {
    height: auto; /* 标题容器如果不再需要垂直居中于100vh，也可以auto */
    padding-top: 40px; /* 为标题提供一些顶部空间 */
    padding-bottom: 20px;
    min-height: 0; /* 覆盖可能存在的min-height */
  }

  /* 针对移动端视频封面区域 */
  .yawei-company-video-block .mobile-video-wrapper {
    height: auto; /* 关键：允许视频/封面区域高度自适应 */
  }
  .yawei-company-video-block .video-cover {
    position: relative; /* 保持相对定位 */
    width: 100%;
    height: auto;    /* 关键：让封面高度由内容决定 */
    background: #000; /* 背景色可以保留 */
  }
  .yawei-company-video-block .video-cover > a {
    display: block;
    position: relative; 
    line-height: 0; /* 清除潜在的图片底部间隙 */
  }
  .yawei-company-video-block .cover-image {
    width: 100%;
    height: auto;     /* 关键：图片高度自适应 */
    max-width: 100%;  /* 确保图片响应式 */
    object-fit: cover; /* 或 contain，取决于想要的图片显示方式 */
    display: block;
  }
  /* 播放按钮原有样式会使其叠加在图片上，无需大改 */

  .yawei-company-video-block .company-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    letter-spacing: 0.05em;
  }
  
  .yawei-company-video-block .company-subtitle {
    font-size: clamp(0.8rem, 3vw, 1rem);
  }
  
  .yawei-company-video-block .play-button {
    left: calc(50% - 35px);
    top: calc(50% - 35px);
    width: 70px;
    height: 70px;
    z-index: 15;
    position: absolute;
  }
  
  .yawei-company-video-block .play-icon {
    font-size: 28px;
    z-index: 15;
  }
}

@media screen and (max-width: 768px) {
  .yawei-company-video-block .play-button {
    left: calc(50% - 30px);
    top: calc(50% - 30px);
    width: 60px;
    height: 60px;
    z-index: 15;
    position: absolute;
  }
  
  .yawei-company-video-block .play-icon {
    font-size: 24px;
    z-index: 15;
  }
}

@media screen and (max-width: 480px) {
  .yawei-company-video-block .company-title {
    font-size: clamp(1.2rem, 8vw, 2rem);
    margin-bottom: 0.5rem;
  }
  
  .yawei-company-video-block .company-subtitle {
    font-size: clamp(0.7rem, 4vw, 0.9rem);
  }
  .yawei-company-video-block .play-button{
    width: 50px;
    height: 50px;
    left: calc(50% - 25px);
    top: calc(50% - 25px);
  }
  .mobile-content .play-button .play-icon{
    font-size: 22px;
  }
}

.yawei-company-video {
  padding: 80px 0;
  background-color: var(--bg-color);
}

.mobile-content .play-button .play-icon {
  font-size: 26px;
  color: #fff;
}

/* 移动端视频标题样式 */
.mobile-content .mobile-video-title {
  position: absolute;
  width: 100%;
  text-align: center;
  left: 0;
  top: 58%;
  font-family: var(--title-font-family);
  font-size: 32px;
  color: #E6002D;
  text-align: center;
  margin-top: 20px;
  padding: 0 15px;
}

/* 确保移动端标题在小屏幕上也能良好展示 */
@media (max-width: 576px) {
  .mobile-content .mobile-video-title {
    font-size: 24px;
    margin-top: 15px;
  }
}