/* ===================================================================
   yanxue.css — 研学入口、课程海报矩阵、研学页面共享样式
   - 沿用 liquid-glass / collection-* 视觉骨架
   - DriftWall 概念（3D 透视 + 漂移 + hover 提亮）调亮版
   - 全程移动端适配
   =================================================================== */

/* ---------- 导航「研学」入口（薄荷绿，对比奶油白与霓虹绿） ---------- */
.nav-link--yanxue {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: #5CFFB6;
  background: linear-gradient(135deg, rgba(92, 255, 182, 0.14), rgba(92, 255, 182, 0.06));
  border: 1px solid rgba(92, 255, 182, 0.42);
  box-shadow: 0 8px 22px rgba(92, 255, 182, 0.18);
  letter-spacing: 0.08em;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.nav-link--yanxue::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #5CFFB6;
  box-shadow: 0 0 8px rgba(92, 255, 182, 0.9);
}
.nav-link--yanxue:hover,
.nav-link--yanxue:focus-visible,
.nav-link--yanxue.is-active {
  color: #f8fff5;
  background: linear-gradient(135deg, rgba(92, 255, 182, 0.36), rgba(92, 255, 182, 0.14));
  border-color: rgba(200, 255, 220, 0.85);
  transform: translateY(-1px);
}

/* ---------- 研学页面 hero ---------- */
.yx-hero {
  position: relative;
  min-height: clamp(640px, 92vh, 980px);
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  isolation: isolate;
}
.yx-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.1) brightness(1.02);
}
.yx-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 8, 40, 0.22) 0%, rgba(1, 8, 40, 0.18) 42%, rgba(1, 8, 40, 0.52) 100%),
    radial-gradient(circle at 80% 18%, rgba(92, 255, 182, 0.14), transparent 36%),
    linear-gradient(90deg, rgba(1, 8, 40, 0.42) 0%, rgba(1, 8, 40, 0.06) 52%, rgba(1, 8, 40, 0.34) 100%);
}
.yx-hero__container {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 1.3rem clamp(3rem, 6vw, 5rem);
}
.yx-hero__copy { padding-bottom: clamp(1rem, 4vw, 2.5rem); }
.yx-hero__eyebrow {
  display: inline-block;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  color: #5CFFB6;
  letter-spacing: 0.04em;
}
.yx-hero__title {
  margin: 0.4rem 0 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  color: var(--cream);
  text-shadow: 0 0 32px rgba(92, 255, 182, 0.18);
}
.yx-hero__title em {
  font-style: normal;
  color: #5CFFB6;
}
.yx-hero__tagline {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: rgba(239, 244, 255, 0.76);
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  line-height: 1.8;
}
.yx-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- 区域段（武汉 / 深珠港） ---------- */
.yx-region {
  padding: clamp(4rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.yx-region + .yx-region { padding-top: clamp(2rem, 4vw, 3rem); }
.yx-region__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 880px) {
  .yx-region__header { flex-direction: row; align-items: flex-end; }
}
.yx-region__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: rgba(239, 244, 255, 0.66);
}
.yx-region__title {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 0.98;
  color: var(--cream);
}
.yx-region__title em {
  font-style: normal;
  color: #5CFFB6;
}
.yx-region__lede {
  max-width: 32rem;
  margin: 0;
  color: rgba(239, 244, 255, 0.66);
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  line-height: 1.85;
}
.yx-region__chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.yx-region__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #5CFFB6;
  background: rgba(92, 255, 182, 0.08);
  border: 1px solid rgba(92, 255, 182, 0.24);
}

/* ---------- 图片展示区：DriftWall 双排反向滚动（慢速·悬停暂停·无缝循环） ---------- */
.yx-gallery {
  position: relative;
  margin: 0 0 clamp(2.5rem, 4vw, 3.5rem);
  --dw-tile-w: clamp(200px, 18vw, 240px);
  --dw-tile-h: calc(var(--dw-tile-w) * 1.333);
  --dw-gap: 14px;
  --dw-radius: 18px;
  --dw-speed: 10s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 30%, rgba(92, 255, 182, 0.06), transparent 60%),
    var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.yx-gallery--szg { --dw-speed: 18s; }


/* Live 闪烁指示器（视觉提示 DriftWall 在滚动） */
.yx-gallery::before {
  content: "●  LIVE";
  position: absolute;
  top: 14px;
  right: 18px;
  width: auto;
  height: 26px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: rgba(92, 255, 182, 0.28);
  color: #5CFFB6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(92, 255, 182, 0.6);
  box-shadow: 0 0 20px rgba(92, 255, 182, 0.45), inset 0 0 12px rgba(92, 255, 182, 0.18);
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(92, 255, 182, 0.5);
}
.yx-gallery::after {
  content: "";
  position: absolute;
  top: 21px;
  right: 26px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #5CFFB6;
  box-shadow: 0 0 10px #5CFFB6;
  z-index: 5;
  animation: yx-live-pulse 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes yx-live-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}
