/* ============================================
   ERGO 360 KOL Section Styles
   精简版：仅保留动画、渐变、状态切换等必要样式
   布局样式已通过 Tailwind 实现
   ============================================ */

/* ============================================
   入场动画初始状态 - GSAP 控制
   ============================================ */
.ergo-360-kol__title,
.ergo-360-kol__accordion,
.ergo-360-kol__mobile-scroll,
.ergo-360-kol__award-item,
.ergo-360-kol__quotes {
  opacity: 0;
}

/* ============================================
   KOL Card - Flex 布局（收起固定宽度，展开自适应）
   ============================================ */
.ergo-360-kol__card {
  flex: 0 0 auto;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 展开状态：自动填充剩余空间 */
.ergo-360-kol__card[data-active="true"] {
  flex: 1 1 auto;
  cursor: default;
  min-width: 0;
}

/* md (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .ergo-360-kol__card { width: 160px; }
}

/* lg (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ergo-360-kol__card { width: 180px; }
}

/* xl (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
  .ergo-360-kol__card { width: 210px; }
}

/* 2xl (1536px+) */
@media (min-width: 1536px) {
  .ergo-360-kol__card { width: 235px; }
}

/* ============================================
   Video/Poster 状态切换
   ============================================ */
.ergo-360-kol__video {
  transition: opacity 0.3s ease;
}

.ergo-360-kol__card[data-active="true"] .ergo-360-kol__video {
  opacity: 1;
}

.ergo-360-kol__poster-wrap {
  transition: opacity 0.3s ease;
}

.ergo-360-kol__card[data-active="true"] .ergo-360-kol__poster-wrap {
  opacity: 0;
  pointer-events: none;
}

/* Play Icon hover */
.ergo-360-kol__play-icon {
  transition: transform 0.3s ease;
}

.ergo-360-kol__overlay:hover .ergo-360-kol__play-icon {
  transform: scale(1.1);
}

/* ============================================
   Info Panel - 展开/收起动画 + 自适应宽度
   ============================================ */
.ergo-360-kol__info {
  transition:
    opacity 0.3s ease 0.2s,
    transform 0.3s ease 0.2s,
    flex 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .ergo-360-kol__info {
    transform: translateX(20px);
    flex: 0 0 0;
    width: 0;
    overflow: hidden;
  }

  .ergo-360-kol__card[data-active="true"] .ergo-360-kol__info {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  /* 内层容器：固定最小宽度，防止过渡时文字被挤压 */
  .ergo-360-kol__info-inner {
    min-width: 200px;
    width: 100%;
  }
}

/* lg (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ergo-360-kol__info-inner { min-width: 240px; }
}

/* xl (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
  .ergo-360-kol__info-inner { min-width: 280px; }
}

/* 2xl (1536px+) */
@media (min-width: 1536px) {
  .ergo-360-kol__info-inner { min-width: 320px; }
}

/* 移动端：高度展开动画 */
@media (max-width: 767px) {
  .ergo-360-kol__media {
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ergo-360-kol__card[data-active="true"] .ergo-360-kol__media {
    height: 280px;
  }

  .ergo-360-kol__card[data-active="true"] .ergo-360-kol__info {
    opacity: 1;
    max-height: 300px;
    pointer-events: auto;
  }
}

/* ============================================
   Quote Slider - 滑动白色背景（响应式）
   ============================================ */
.ergo-360-kol__quote-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #ffffff;
  border-radius: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
  /* 默认 2xl 尺寸 */
  width: 170px;
  height: 76px;
}

/* xl (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
  .ergo-360-kol__quote-slider { width: 150px; height: 64px; }
}

/* lg (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ergo-360-kol__quote-slider { width: 130px; height: 56px; }
}

/* md (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .ergo-360-kol__quote-slider { width: 110px; height: 48px; }
}

/* 移动端隐藏滑块 */
@media (max-width: 767px) {
  .ergo-360-kol__quote-slider {
    display: none !important;
  }

  .ergo-360-kol__quote-btn.is-active {
    background: #fff;
  }
}

/* ============================================
   Quote Button - 图片切换（叠加 + opacity 方式，避免闪烁）
   ============================================ */
.ergo-360-kol__quote-btn {
  transition: background 0.3s ease;
  position: relative;
}

.ergo-360-kol__quote-btn:hover {
  opacity: 0.8;
}

/* 图片容器：相对定位，用于叠加两张图片 */
.ergo-360-kol__quote-btn-images {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 两张图片叠加：active 图片绝对定位在 inactive 图片上方 */
.ergo-360-kol__quote-btn img.is-inactive-img {
  display: block;
  position: relative;
  z-index: 1;
}

.ergo-360-kol__quote-btn img.is-active-img {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* 激活状态：通过 opacity 切换，无闪烁 */
.ergo-360-kol__quote-btn.is-active img.is-inactive-img {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ergo-360-kol__quote-btn.is-active img.is-active-img {
  opacity: 1;
}

/* ============================================
   Quote Content - 显示/隐藏
   ============================================ */
.ergo-360-kol__quote-item {
  display: none;
}

.ergo-360-kol__quote-item.is-active {
  display: block;
}

/* ============================================
   Quote Gradient Text - 渐变文字
   ============================================ */
.ergo-360-kol__quote-gradient {
  background: linear-gradient(
    90deg,
    #0BD2E0 0%,
    #00ABE0 33%,
    #0085DD 66%,
    #1766E5 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Mobile Scroll - 隐藏滚动条
   ============================================ */
.ergo-360-kol__mobile-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.ergo-360-kol__mobile-scroll::-webkit-scrollbar {
  display: none;
}

/* ============================================
   Mobile Video - 播放状态切换
   ============================================ */
.ergo-360-kol__mobile-video {
  transition: opacity 0.3s ease;
}

.ergo-360-kol__mobile-poster-wrap {
  transition: opacity 0.3s ease;
}

.ergo-360-kol__mobile-play-icon {
  transition: transform 0.3s ease;
}

.ergo-360-kol__mobile-overlay:hover .ergo-360-kol__mobile-play-icon {
  transform: scale(1.1);
}

/* 移动端 Quote 按钮背景调整 */
@media (max-width: 767px) {
  .ergo-360-kol__quote-btn.is-active {
    background: #fff;
    border-radius: 8px;
  }
}
