/**
 * Landing Page - Hành Sơn S8
 * Theme: Tân Võ Lâm
 * Pixel-perfect implementation matching design mockup
 */

:root {
  --s8-font-main: 'Hubot Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --s8-font-display: 'Yeseva One', Georgia, serif;
  --s8-gold-1: #dfb26b;
  --s8-gold-2: #fce69a;
  --s8-gold-3: #9b6b25;
  --s8-cream-bg: #fbf7ee;
  --s8-header-text: #3c2016;
  --s8-header-hover: #b82c14;
  --s8-dark-bg: #140405;
  --s8-footer-bg: #000000;
  --s8-text-light: #ffffff;
  --s8-text-muted: #9e9e9e;
}

/* Reset for Landing Page */
body.landing-hanh-son-s8-page {
  margin: 0;
  padding: 0;
  font-family: var(--s8-font-main);
  background-color: var(--s8-dark-bg);
  color: var(--s8-text-light);
  line-height: 1.5;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.landing-hanh-son-s8-page * {
  box-sizing: border-box;
}

/* Hide standard theme elements if present */
body.landing-hanh-son-s8-page #masthead,
body.landing-hanh-son-s8-page #tvl-sticky-nav,
body.landing-hanh-son-s8-page .tvl-header,
body.landing-hanh-son-s8-page .tvl-sticky-nav {
  display: none !important;
}

/* ==========================================================================
   1. TOP NAVIGATION BAR (Header)
   ========================================================================== */
.s8-topbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background-color: var(--s8-cream-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid #ebdcc5;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.s8-topbar-container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
}

/* App Icon on the Left */
.s8-brand-app {
  position: absolute;
  left: 10px;
  top: 2px;
  z-index: 1001;
  display: block;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.s8-brand-app:hover {
  transform: translateY(-2px) scale(1.05);
}

.s8-app-icon {
  width: 110px;
  height: 110px;
  display: block;

}

/* Center Navigation Group */
.s8-nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.s8-nav-item {
  display: flex;
  align-items: center;
}

.s8-nav-link,
.s8-nav-link:visited {
  font-family: var(--s8-font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--s8-header-text) !important;
  text-decoration: none;
  padding: 6px 4px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.s8-nav-link:hover {
  color: var(--s8-header-hover) !important;
  text-shadow: 0 0 1px rgba(184, 44, 20, 0.4);
}

.s8-nav-sep {
  width: 5px;
  height: 19px;
  object-fit: contain;
  opacity: 0.85;
  user-select: none;
}

/* Center Logo */
.s8-nav-logo-wrap {
  display: flex;
  align-items: center;
  margin: 0 8px;
}

.s8-nav-logo {
  height: 42px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.s8-nav-logo-wrap:hover .s8-nav-logo {
  transform: scale(1.06);
}

/* Mobile Auth Group - Hidden on Desktop */
.s8-mobile-auth {
  display: none;
}

/* Mobile Toggle */
.s8-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 1002;
}

.s8-toggle-bar {
  display: block;
  width: 24px;
  height: 2.5px;
  margin: 4px 0;
  background: var(--s8-header-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Drawer */
/* Mobile Drawer */
.s8-mobile-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: min(80vw, 315px);
  height: 100vh;
  height: 100dvh;
  background: #F5EEE4 !important;
  background-color: #F5EEE4 !important;
  border-left: 1px solid #ebd8be;
  border-bottom: 3px solid #dfb26b;
  padding: 16px 16px 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.45);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.s8-mobile-drawer.active {
  right: 0;
}

/* Close button - circular cream button matching mockup */
.s8-drawer-close {
  align-self: flex-end;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7ebd8;
  border: 1px solid #e7d5be;
  color: #3b1d12;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.s8-drawer-close:active {
  transform: scale(0.92);
}

/* Navigation Links */
.s8-drawer-nav {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.s8-drawer-link,
.s8-drawer-link:visited {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #4a1f14 !important;
  text-decoration: none;
  display: inline-block;
  padding: 4px 12px;
  text-align: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.s8-drawer-link:hover,
.s8-drawer-link:focus {
  color: #8b3519 !important;
}

.s8-drawer-link:active {
  transform: scale(0.96);
}

/* Divider Wrap */
.s8-drawer-divider-wrap {
  width: 82%;
  margin: 18px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 12px;
}

.s8-drawer-divider-wrap::before,
.s8-drawer-divider-wrap::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(to right, transparent, #cda26c);
}

.s8-drawer-divider-wrap::after {
  background: linear-gradient(to left, transparent, #cda26c);
}

.s8-drawer-divider-knot {
  width: 6.5px;
  height: 6.5px;
  background: #cda26c;
  transform: rotate(45deg);
  margin: 0 10px;
  box-shadow: 0 0 3px rgba(205, 162, 108, 0.5);
  flex-shrink: 0;
  border-radius: 0.5px;
}

/* Auth Buttons */
.s8-drawer-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.s8-drawer-auth-btn {
  display: block;
  height: 40px;
  line-height: 0;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.s8-drawer-auth-btn:hover {
  filter: brightness(1.08);
}

.s8-drawer-auth-btn:active {
  transform: scale(0.95);
}

.s8-drawer-auth-btn img {
  height: 40px;
  width: auto;
  max-width: 145px;
  display: block;
  object-fit: contain;
}

/* Bottom Social Channels */
.s8-drawer-social {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
}

.s8-drawer-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 4px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.s8-drawer-social-item:active {
  transform: scale(0.94);
}

.s8-drawer-social-icon {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.s8-drawer-social-label {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #3b506e;
  text-align: center;
}

.s8-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1999;
  display: none;
}

.s8-drawer-backdrop.active {
  display: block;
}

/* ==========================================================================
   2. KHỐI 1: HERO BANNER SECTION (Video Background + Tựa đề)
   ========================================================================== */
.s8-hero-section {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 1080px;
  background-color: #140405;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0;
}

/* Video Background Container */
.s8-hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  background:
    url('../images/hanh-son-s8/video-poster-desktop.jpg') no-repeat top center / cover,
    #140405;
}

/* Video Element */
.s8-hero-video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

/* Desktop video default */
.s8-video-desktop {
  display: block;
}

.s8-video-mobile {
  display: none;
}

/* Vignette overlay for top navigation contrast */
.s8-hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 4, 5, 0.45) 0%,
    rgba(20, 4, 5, 0.15) 15%,
    transparent 35%
  );
  pointer-events: none;
  z-index: 2;
}

/* Title Graphic - Centered in Video Block */
.s8-title-container {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 28vw, 540px);
  padding: 0;
  margin: 0;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.s8-title-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  line-height: 0;
}

.s8-title-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(255, 120, 20, 0.45));
  animation: s8TitleBreath 4s ease-in-out infinite;
  transition: transform 0.4s ease;
}

/* ==========================================================================
   HIỆU ỨNG TRÁNG GƯƠNG (MIRROR SHEEN / LIGHT SWEEP ANIMATION)
   ========================================================================== */
.s8-title-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  -webkit-mask-image: var(--s8-title-img, url('../images/hanh-son-s8/s8-title.png'));
  mask-image: var(--s8-title-img, url('../images/hanh-son-s8/s8-title.png'));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  overflow: hidden;
  mix-blend-mode: screen;
}