.yx-gallery__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--dw-gap);
  width: max-content;
  will-change: transform;
}
.yx-gallery__row--forward {
  animation: yx-row-forward var(--dw-speed) linear infinite;
}
.yx-gallery__row--reverse {
  animation: yx-row-reverse var(--dw-speed) linear infinite;
}
.yx-gallery:hover .yx-gallery__row--forward,
.yx-gallery:hover .yx-gallery__row--reverse { animation-play-state: paused; }

@keyframes yx-row-forward {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes yx-row-reverse {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .yx-gallery__row { animation: none !important; }
}

.drift-wall__tile {
  position: relative;
  flex: 0 0 auto;
  width: var(--dw-tile-w);
  height: var(--dw-tile-h);
  outline: none;
  cursor: zoom-in;
}
.drift-wall__inner {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: var(--dw-radius);
  overflow: hidden;
  background: #1c2150;
  filter: saturate(1.08) brightness(1.04);
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.55);
}
.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.drift-wall__tile:hover .drift-wall__inner,
.drift-wall__tile:focus-visible .drift-wall__inner {
  filter: saturate(1.22) brightness(1.12);
  transform: scale(1.05);
  box-shadow:
    0 26px 56px -18px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(92, 255, 182, 0.85),
    0 0 32px rgba(92, 255, 182, 0.32);
  z-index: 1;
}
.drift-wall__tile:focus-visible .drift-wall__inner {
  box-shadow:
    0 26px 56px -18px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(255, 255, 255, 0.9);
}
/* ---------- 视频展示区：复用首页 cinema 视觉 ---------- */
.yx-cinema {
  background:
    radial-gradient(ellipse 60% 80% at 14% 14%, rgba(92, 255, 182, 0.06), transparent 60%),
    var(--bg);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.yx-cinema__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.yx-cinema__title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.4rem); color: var(--cream); }
.yx-cinema__sub { margin: 0; color: rgba(239, 244, 255, 0.58); }

/* ---------- 通用：动效退化 ---------- */
@media (prefers-reduced-motion: reduce) {
  .drift-wall__plane,
  .drift-wall__track { will-change: auto; }
  .nav-link--yanxue { transition: none; }
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 760px) {
  /* DriftWall 移动端改为 2 列纯网格 */
  .yx-gallery {
    --dw-tile-w: clamp(200px, 44vw, 320px);
    --dw-tile-h: 260px;
    --dw-speed: 22s;
    gap: 10px;
    border-radius: 20px;
  }
  .yx-gallery--szg { --dw-speed: 22s; }
  .yx-region__chip-row { gap: 0.4rem; }
  .yx-hero { min-height: 64vh; }
}

