/* ============================================================
   首页 Hero 轮播 · 第四版
   上半：剧照铺满（不显示海报）
   下半：文字信息 + 控制条
   ============================================================ */

/* 覆盖 theme.css 里 .hero 的旧 flex 布局 */
.hero {
  display: block !important;
  min-height: 0 !important;
  align-items: stretch !important;
  background: #0B4A7A;
}

.hero-slides {
  display: grid !important;
  width: 100% !important;
  flex: none !important;
}

/* ---------- 幻灯片 ---------- */
.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(26px);
  transition:
    opacity .36s ease,
    transform .48s var(--ease-in-out);
  will-change: opacity, transform;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.hero-slide.on {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 3;
}
.hero-slide.leaving-left { transform: translateX(-26px); z-index: 2; }
.hero-slide.leaving-right { transform: translateX(26px); z-index: 2; }

/* ---------- 上半：剧照 ---------- */
.hero-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 560px;
  min-height: 200px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #062F4D;
}

.hero-bg {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center 26%;
  filter: blur(14px) saturate(118%) brightness(.62);
  transform: scale(1.10);
  z-index: 0;
}

/* 有真剧照：不模糊不放大，完整铺满 */
.hero-bg.wide {
  filter: brightness(.86) saturate(106%);
  transform: none;
  inset: 0;
  background-position: center center;
}

/* 遮罩：上方轻压，底部融进信息区 */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(6, 45, 74, .28) 0%,
      rgba(10, 42, 66, .02) 26%,
      rgba(8, 53, 90, .22) 46%,
      rgba(10, 42, 66, .72) 66%,
      rgba(10, 42, 66, .95) 84%,
      #0B4A7A 100%),
    radial-gradient(140% 130% at 50% 20%, transparent 40%, rgba(4, 32, 52, .42) 100%);
}