/* Vệt sáng quét thanh mảnh, tinh tế (Refined Specular Light Sweep) */
.s8-title-shimmer::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -80%;
  width: 45%;
  height: 180%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 32%,
    rgba(255, 215, 110, 0.45) 44%,
    rgba(255, 255, 255, 0.95) 48.5%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.95) 51.5%,
    rgba(255, 215, 110, 0.45) 56%,
    rgba(255, 255, 255, 0) 68%,
    transparent 100%
  );
  transform: skewX(-20deg);
  filter: blur(0.5px);
  animation: s8MirrorSweep 5.2s cubic-bezier(0.3, 0, 0.2, 1) infinite;
}

/* Lớp ánh kim vàng mảnh mai (Color-dodge metallic sheen) */
.s8-title-shimmer::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -80%;
  width: 35%;
  height: 180%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 190, 60, 0) 36%,
    rgba(255, 255, 220, 0.85) 48%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 220, 0.85) 52%,
    rgba(255, 190, 60, 0) 64%,
    transparent 100%
  );
  transform: skewX(-20deg);
  mix-blend-mode: color-dodge;
  animation: s8MirrorSweep 5.2s cubic-bezier(0.3, 0, 0.2, 1) infinite;
}

/* Đốm sáng lấp lánh (Star Sparkles) khi kiếm quang quét qua các nét chữ */
.s8-title-star {
  position: absolute;
  width: 38px;
  height: 38px;
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.s8-title-star::before {
  content: '';
  position: absolute;
  inset: 15%;
  background: radial-gradient(circle, #ffffff 10%, rgba(255, 235, 140, 0.9) 35%, rgba(255, 160, 40, 0) 70%);
  border-radius: 50%;
  filter: blur(1px);
}

.s8-title-star::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 38%, rgba(255, 255, 255, 0.9) 46%, #ffffff 50%, rgba(255, 255, 255, 0.9) 54%, transparent 62%),
    linear-gradient(to right, transparent 38%, rgba(255, 255, 255, 0.9) 46%, #ffffff 50%, rgba(255, 255, 255, 0.9) 54%, transparent 62%);
  clip-path: polygon(50% 0%, 55% 42%, 100% 50%, 55% 58%, 50% 100%, 45% 58%, 0% 50%, 45% 42%);
  filter: drop-shadow(0 0 6px rgba(255, 240, 160, 0.95));
}

/* Vị trí ngôi sao 1: Nhánh trên chữ Hành */
.s8-star-1 {
  top: 32%;
  left: 36%;
  animation: s8StarFlash1 5.2s ease-in-out infinite;
}

/* Vị trí ngôi sao 2: Đỉnh nét chữ Sơn */
.s8-star-2 {
  top: 55%;
  left: 65%;
  animation: s8StarFlash2 5.2s ease-in-out infinite;
}

/* Vị trí ngôi sao 3: Điểm sáng số S8 */
.s8-star-3 {
  top: 61%;
  left: 80%;
  animation: s8StarFlash3 5.2s ease-in-out infinite;
}

/* Animation quét sáng tráng gương */
@keyframes s8MirrorSweep {
  0% {
    left: -80%;
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  48% {
    left: 140%;
    opacity: 1;
  }
  51%, 100% {
    left: 140%;
    opacity: 0;
  }
}

/* Animation chớp sáng của 3 ngôi sao đồng bộ với vệt quét */
@keyframes s8StarFlash1 {
  0%, 18% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
  }
  24% {
    transform: translate(-50%, -50%) scale(1.3) rotate(45deg);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -50%) scale(0.1) rotate(90deg);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0) rotate(90deg);
    opacity: 0;
  }
}

