/* ═══════════════════════════════════════════════════════════
   sticky-tabs.css
   Tab 导航 + 滑动吸顶 + 回到顶部 组件样式
   依赖：页面需自行引入字体（FZHanZhenGuangBiaoS-GB 等）
   ═══════════════════════════════════════════════════════════ */

/* ── PANE (tab 内容切换) ── */
.st-pane {
  position: relative;
}

.st-pane[hidden] {
  display: none;
}

/* ── STICKY HEADER（吸顶导航，滑动后显现） ── */
.st-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(48px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2.5vw, 40px);
  padding: 0 clamp(16px, 3.75vw, 60px);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}

.st-header.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ── 常驻模式（data-always）：不依赖滚动，默认可见，防首屏闪烁 ── */
.st-header[data-always] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ── 底（吸顶条背景层，独立元素，便于换肤/换底） ── */
.st-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* ── 标题（吸顶条 + overlay 共用） ── */
.st-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 40px);
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.st-title span {
  font-family: 'FZHanZhenGuangBiaoS-GB', 'STZhongsong', 'Noto Serif SC', serif;
  font-size: clamp(22px, 3.75vw, 60px);
  font-weight: normal;
  color: #ddeaff;
  line-height: 1.2;
}

.st-title .st-title-name {
  letter-spacing: clamp(2px, .375vw, 6px);
}

/* 吸顶条内标题缩小 */
.st-header .st-title span {
  font-size: clamp(13px, 2.0625vw, 33px);
}

/* ── TAB 行 ── */
.st-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.st-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5px, .75vw, 12px) clamp(10px, 1.5vw, 24px);
  border-radius: 9999px;
  border: 1.2px solid rgba(221, 234, 255, .85);
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-family: 'PingFang SC', -apple-system, sans-serif;
  font-size: clamp(10px, 1.5vw, 24px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  opacity: .9;
  transition: background .22s ease, opacity .22s ease, transform .12s ease;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
}

.st-tab.is-active {
  background: linear-gradient(90deg, #3c91ff 0%, #619de6 38%, #7684ea 76%, #3c91ff 100%);
  opacity: .9;
}

.st-tab:hover {
  opacity: 1;
  transform: scale(1.03);
}

.st-tab:active {
  transform: scale(.97);
}

/* ── HERO overlay（叠在每个 tab 首屏 hero 上） ── */
.st-overlay {
  position: absolute;
  top: calc(60 / 800 * 100%);
  left: 0;
  right: 0;
  height: calc(200 / 800 * 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 40px);
  padding: 0 clamp(16px, 3.75vw, 60px);
}

/* ── 回到顶部 ── */
.st-back-top {
  position: fixed;
  bottom: clamp(16px, 3vw, 40px);
  right: clamp(16px, 3vw, 40px);
  width: clamp(36px, 3vw, 48px);
  height: clamp(36px, 3vw, 48px);
  border-radius: 50%;
  background: rgba(60, 145, 255, .7);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  z-index: 999;
}

.st-back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.st-back-top:hover {
  background: rgba(60, 145, 255, .9);
}

.st-back-top svg {
  width: 18px;
  height: 18px;
}
