/* =============================================================
   澳晟移民 · 首页专用样式 index.css
   仅首页调用：顶部四国 Banner 自动轮播
   依赖 aymym.css 的设计令牌（--brand-deep / --gold / --shadow-lg 等）
   ============================================================= */

/* ---------- 1. 轮播容器 ---------- */
.hb-slider {
  position: relative;
  width: 100%;
  max-width: var(--maxw, 1200px);
  height: clamp(360px, 36vw, 470px);
  margin: 28px auto 0;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  background: var(--brand-deep, #06245F);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(24,24,27,.12));
  isolation: isolate;
}

/* 每一帧：整帧即一个链接，绝对定位堆叠，靠 opacity 切换 */
.hb-slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility .9s ease;
  z-index: 1;
}
.hb-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hb-slide:hover { color: #fff; }

/* 背景图：轻微放大，切换时缓慢归位，形成呼吸感。
   图片地址由每帧内联的 --hb-desk / --hb-mob 变量提供，按屏幕切换。 */
.hb-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-image: var(--hb-desk);
  transform: scale(1.06);
  transition: transform 7s ease-out;
  z-index: -2;
}
.hb-slide.is-active .hb-bg { transform: scale(1); }

/* 渐变遮罩：默认左深右浅（主体在右的图，如 CA/US） */
.hb-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,26,74,.90) 0%, rgba(4,26,74,.72) 34%, rgba(4,26,74,.28) 62%, rgba(4,26,74,.05) 100%),
    linear-gradient(0deg, rgba(4,26,74,.35) 0%, rgba(4,26,74,0) 45%);
  z-index: -1;
}
/* 主体在左、留白在右的图（AU/NZ）：遮罩反向，文案靠右 */
.hb-slide--right .hb-overlay {
  background:
    linear-gradient(270deg, rgba(4,26,74,.90) 0%, rgba(4,26,74,.72) 34%, rgba(4,26,74,.28) 62%, rgba(4,26,74,.05) 100%),
    linear-gradient(0deg, rgba(4,26,74,.35) 0%, rgba(4,26,74,0) 45%);
}

/* ---------- 2. 文案区 ---------- */
.hb-content {
  position: relative;
  height: 100%;
  max-width: 640px;
  padding: clamp(32px, 5vw, 68px) clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}
/* 留白在右的帧：内容整体靠右、文字右对齐 */
.hb-slide--right .hb-content {
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}

.hb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #fff;
}
.hb-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold, #C9A24A);
  flex: 0 0 auto;
}

.hb-title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.28);
}
.hb-en {
  margin: -12px 0 0;
  font-family: var(--font-num, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-soft, #E3CE9B);
  text-transform: uppercase;
}
.hb-sub {
  margin: 0;
  max-width: 520px;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.75;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
}

/* 用 span 模拟按钮，避免与整帧 <a> 形成嵌套交互元素 */
.hb-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 26px;
  border-radius: 10px;
  background: var(--brand, #0B3FA8);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  transition: transform .2s, background .2s;
}
.hb-btn::after {
  content: "→";
  font-size: 18px;
  line-height: 1;
  transition: transform .2s;
}
.hb-slide:hover .hb-btn { transform: translateY(-2px); background: #0A1D3D; }
.hb-slide:hover .hb-btn::after { transform: translateX(4px); }

/* 文案入场：激活帧逐层上浮 */
.hb-slide .hb-kicker,
.hb-slide .hb-en,
.hb-slide .hb-title,
.hb-slide .hb-sub,
.hb-slide .hb-btn {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.hb-slide.is-active .hb-kicker { opacity: 1; transform: none; transition-delay: .12s; }
.hb-slide.is-active .hb-en     { opacity: 1; transform: none; transition-delay: .20s; }
.hb-slide.is-active .hb-title  { opacity: 1; transform: none; transition-delay: .28s; }
.hb-slide.is-active .hb-sub    { opacity: 1; transform: none; transition-delay: .36s; }
.hb-slide.is-active .hb-btn    { opacity: 1; transform: none; transition-delay: .44s; }

/* ---------- 3. 左右箭头 ---------- */
.hb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(4,26,74,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: background .2s, transform .2s;
}
.hb-arrow:hover { background: rgba(4,26,74,.65); transform: translateY(-50%) scale(1.08); }
.hb-arrow svg { width: 20px; height: 20px; }
.hb-arrow--prev { left: 18px; }
.hb-arrow--next { right: 18px; }

/* ---------- 4. 指示点 ---------- */
.hb-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(20px, 4vw, 34px);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}
.hb-dot {
  width: 28px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  cursor: pointer;
  transition: width .3s, background .3s;
}
.hb-dot:hover { background: rgba(255,255,255,.75); }
.hb-dot.is-active { width: 46px; background: var(--gold, #C9A24A); }

/* ---------- 5. 响应式 ---------- */
@media (max-width: 768px) {
  .hb-slider {
    max-width: calc(100% - 24px);
    height: clamp(360px, 84vw, 460px);
    margin-top: 16px;
    border-radius: 12px;
  }
  .hb-bg { background-image: var(--hb-mob); }
  .hb-overlay,
  .hb-slide--right .hb-overlay {
    background:
      linear-gradient(0deg, rgba(4,26,74,.94) 0%, rgba(4,26,74,.70) 44%, rgba(4,26,74,.10) 100%);
  }
  .hb-content,
  .hb-slide--right .hb-content {
    max-width: 100%;
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
    justify-content: flex-end;
    padding: 28px 24px 74px;
    gap: 14px;
  }
  .hb-title { font-size: clamp(30px, 8vw, 40px); }
  .hb-en { margin-top: -8px; }
  .hb-sub { font-size: 14px; line-height: 1.65; }
  .hb-btn { padding: 11px 22px; font-size: 14px; }
  .hb-arrow { width: 36px; height: 36px; }
  .hb-arrow--prev { left: 10px; }
  .hb-arrow--next { right: 10px; }
  .hb-dots { bottom: 20px; }
}

/* 窄屏隐藏箭头，避免压住文案；靠指示点与自动切换操作 */
@media (max-width: 640px) {
  .hb-arrow { display: none; }
}

/* ---------- 6. 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .hb-slider .hb-slide,
  .hb-slider .hb-bg,
  .hb-slider .hb-kicker,
  .hb-slider .hb-en,
  .hb-slider .hb-title,
  .hb-slider .hb-sub,
  .hb-slider .hb-btn { transition: none !important; }
  .hb-bg { transform: none !important; }
}