@keyframes s8StarFlash2 {
  0%, 26% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
  }
  32% {
    transform: translate(-50%, -50%) scale(1.25) rotate(45deg);
    opacity: 1;
  }
  38% {
    transform: translate(-50%, -50%) scale(0.1) rotate(90deg);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0) rotate(90deg);
    opacity: 0;
  }
}

@keyframes s8StarFlash3 {
  0%, 31% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
  }
  36% {
    transform: translate(-50%, -50%) scale(1.15) rotate(45deg);
    opacity: 1;
  }
  42% {
    transform: translate(-50%, -50%) scale(0.1) rotate(90deg);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0) rotate(90deg);
    opacity: 0;
  }
}

/* Nhịp thở hào quang nhẹ nhàng */
@keyframes s8TitleBreath {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 8px 24px rgba(255, 120, 20, 0.45));
  }
  50% {
    transform: translateY(-3px);
    filter: drop-shadow(0 12px 30px rgba(255, 150, 40, 0.65));
  }
}

/* ==========================================================================
   3. KHỐI NẰM CHÍNH GIỮA KHỐI 1 VÀ KHỐI 2 (SWORD FRAME CONTAINER)
   ========================================================================== */
.s8-frame-bridge {
  position: relative;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.s8-frame-section {
  width: 100%;
  max-width: clamp(480px, 45vw, 860px);
  padding: 0 12px;
  position: relative;
  pointer-events: auto;
  transform: translateY(-72%);
}

.s8-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2125 / 1187;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background ornate sword frame */
.s8-frame-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.75));
}

/* Inner Action Content Area */
.s8-frame-content {
  position: relative;
  z-index: 2;
  width: 65%;
  height: 52%;
  margin-top: -0.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0px; /* Khoảng cách dọc cực kỳ chuẩn xác giữa Hàng 1 và Hàng 2 */
}

/* Row 1: Register + PC Download + Recharge */
.s8-frame-row-1 {
  display: flex;
  align-items: flex-end; /* Căn thẳng hàng đáy của 3 nút */
  justify-content: center;
  width: 100%;
  gap: 0px; /* Khoảng cách ngang sát nhau chuẩn xác theo thiết kế */
  height: 61%;
}

/* Row 2: GooglePlay + iOS + APK */
.s8-frame-row-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0px; /* Khoảng cách ngang giữa 3 nút store liền kề */
  height: 31%;
}

/* Individual Buttons */
.s8-btn {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  user-select: none;
  line-height: 0;
}

.s8-btn img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.s8-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.12) drop-shadow(0 6px 14px rgba(255, 200, 60, 0.45));
}

.s8-btn:active {
  transform: scale(0.97);
}

/* Button sizing in Row 1: Tổng bề ngang ăn khớp hoàn toàn với Row 2 */
.s8-btn-register {
  flex: 1;
  max-width: 25.5%;
}

.s8-btn-download {
  flex: 1.86;
  max-width: 47.5%;
}

.s8-btn-download:hover {
  filter: brightness(1.15) drop-shadow(0 8px 18px rgba(255, 215, 0, 0.6));
}

.s8-btn-nap {
  flex: 1.06;
  max-width: 27.0%;
}

/* Button sizing in Row 2: Chia 3 đều đặn tạo thành thanh liền lạc */
.s8-btn-android {
  flex: 1;
  max-width: 32.8%;
}

.s8-btn-ios {
  flex: 1;
  max-width: 32.8%;
}

.s8-btn-apk {
  flex: 1.04;
  max-width: 34.4%;
}

/* ==========================================================================
   4. KHỐI 2: FEATURES SECTION (nen-2.png + Slogan + 5 Thẻ Tính Năng)
   ========================================================================== */
.s8-features-section {
  margin-top: clamp(-150px, -8vw, -80px);
  position: relative;
  z-index: 5;
  width: 100%;
  background-image:
    url('../images/hanh-son-s8/nen-2.png');
  background-position: top center;
  background-size: cover;
  height: auto;
  min-height: min(46.4vw, 880px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(230px, 16.5vw, 325px);
  padding-bottom: clamp(40px, 5vw, 90px);
  overflow: hidden;
}

/* Fade to black gradient at bottom to seamlessly connect to footer */
/* .s8-features-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 10;
} */

/* Slogan Divider ("Truyền kỳ tái khởi - Anh Hùng xuất thế") */
.s8-slogan-wrapper {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto clamp(20px, 2.4vw, 42px);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 24px);
  z-index: 25;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.75));
}