.hero-vtags {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

/* ---------- 下半：文字 ---------- */
.hero-body {
  position: relative;
  z-index: 3;
  padding: 0 30px 0;
  margin-top: -238px;      /* 文字压到图片下半部 */
  height: 258px;           /* 固定高度（模块总高不变） */
  display: block;
}

.hero-content {
  min-width: 0;
  max-width: 780px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 36px;       /* 标题整体下移 */
  padding-bottom: 68px;    /* 给绝对定位的按钮留位置 */
}

.hero-h {
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.3px;
  color: #fff;
  margin-bottom: 7px;
  /* 最多两行，且始终占两行高度 —— 一行标题也不会把按钮往上提 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-h a { color: inherit; text-decoration: none; }
.hero-h a:hover { color: var(--glaze); }
.hero-h .year {
  font-size: .58em;
  font-weight: 600;
  color: var(--dim);
  margin-left: 8px;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.hero-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 5px;
  background: var(--glaze);
  color: #0A2A42;
  font-weight: 900;
  font-size: 11.5px;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}

.hero-p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .74);
  margin-bottom: 10px;
  margin-top: 0;           /* 紧跟元信息，不再吸底 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.8 * 13px);
}

.hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  position: absolute;      /* 绝对定位，位置不受上方内容影响 */
  left: 30px;
  bottom: 22px;
  z-index: 4;
}

/* ---------- 底部条 ---------- */
.hero-foot {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 11px 30px 13px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  background: rgba(6, 47, 77, .5);
  border-radius: 0 0 20px 20px;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.hero-dots::-webkit-scrollbar { display: none; }

.hero-dot {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 51px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(6, 45, 74, .5);
  cursor: pointer;
  opacity: .5;
  transition:
    opacity .22s ease,
    transform .24s var(--ease-out),
    border-color .22s ease,
    width .28s var(--ease-out),
    height .28s var(--ease-out);
}
.hero-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-dot:hover { opacity: .85; border-color: rgba(255, 255, 255, .42); }
.hero-dot:focus-visible { outline: 2px solid var(--glaze); outline-offset: 2px; }
.hero-dot.on {
  opacity: 1;
  width: 41px;
  height: 61px;
  border-color: var(--glaze);
  box-shadow: 0 0 0 1px var(--glaze), 0 8px 20px -8px rgba(230, 184, 22, .6);
}

/* ---------- 控件 ---------- */
.hero-ctrl {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.hero-arrow,
.hero-play {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .16s var(--ease-out);
}
.hero-arrow svg,
.hero-play svg { width: 15px; height: 15px; }
.hero-arrow:hover,
.hero-play:hover {
  background: rgba(230, 184, 22, .22);
  border-color: rgba(230, 184, 22, .6);
  color: var(--glaze);
}
.hero-arrow:active,
.hero-play:active { transform: scale(.92); transition-duration: .1s; }
.hero-arrow:focus-visible,
.hero-play:focus-visible { outline: 2px solid var(--glaze); outline-offset: 2px; }

.hero-play .icon-pause { display: none; }
.hero-play.playing .icon-play { display: none; }
.hero-play.playing .icon-pause { display: block; }

/* ---------- 进度条 ---------- */
.hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  z-index: 5;
  pointer-events: none;
}
.hero-bar i {
  display: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-visual { aspect-ratio: 16 / 9; max-height: 380px; }
  .hero-body { padding: 0 20px 0; margin-top: -178px; height: 222px; }
  .hero-actions { left: 20px; bottom: 18px; }
  .hero-foot { padding: 12px 20px 14px; gap: 12px; }
  .hero-dot { width: 28px; height: 42px; }
  .hero-dot.on { width: 33px; height: 50px; }
}

@media (max-width: 640px) {
  .hero-visual { aspect-ratio: 16 / 9; max-height: 240px; min-height: 170px; }
  .hero-body { padding: 0 14px 0; margin-top: -128px; height: 180px; }
  .hero-actions { left: 14px; bottom: 16px; }
  .hero-h { font-size: 17px; margin-bottom: 7px; }
  .hero-h .year { display: block; margin-left: 0; margin-top: 1px; }
  .hero-p { display: none; }
  .hero-meta { margin-bottom: 9px; font-size: 11.5px; }
  .hero-btn { padding: 8px 14px; font-size: 12px; }
  .hero-foot { padding: 10px 14px 12px; gap: 10px; }
  .hero-dot { width: 24px; height: 36px; }
  .hero-dot.on { width: 29px; height: 43px; }
  .hero-arrow, .hero-play { width: 29px; height: 29px; }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide.on,
  .hero-slide.leaving-left,
  .hero-slide.leaving-right {
    transform: none !important;
    transition: none !important;
  }
}


/* ============================================================
   Hero 清晰竖版海报（3:4，与卡片图同比例）
   ============================================================ */
.hero-poster {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  width: 168px;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  z-index: 3;
  box-shadow:
    0 28px 64px -22px rgba(0, 0, 0, .88),
    0 0 0 1px rgba(255, 255, 255, .16);
  background: #062F4D;
}
@media (max-width: 900px) {
  .hero-poster { width: 128px; left: 24px; border-radius: 10px; }
}
@media (max-width: 560px) {
  .hero-poster { width: 92px; left: 16px; border-radius: 8px; }
}


/* ============================================================
   Hero 16:9 沉浸版：去掉下方分层，文字完全浮在图上
   ============================================================ */
.hero-body { display: none !important; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 34px 32px;
  max-width: 860px;
  box-sizing: border-box;
}
.hero-overlay .hero-h {
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.3px;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-overlay .hero-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 9px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
.hero-overlay .hero-p {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .76);
  margin: 0 0 16px;
  max-width: 620px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
.hero-overlay .hero-actions {
  position: static;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0;
}

/* 底部渐变加浓，保证文字可读 */
.hero-scrim {
  background:
    linear-gradient(180deg,
      rgba(6, 45, 74, .20) 0%,
      rgba(10, 42, 66, .05) 30%,
      rgba(6, 30, 50, .45) 58%,
      rgba(4, 22, 38, .82) 78%,
      rgba(3, 16, 28, .95) 100%),
    radial-gradient(140% 120% at 50% 15%, transparent 42%, rgba(3, 20, 34, .45) 100%);
}

/* 宽度自适应 */
@media (max-width: 900px) {
  .hero-overlay { padding: 22px 22px 24px; }
  .hero-overlay .hero-p { display: none; }
}
@media (max-width: 560px) {
  .hero-overlay { padding: 16px 16px 18px; }
  .hero-overlay .hero-meta { font-size: 11.5px; }
  .hero-overlay .hero-h { font-size: 18px; }
}