@media (max-width: 480px) {

  .yx-region__title { font-size: 1.7rem; }
}
/* ---------- 灯箱打开状态（保持原本 visible） ---------- */
.image-lightbox[hidden] { display: none !important; }
.image-lightbox.is-open { display: flex; }
/* ---------- Cinema 缩略图 + 大屏 ---------- */
.yx-cinema__wall {
  position: relative;
  border-radius: 1.75rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0e1230;
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.yx-cinema__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yx-cinema__enter {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(1, 8, 40, 0.72);
  color: #5CFFB6;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease, color 200ms ease;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.yx-cinema__enter svg { width: 1rem; height: 1rem; display: block; fill: currentColor; stroke: currentColor; }
.yx-cinema__icon--unmuted { display: none; }
.yx-cinema__enter.is-unmuted .yx-cinema__icon--muted { display: none; }
.yx-cinema__enter.is-unmuted .yx-cinema__icon--unmuted { display: block; }
.yx-cinema__enter.is-unmuted {
  background: rgba(92, 255, 182, 0.16);
  border-color: rgba(92, 255, 182, 0.55);
  color: #5CFFB6;
}

/* 顶部右侧 hint chip（不挡画面，仅文案） */
.yx-cinema__hint {
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(1, 8, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(239, 244, 255, 0.82);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  pointer-events: none;
}
.yx-cinema__hint svg { fill: none; stroke: #5CFFB6; stroke-width: 2; width: 0.85rem; height: 0.85rem; }
.yx-cinema__enter:hover,
.yx-cinema__enter:focus-visible {
  background: rgba(92, 255, 182, 0.18);
  border-color: #5CFFB6;
  color: #5CFFB6;
  transform: scale(1.08);
}
.yx-cinema__label {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cream);
  background: rgba(1, 8, 40, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

.yx-cinema__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.yx-cinema__thumb {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
  padding: 0.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
  color: inherit;
}
.yx-cinema__thumb:hover,
.yx-cinema__thumb:focus-visible {
  background: rgba(92, 255, 182, 0.08);
  border-color: rgba(92, 255, 182, 0.34);
  transform: translateY(-2px);
}
.yx-cinema__thumb.is-active {
  background: rgba(92, 255, 182, 0.16);
  border-color: rgba(92, 255, 182, 0.6);
}
.yx-cinema__thumb-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #0e1230;
}
.yx-cinema__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yx-cinema__thumb-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  padding-inline: 0.25rem;
}

/* ---------- hero 标题强调 ---------- */
.yx-hero__title > span[style*="font-size"] { font-size: 1em !important; }

/* ---------- 移动端补充 ---------- */
@media (max-width: 760px) {
  .yx-hero__cta-row { gap: 0.5rem; }
  .yx-hero__cta-row a { font-size: 0.85rem; padding: 0.65rem 0.95rem !important; }
  .yx-cinema__wall { border-radius: 1.25rem; }
  .yx-cinema__enter { width: 2.9rem; height: 2.9rem; right: 0.85rem; bottom: 0.85rem; }
  .yx-cinema__enter svg { width: 1.2rem; height: 1.2rem; }
  .yx-cinema__hint { font-size: 0.58rem; padding: 0.4rem 0.7rem; right: 0.7rem; top: 0.7rem; }
  .yx-cinema__label { font-size: 0.66rem; }
}
/* ---------- 信号区容器需要 position:relative 承接 absolute 的 qr-card ---------- */
.signal-stage__container { position: relative; }

/* ---------- 灯箱全屏 flex 居中 ---------- */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem);
  background: rgba(1, 8, 40, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.image-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(90vw, 1280px);
  max-height: 90vh;
}
.image-lightbox__image {
  max-width: 100%;
  max-height: calc(90vh - 8rem);
  object-fit: contain;
  border-radius: 12px;
  background: #0e1230;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.image-lightbox__close {
  position: absolute;
  top: clamp(0.5rem, 2vw, 1.5rem);
  right: clamp(0.5rem, 2vw, 1.5rem);
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(1, 8, 40, 0.7);
  color: var(--cream);
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.image-lightbox__close:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- hero-stage 设置 background-black，避免视频加载前白闪 ---------- */
.yx-hero { background: #010828; }

/* ---------- yx-region 顶部不要有阴影 ---------- */
.yx-region { background: transparent; }
/* ---------- 修复 DriftWall 与上层元素的点击冲突 ---------- */
.yx-region { position: relative; z-index: 1; }
.yx-gallery { z-index: 1; }
.drift-wall__tile { position: relative; z-index: 1; }
.drift-wall__plane { z-index: 1; }
.yx-cinema { position: relative; z-index: 2; }
.yx-region__header { position: relative; z-index: 3; }

/* 防止 .yx-hero__container 拦截下层 DriftWall 的点击事件 */
.yx-hero__container { pointer-events: none; }
.yx-hero__container > * { pointer-events: auto; }

/* 视频/缩略图 hover 提示 */
.yx-cinema__thumb:hover .yx-cinema__thumb-image,
.yx-cinema__thumb:focus-visible .yx-cinema__thumb-image {
  transform: scale(1.04);
  transition: transform 200ms ease;
}
.yx-cinema__thumb-image { transition: transform 200ms ease; }

/* 优化 lightbox 打开时的滚动锁定 */
body.lightbox-open { overflow: hidden; }


/* ============ 视频灯箱（全屏播放带控件） ============ */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(1, 8, 40, 0.94);
  display: grid;
  place-items: center;
  padding: clamp(3rem, 5vw, 4.5rem) clamp(1rem, 3vw, 2rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.video-lightbox[hidden] { display: none; }
.video-lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: min(1280px, 96vw);
}
.video-lightbox__video {
  width: 100%;
  max-height: calc(100vh - 9rem);
  border-radius: 1.25rem;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}
.video-lightbox__caption {
  color: rgba(239, 244, 255, 0.72);
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  letter-spacing: 0.06em;
  text-align: center;
  margin: 0;
}
.video-lightbox__close {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.5rem);
  right: clamp(0.8rem, 2vw, 1.5rem);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(1, 8, 40, 0.7);
  color: var(--cream);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 180ms ease, transform 180ms ease;
  z-index: 2;
}
.video-lightbox__close:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }
.video-lightbox__close svg { width: 1.2rem; height: 1.2rem; }

/* ============ cinema wall 可点击打开灯箱的提示样式 ============ */
.yx-cinema__wall {
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}
.yx-cinema__wall:hover,
.yx-cinema__wall:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 32px 70px -22px rgba(92, 255, 182, 0.32), 0 0 0 1px rgba(92, 255, 182, 0.45);
}
.yx-cinema__wall:focus-visible { outline: none; }