.s8-slogan-flourish {
  width: clamp(60px, 6.8vw, 130px);
  height: auto;
  aspect-ratio: 68 / 8;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  user-select: none;
}

.s8-flourish-right {
  transform: scaleX(-1);
}

.s8-slogan-text {
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 44px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
  background: linear-gradient(180deg, #FFFFFF 0%, #EBCC9B 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  margin: 0;
  padding: 4px 0;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.s8-slogan-line-1,
.s8-slogan-line-2 {
  display: inline;
}

.s8-slogan-sep {
  display: inline;
}

.s8-mobile-cards-list {
  display: none;
}


/* Panoramic Cards Box */
.s8-cards-container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 15;
}

.s8-cards-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3120 / 772;
}

.s8-cards-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.75));
}

/* 5 Card Text Overlays */
.s8-card-item {
  position: absolute;
  width: 12.2%;
  height: 78%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  cursor: default;
  border-radius: 12px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, filter 0.25s ease;
  outline: none;
}

.s8-card-item:hover,
.s8-card-item:focus-visible {
  filter: brightness(1.06);
}

.s8-card-text {
  position: relative;
  z-index: 2;
  color: #FFFBEE;
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.22;
  margin: 0;
  padding: 0 4px;
  user-select: none;
  pointer-events: none;
  -webkit-text-stroke: 0;
  text-shadow:
    -1px -1px 0 #9E5A3D,
     1px -1px 0 #9E5A3D,
    -1px  1px 0 #9E5A3D,
     1px  1px 0 #9E5A3D,
    -1.5px 0px 0 #9E5A3D,
     1.5px 0px 0 #9E5A3D,
     0px -1.5px 0 #9E5A3D,
     0px  1.5px 0 #9E5A3D,
     0 2px 4px rgba(0, 0, 0, 0.65);
  transition: transform 0.25s ease;
}

.s8-card-item:hover .s8-card-text,
.s8-card-item:focus-visible .s8-card-text {
  transform: scale(1.03);
  filter: none;
}

/* Coordinates corresponding to the 5 tablets on s8-card.png */
.s8-card-1 {
  left: 12.87%;
  top: 44.7%;
}
.s8-card-1 .s8-card-text {
  margin-top: -2%;
}

.s8-card-2 {
  left: 30.29%;
  top: 59.7%;
}
.s8-card-2 .s8-card-text {
  margin-top: 1%;
}

.s8-card-3 {
  left: 49.52%;
  top: 43.6%;
}
.s8-card-3 .s8-card-text {
  margin-top: -1%;
}

.s8-card-4 {
  left: 67.28%;
  top: 59.3%;
}
.s8-card-4 .s8-card-text {
  margin-top: 1%;
}

.s8-card-5 {
  left: 85.96%;
  top: 45.6%;
}
.s8-card-5 .s8-card-text {
  margin-top: -1%;
}

/* Mobile swipe hint */
.s8-cards-hint-mobile {
  display: none;
}

/* ==========================================================================
   4. KHỐI 3: THẬP ĐẠI MÔN PHÁI (10 SECTS SECTION)
   ========================================================================== */
.s8-sects-section {
  position: relative;
  width: 100%;
  background-color: #140405;
  overflow: hidden;
  z-index: 18;
  scroll-margin-top: 75px;
}

/* 1. Header Banner */
.s8-sects-header {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background-color: #ecece7;

}

.s8-sects-header-bg {
  width: 100%;
  height: auto;
  min-height: 100px;
  max-height: 220px;
  object-fit: cover;
  object-position: center top;
  display: block;
  user-select: none;
  pointer-events: none;
}

.s8-sects-header-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  padding: 0 16px;
}

.s8-sects-title {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s8-sects-title-img {
  width: clamp(260px, 36vw, 540px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

/* 2. Main Stage */
.s8-sects-stage {
  position: relative;
  width: 100%;
  height: clamp(620px, 46vw, 760px);
  overflow: hidden;
  background-color: #181315;
}

/* Lớp nền ảnh núi non + chân dung góc phải */
.s8-sects-bg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.s8-sects-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

/* Lớp nền mũi tên giấy xé bên trái (bg_trai.png) */
.s8-sects-left-polygon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(560px, 62vw, 1200px);
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.s8-sects-polygon-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: left center;
  display: block;
}

/* Lớp nhân vật đứng ở trung tâm (nv.png) */
.s8-sects-hero-wrap {
  position: absolute;
  top: 0;
  bottom: 52px;
  left: 54%;
  transform: translateX(-35%);
  width: clamp(340px, 28vw, 520px);
  height: calc(100% - 52px);
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.s8-sects-hero-img {
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

/* Container nội dung thông tin môn phái */
.s8-sects-container {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: clamp(24px, 2.5vw, 36px) clamp(24px, 5vw, 80px) 68px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.s8-sect-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: clamp(340px, 32vw, 460px);
  width: 100%;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.35s ease;
  will-change: transform, opacity;
}

/* Video Preview Card */
.s8-sect-video-card {
  position: relative;
  width: clamp(190px, 17vw, 260px);
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(225, 218, 205, 0.95);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  background-color: #1a120e;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  outline: none;
  margin-bottom: 2px;
}

.s8-sect-video-card:hover,
.s8-sect-video-card:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: #dfb26b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.s8-sect-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.s8-sect-video-card:hover .s8-sect-video-thumb {
  transform: scale(1.06);
}

.s8-sect-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.s8-play-ripple {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  animation: s8PlayPulse 2.4s ease-out infinite;
}

.s8-play-icon {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: transform 0.25s ease;
}

.s8-sect-video-card:hover .s8-play-icon {
  transform: scale(1.12);
}

@keyframes s8PlayPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

/* Sect Heading */
.s8-sect-name {
  font-family: var(--s8-font-display);
  font-size: clamp(30px, 2.9vw, 42px);
  font-weight: 700;
  color: #2b4358;
  margin: 10px 0 10px 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
  line-height: 1.1;
}

/* Attributes Blocks */
.s8-sect-block {
  margin-bottom: 12px;
}

.s8-sect-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.s8-sword-icon {
  width: 16px;
  height: 32px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.s8-ribbon-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 28px 0 12px;
  background: linear-gradient(90deg, #745f40 0%, #8f7d5c 55%, rgba(158, 145, 118, 0.55) 80%, rgba(200, 195, 180, 0) 100%);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 30%, calc(100% - 10px) 85%, calc(100% - 22px) 100%, 0 100%);
}

.s8-ribbon-title {
  font-family: var(--s8-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.s8-sect-desc {
  margin: 0;
  padding-left: 24px;
  font-family: var(--s8-font-main);
  font-size: clamp(12.5px, 1vw, 14px);
  color: #3b5166;
  line-height: 1.45;
}

.s8-sect-builds-list {
  padding-left: 24px;
  padding-bottom: 10px;
}

.s8-sect-build-item {
  margin: 2px 0;
  font-family: var(--s8-font-main);
  font-size: clamp(12.5px, 1vw, 14px);
  color: #3b5166;
  line-height: 1.45;
}

.s8-sect-build-item strong {
  color: #273d4f;
  font-weight: 700;
}

/* 3. Bottom Tabs Bar */
.s8-sects-tabs-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(33, 44, 52, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(110, 145, 165, 0.35);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}

.s8-sects-tabs-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.75vw, 11px);
  width: 100%;
  max-width: 1400px;
  padding: 6px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.s8-sects-tabs-track::-webkit-scrollbar {
  display: none;
}

.s8-sect-tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(74px, 7.2vw, 108px);
  height: 33px;
  padding: 0 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9bb3c2;
  font-family: var(--s8-font-main);
  font-size: clamp(11px, 0.85vw, 12.5px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  outline: none;
  transition: color 0.25s ease;
  user-select: none;
}

.s8-tab-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.s8-tab-frame path {
  fill: rgba(28, 40, 50, 0.75);
  stroke: #4f6d7f;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.s8-tab-text {
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.s8-sect-tab-btn:hover {
  color: #ffffff;
}

.s8-sect-tab-btn:hover .s8-tab-frame path {
  fill: rgba(38, 56, 70, 0.95);
  stroke: #7bb5cc;
}

.s8-sect-tab-btn.is-active {
  color: #ffffff;
  font-weight: 700;
}

.s8-sect-tab-btn.is-active .s8-tab-frame path {
  fill: #3b8896;
  stroke: #6fe5f8;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(111, 229, 248, 0.65));
}

.s8-sect-tab-btn:focus-visible {
  outline: 2px solid #6fe5f8;
  outline-offset: 2px;
}

/* Screen-reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   HIỆU ỨNG CHUYỂN MÔN PHÁI (Smooth Cross-fade Transition)
   ========================================================================== */

.s8-sects-stage.s8-is-transitioning .s8-sects-bg-img {
  opacity: 0.25;
  transform: scale(1.02);
}

.s8-sects-stage.s8-is-transitioning .s8-sects-hero-img {
  opacity: 0.2;
  transform: scale(0.97) translateX(12px);
}

.s8-sects-stage.s8-is-transitioning .s8-sect-info-panel {
  opacity: 0.2;
  transform: translateX(-10px);
}

/* 4. Video Popup Modal */
.s8-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.s8-video-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.s8-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.s8-video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background-color: #0b0707;
  border: 1px solid rgba(223, 178, 107, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  z-index: 2;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.s8-video-modal.is-open .s8-video-modal-content {
  transform: scale(1);
}

.s8-video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  line-height: 0;
  cursor: pointer;
  border-radius: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.s8-video-modal-close svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.s8-video-modal-close:hover {
  background: #b82c14;
  border-color: rgba(255, 220, 160, 0.75);
  transform: rotate(90deg) scale(1.08);
}

.s8-video-modal-player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
}

.s8-video-modal-player-wrap video,
.s8-video-modal-player-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.s8-video-modal-player-wrap video {
  object-fit: cover;
}

/* ==========================================================================
   5. FOOTER SECTION
   ========================================================================== */
.s8-footer {
  background-color: #000000;
  color: #999999;
  padding: 60px 20px 60px 20px;
  position: relative;
  z-index: 20;
}

.s8-footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 4vw, 56px);
}

.s8-footer-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.s8-footer-logo {
  width: 220px;
  height: auto;
  display: block;
}

.s8-footer-info {
  flex: 0 1 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.s8-footer-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.s8-footer-heading {
  color: var(--Grays-White, #FFF);
  text-align: center;
  font-family: 'Inter', var(--s8-font-main);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 26px; /* 144.444% */
  margin: 0 0 2px;
}

.s8-footer-line {
  color: var(--Grays-White, #FFF);
  text-align: center;
  font-family: 'Inter', var(--s8-font-main);
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: 26px; /* 144.444% */
  margin: 0;
  white-space: nowrap;
}

.s8-footer-line a {
  color: var(--Grays-White, #FFF);
  font-weight: 300;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.s8-footer-line a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.s8-footer-sep {
  display: inline-block;
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .s8-topbar-container {
    padding: 0 16px;
  }
  .s8-brand-app {
    left: 16px;
  }
  .s8-hero-section {
    aspect-ratio: 16 / 9;
    min-height: unset;
    padding-bottom: 0;
  }
  .s8-title-container {
    max-width: 400px;
    top: 44%;
  }
  .s8-frame-bridge {
    height: 0;
    margin: 0;
    padding: 0;
  }
  .s8-frame-section {
    max-width: 520px;
    transform: translateY(-70%);
  }
  .s8-features-section {
    height: auto;
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 60px;
    margin-top: clamp(-120px, -8vw, -60px);
  }
  .s8-slogan-wrapper {
    margin-bottom: 24px;
    gap: 12px;
  }
  .s8-slogan-text {
    font-size: 20px;
  }
  .s8-slogan-flourish {
    width: 65px;
  }
  .s8-card-text {
    font-size: clamp(10px, 1.4vw, 14px);
  }

  /* Khối 3: Thập Đại Môn Phái - Tablet */
  .s8-sects-stage {
    height: clamp(580px, 56vw, 650px);
  }
  .s8-sects-container {
    padding: 24px 28px 64px;
  }
  .s8-sect-info-panel {
    max-width: 320px;
  }
  .s8-sect-video-card {
    width: 190px;
    margin-bottom: 2px;
  }
  .s8-sect-name {
    font-size: 28px;
    margin: 6px 0 8px;
  }
  .s8-sect-block {
    margin-bottom: 10px;
  }
  .s8-sect-desc,
  .s8-sect-build-item {
    font-size: 13px;
    line-height: 1.4;
  }
  .s8-sects-hero-wrap {
    left: 57%;
    transform: translateX(-30%);
    width: clamp(260px, 28vw, 340px);
    bottom: 52px;
    height: calc(100% - 52px);
  }
  .s8-sects-left-polygon {
    width: 58%;
    max-width: 620px;
  }
  .s8-sects-bg-img {
    object-position: 85% center;
    opacity: 0.85;
  }
  .s8-sects-tabs-track {
    justify-content: flex-start;
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .s8-topbar {
    height: 52px;
    background-color: #f5eee4;
    border-bottom: 1px solid #ebd8be;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
  .s8-topbar-container {
    padding: 0 10px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
    max-width: 100%;
  }
  .s8-nav-menu {
    display: none;
  }
  .s8-brand-app {
    position: relative;
    top: 7px;
    left: 0;
    margin: 0;
    z-index: 100;
    display: block;
    flex-shrink: 0;
  }
  .s8-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    border: 2px solid #ecd39d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
    background: #2b1810;
    display: block;
  }
  .s8-mobile-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    margin-right: auto;
  }
  .s8-mobile-btn {
    display: block;
    height: 30px;
    line-height: 0;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    flex-shrink: 0;
    user-select: none;
  }
  .s8-mobile-btn:hover {
    filter: brightness(1.08);
  }
  .s8-mobile-btn:active {
    transform: scale(0.95);
  }
  .s8-mobile-btn img {
    height: 30px;
    width: auto;
    max-width: 95px;
    display: block;
    object-fit: contain;
    pointer-events: none;
  }
  .s8-mobile-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.5px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f7ebd8;
    border: 1px solid #e7d5be;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.15s ease;
  }
  .s8-mobile-toggle:active {
    transform: scale(0.92);
  }
  .s8-toggle-bar {
    width: 16px;
    height: 2px;
    background: #3b1d12;
    border-radius: 1px;
    margin: 0;
    transition: all 0.3s ease;
  }
  .s8-hero-section {
    aspect-ratio: auto;
    min-height: 520px;
    padding: 0;
  }
  .s8-hero-video-wrapper {
    background:
      url('../images/hanh-son-s8/video-poster-mobile.jpg') no-repeat top center / cover,
      #170406;
  }
  .s8-video-desktop {
    display: none !important;
  }
  .s8-video-mobile {
    display: block !important;
    object-fit: cover;
    object-position: top center;
  }
  .s8-hero-video-overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(20, 4, 5, 0.25) 0%,
        transparent 25%
      ),
      linear-gradient(
        to top,
        #140405 0%,
        rgba(20, 4, 5, 0.95) 8%,
        rgba(20, 4, 5, 0.5) 18%,
        transparent 32%
      );
  }
  .s8-title-container {
    top: 47%;
    width: clamp(220px, 66vw, 310px);
  }
  .s8-frame-bridge {
    height: 0;
    margin: 0;
    padding: 0;
  }
  .s8-frame-section {
    width: 100%;
    max-width: min(96%, 460px);
    padding: 0 4px;
    transform: translateY(-68%);
  }
  .s8-frame-content {
    gap: 2px;
  }
  .s8-frame-row-1 {
    gap: 3px;
  }
  .s8-frame-row-2 {
    gap: 2px;
  }
  .s8-features-section {
    height: auto;
    min-height: auto;
    padding-top: 135px;
    padding-bottom: 28px;
    background: url('../images/hanh-son-s8/nen-2.png') no-repeat center top / cover;
    background-color: transparent;
    margin-top: -60px;
    position: relative;
    z-index: 5;
  }
  .s8-slogan-wrapper {
    margin: 0 auto 20px;
    gap: clamp(8px, 2.5vw, 14px);
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  .s8-slogan-flourish {
    width: clamp(28px, 8vw, 40px);
    flex: 0 0 auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
  }
  .s8-slogan-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    flex: 0 1 auto;
    white-space: normal !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 600;
    line-height: 32px; /* 145.455% */
    background: linear-gradient(180deg, #FFFFFF 0%, #EBCC9B 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    margin: 0;
    padding: 0;
  }
  .s8-slogan-sep {
    display: none !important;
  }
  .s8-slogan-line-1,
  .s8-slogan-line-2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 600;
    line-height: 32px;
    background: linear-gradient(180deg, #FFFFFF 0%, #EBCC9B 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    display: block;
    text-align: center;
    margin: 0;
    padding: 0;
  }
  
  /* Hide desktop panoramic cards stage on mobile */
  .s8-cards-container {
    padding: 0 10px;
    overflow: visible;
  }
  .s8-cards-stage {
    display: none !important;
  }
  .s8-cards-hint-mobile {
    display: none !important;
  }

  /* 5 vertical pill cards for mobile matching design mockup */
  .s8-mobile-cards-list {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .s8-mobile-card {
    position: relative;
    width: 100%;
    height: 58px;
    min-height: 58px;
    background: #742e2c;
    border: 1px solid #ca9a61;
    border-radius: 14px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    cursor: default;
    user-select: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .s8-mobile-card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
  }
  .s8-mobile-card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(14.5px, 4.2vw, 17px);
    font-weight: 700;
    font-style: italic;
    color: #fffbee;
    letter-spacing: 0.2px;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
    flex: 1 1 auto;
    text-align: left;
    white-space: nowrap;
  }

  .s8-footer {
    padding: 22px 16px 26px;
    background-color: #000000;
  }
  .s8-footer-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
  }
  .s8-footer-brand {
    flex: 0 0 auto;
    margin: 0 auto;
  }
  .s8-footer-logo {
    width: 125px;
  }
  .s8-footer-info {
    gap: 8px;
    width: 100%;
  }
  .s8-footer-heading {
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
  }
  .s8-footer-line {
    font-size: 13px;
    line-height: 20px;
    font-weight: 300;
    white-space: normal;
  }
  .s8-footer-sep {
    margin: 0 5px;
  }

  /* Khối 3: Thập Đại Môn Phái - Mobile */
  .s8-sects-section {
    scroll-margin-top: 60px;
    padding-bottom: 0;
  }
  .s8-sects-header-bg {
    min-height: 68px;
    max-height: 110px;
  }
  .s8-sects-title-img {
    width: clamp(220px, 62vw, 330px);
  }
  .s8-sects-stage {
    height: auto;
    min-height: unset;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: visible;
    background-color: #120b0d;
  }

  /* Tabs placed at top of stage on mobile for instant access */
  .s8-sects-tabs-bar {
    order: 1;
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    height: 48px;
    background: rgba(18, 24, 30, 0.98);
    border-top: none;
    border-bottom: 1px solid rgba(110, 145, 165, 0.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    z-index: 10;
  }
  .s8-sects-tabs-track {
    justify-content: flex-start;
    padding: 0 12px;
    scroll-padding: 0 12px;
    gap: 8px;
  }
  .s8-sect-tab-btn {
    min-width: 80px;
    height: 31px;
    font-size: 11px;
    padding: 0 8px;
  }

  /* Atmospheric dark background with subtle vignette on mobile */
  .s8-sects-bg-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
  }
  .s8-sects-bg-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 25%, rgba(20, 11, 13, 0.35) 0%, rgba(20, 11, 13, 0.88) 60%, #120b0d 100%);
    pointer-events: none;
  }
  .s8-sects-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.22;
    filter: blur(1.5px);
  }

  /* Hide desktop horizontal arrow on mobile */
  .s8-sects-left-polygon {
    display: none;
  }

  /* Standing Hero Character: fully visible, no clipping */
  .s8-sects-hero-wrap {
    order: 2;
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: min(340px, 86vw);
    height: clamp(300px, 66vw, 420px);
    margin: 18px auto 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .s8-sects-hero-img {
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
  }

  /* Info Panel Container placed below the character */
  .s8-sects-container {
    order: 3;
    position: relative;
    height: auto;
    padding: 0 16px 28px;
    margin: 10px auto 0;
    justify-content: center;
    z-index: 4;
    max-width: 580px;
    width: 100%;
  }
  .s8-sect-info-panel {
    max-width: 100%;
    text-align: center;
    background: linear-gradient(180deg, rgba(248, 244, 235, 0.96) 0%, rgba(236, 230, 218, 0.94) 100%);
    border: 1px solid rgba(195, 168, 120, 0.6);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    padding: 20px 18px 22px;
  }
  .s8-sect-video-card {
    margin: 0 auto 12px;
    width: min(230px, 62vw);
  }
  .s8-sect-name {
    font-size: 26px;
    margin: 8px 0 10px;
    color: #213547;
  }
  .s8-sect-badge {
    justify-content: center;
  }
  .s8-sect-desc {
    padding-left: 0;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 95%;
    margin: 0 auto;
  }
  .s8-sect-builds-list {
    padding-left: 0;
  }
  .s8-sect-build-item {
    font-size: 13.5px;
    line-height: 1.5;
    margin: 4px 0;
  }
}

@keyframes s8PulseHint {
  0%, 100% { opacity: 0.55; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

@media (max-width: 480px) {
  .s8-topbar {
    height: 50px;
  }
  .s8-topbar-container {
    padding: 0 8px 0 6px;
  }
  .s8-brand-app {
    top: 6px;
  }
  .s8-app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }
  .s8-mobile-auth {
    gap: 5px;
    margin-left: 6px;
  }
  .s8-mobile-btn {
    height: 27px;
  }
  .s8-mobile-btn img {
    height: 27px;
    max-width: 82px;
  }
  .s8-mobile-toggle {
    width: 35px;
    height: 35px;
    margin-left: 4px;
  }
  .s8-toggle-bar {
    width: 15px;
    height: 2px;
  }
  .s8-hero-section {
    min-height: 490px;
    padding: 0;
  }
  .s8-title-container {
    top: 47%;
    width: clamp(200px, 72vw, 290px);
  }
  .s8-frame-bridge {
    height: 0;
    margin: 0;
    padding: 0;
  }
  .s8-frame-section {
    max-width: 96%;
    padding: 0 2px;
    transform: translateY(-66%);
  }
  .s8-features-section {
    padding-top: 130px;
    padding-bottom: 20px;
    margin-top: -45px;
  }
  .s8-slogan-wrapper {
    gap: 8px;
    padding: 0 8px;
    margin-bottom: 16px;
  }
  .s8-slogan-flourish {
    width: clamp(22px, 6.5vw, 30px);
  }
  .s8-mobile-cards-list {
    max-width: 350px;
    gap: 12px;
  }
  .s8-mobile-card {
    height: 54px;
    min-height: 54px;
    padding: 0 14px;
    border-radius: 13px;
    gap: 12px;
  }
  .s8-mobile-card-icon {
    width: 36px;
    height: 36px;
  }
  .s8-mobile-card-title {
    font-size: clamp(14px, 4vw, 16px);
  }

  /* Khối 3: Thập Đại Môn Phái - Small Mobile */
  .s8-sects-header-bg {
    min-height: 56px;
    max-height: 84px;
  }
  .s8-sects-title-img {
    width: clamp(180px, 66vw, 250px);
  }
  .s8-sects-tabs-bar {
    height: 44px;
  }
  .s8-sect-tab-btn {
    min-width: 74px;
    height: 28px;
    font-size: 10.5px;
    padding: 0 6px;
  }
  .s8-sects-hero-wrap {
    width: min(280px, 88vw);
    height: clamp(260px, 62vw, 320px);
    margin: 12px auto 0;
  }
  .s8-sects-container {
    padding: 0 12px 24px;
    margin-top: 8px;
  }
  .s8-sect-info-panel {
    padding: 16px 12px 18px;
  }
  .s8-sect-video-card {
    width: min(190px, 58vw);
    margin-bottom: 10px;
  }
  .s8-sect-name {
    font-size: 22px;
    margin: 4px 0 8px;
  }
  .s8-sect-desc,
  .s8-sect-build-item {
    font-size: 12.5px;
    line-height: 1.45;
  }
}

