/* ===================================================================
   สไลด์หน้าแรก (hero) — assets/js/hero-slider.js
   รูปที่ 1: แบบ 2 Glow Panels | รูปที่ 2: รูปนักเรียนเฟดทับกัน 3 สไตล์ | รูปที่ 3: โปสเตอร์รุ่นพี่แบบพัด
   ทุก class ขึ้นต้นด้วย hx- (ไม่ชนกับส่วนอื่นของเว็บ)
   =================================================================== */
.hx {
  --hx-deep: #071530; --hx-navy: #0b1e3f; --hx-royal: #1d3fae; --hx-bright: #2a54d6; --hx-sky: #93b4ff;
  --hx-rose: #f43f5e; --hx-rose-deep: #e11d48; --hx-en: 'Plus Jakarta Sans', 'Prompt', sans-serif;
  position: relative; height: clamp(660px, 92vh, 800px); overflow: hidden; background: var(--hx-deep); color: #fff; isolation: isolate;
  font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
}
.hx *, .hx *::before, .hx *::after { box-sizing: border-box; }
.hx-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; overflow: hidden; }
.hx-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s; z-index: 1; }
.hx-wrap { position: relative; z-index: 3; height: 100%; max-width: 1300px; margin: 0 auto; padding: 116px 40px 0; }
.hx-slide [data-in] { opacity: 0; transform: translateY(20px); }
.hx-slide.is-active [data-in] { animation: hxIn .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 130ms + 200ms); }
@keyframes hxIn { to { opacity: 1; transform: none; } }
.hx-slide [data-pop] { opacity: 0; transform: translateY(26px) scale(.97); }
.hx-slide.is-active [data-pop] { animation: hxPop 1s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 140ms + 250ms); }
@keyframes hxPop { to { opacity: 1; transform: var(--tf, none); } }
.hx-slide.is-active .hx-kb img { animation: hxKen 10s ease-out forwards; }
@keyframes hxKen { from { transform: scale(1.09); } to { transform: scale(1); } }

/* controls */
.hx-nav { position: absolute; z-index: 6; bottom: 24px; right: max(40px, calc(50% - 610px)); display: flex; align-items: center; gap: 10px; }
.hx-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(7, 21, 48, .45); color: #fff; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.hx-arrow:hover { background: rgba(255, 255, 255, .16); transform: scale(1.06); }
.hx-dots { display: flex; gap: 8px; margin-right: 6px; }
.hx-dots button { width: 46px; height: 4px; border: 0; padding: 0; border-radius: 99px; background: rgba(255, 255, 255, .28); overflow: hidden; cursor: pointer; }
.hx-dots button i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fff, #ffd1da); border-radius: 99px; }
.hx-dots button.on i { animation: hxBar var(--hx-ms, 6500ms) linear forwards; }
.hx-dots button.done i { width: 100%; }
.hx.is-paused .hx-dots button.on i { animation-play-state: paused; }
@keyframes hxBar { to { width: 100%; } }

/* shared text */
.hx-kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; letter-spacing: .4px; padding: 7px 16px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hx-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--hx-rose); box-shadow: 0 0 0 4px rgba(244, 63, 94, .25); }
.hx-more { display: inline-flex; align-items: center; gap: 8px; color: #fff !important; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--hx-rose); padding-bottom: 3px; margin-top: 26px; align-self: flex-start; }
.hx-grad { background: linear-gradient(90deg, #ff6b85, var(--hx-rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===================================================================
   รูปที่ 1 — Glow Panels
   =================================================================== */
.hx-s1 { background: radial-gradient(120% 90% at 12% 18%, #1b3f96 0%, #0d2558 42%, var(--hx-deep) 78%); }
.hx-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(70% 70% at 25% 35%, #000 30%, transparent 100%); mask-image: radial-gradient(70% 70% at 25% 35%, #000 30%, transparent 100%); }
.hx-left { position: relative; height: 100%; width: 48%; max-width: 620px; display: flex; flex-direction: column; }
.hx-inst { display: flex; align-items: center; gap: 14px; font-size: clamp(1.35rem, 2.1vw, 1.9rem); font-weight: 700; letter-spacing: .5px; color: #e6edff; margin: 0; }
.hx-inst::before { content: ''; width: 44px; height: 4px; border-radius: 9px; background: linear-gradient(90deg, var(--hx-rose), #fb7185); box-shadow: 0 0 14px rgba(244, 63, 94, .7); }
.hx-brand { font-family: var(--hx-en); font-weight: 800; line-height: .98; letter-spacing: -2px; margin: 10px 0 0; font-size: clamp(3.2rem, 6.1vw, 5.7rem); white-space: nowrap; color: #fff; text-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.hx-brand .gen { background: linear-gradient(180deg, #ff6b85 0%, var(--hx-rose) 45%, var(--hx-rose-deep) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 22px rgba(244, 63, 94, .45)); }
.hx-slogan { font-size: clamp(1.6rem, 2.8vw, 2.5rem); font-weight: 800; margin: 14px 0 0; line-height: 1.2; color: #fff; text-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.hx-team { position: relative; flex: 1; min-height: 260px; margin-top: 14px; filter: drop-shadow(0 18px 28px rgba(3, 10, 30, .5)); }
.hx-team::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: -30px; height: 70%; background: radial-gradient(50% 60% at 50% 70%, rgba(42, 84, 214, .55), transparent 70%); z-index: -1; }
.hx-tt { position: absolute; bottom: 0; margin: 0; }
.hx-tt img { display: block; height: 100%; width: auto; max-width: none; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); }
.hx-tt figcaption { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; font-weight: 700; font-size: .98rem; padding: 6px 17px; border-radius: 99px; background: rgba(255, 255, 255, .96); color: #0b1e3f; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.hx-tt-1 { left: 0; height: 80%; z-index: 1; }
.hx-tt-2 { left: 21%; height: 90%; z-index: 2; }
.hx-tt-3 { left: 40%; height: 100%; z-index: 4; }
.hx-tt-4 { left: 71%; height: 82%; z-index: 1; }
.hx-slide .hx-tt { opacity: 0; transform: translateY(40px); }
.hx-slide.is-active .hx-tt { animation: hxUp .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 110ms + 500ms); }
@keyframes hxUp { to { opacity: 1; transform: none; } }
.hx-photos { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 54%; }
.hx-ph { position: absolute; margin: 0; overflow: hidden; border-radius: 30px; box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 0 0 1px rgba(147, 180, 255, .25), 0 0 60px rgba(42, 84, 214, .35); }
.hx-ph img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.hx-ph::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .22) 0%, transparent 32%), linear-gradient(0deg, rgba(7, 21, 48, .35), transparent 40%); pointer-events: none; }
.hx-ph-1 { top: 112px; height: calc(50% - 70px); left: 6%; right: 12%; }
.hx-ph-1 img { object-position: 35% 38%; }
.hx-ph-2 { bottom: 60px; height: calc(50% - 70px); left: 18%; right: 5%; }
.hx-ph-2 img { object-position: 60% 55%; }
.hx-ring { position: absolute; z-index: 0; border-radius: 50%; border: 1px solid rgba(147, 180, 255, .22); }
.hx-spark { position: absolute; z-index: 3; color: #fff; text-shadow: 0 0 14px rgba(255, 255, 255, .9); animation: hxTw 2.6s ease-in-out infinite; }
@keyframes hxTw { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* ===================================================================
   รูปที่ 2 — รูปนักเรียนสีจริง เฟดทับกัน (3 สไตล์)
   =================================================================== */
.hx-s2 { background: #05080f; }
.hx-x { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hx-x img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
/* ภาพสลับแบบค่อย ๆ จางทับกัน (3 ภาพ วนรอบละ 9 วินาที) */
.hx-cross .hx-x { opacity: 0; animation: hxCross 12s ease-in-out infinite; }
.hx-cross .hx-x:nth-child(1) { animation-delay: 0s; }
.hx-cross .hx-x:nth-child(2) { animation-delay: 3s; }
.hx-cross .hx-x:nth-child(3) { animation-delay: 6s; }
.hx-cross .hx-x:nth-child(4) { animation-delay: 9s; }
.hx-layer .hx-x:nth-child(n+4) { display: none; }
@keyframes hxCross { 0% { opacity: 0; transform: scale(1.08); } 6%, 25% { opacity: 1; } 34% { opacity: 0; } 100% { opacity: 0; transform: scale(1); } }
.hx-s2 h2 { margin: 16px 0 0; font-weight: 800; line-height: 1.08; color: #fff; }
.hx-lv { display: flex; gap: 12px; flex-wrap: wrap; }
.hx-lv div { border-radius: 18px; padding: 15px 20px; min-width: 150px; background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.hx-lv b { display: block; font-size: 1.4rem; font-family: var(--hx-en); color: #fff; }
.hx-lv span { font-size: .86rem; color: rgba(255, 255, 255, .85); }
.hx-sub { font-size: 1.12rem; line-height: 1.75; color: rgba(255, 255, 255, .9); margin: 14px 0 24px; max-width: 560px; }

/* สไตล์ 1 · Crossfade Stage — ภาพเต็มจอสลับเฟด + ตัวอักษร 2/69 ใหญ่ */
.hx-s2a .hx-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(4, 7, 15, .9) 0%, rgba(4, 7, 15, .72) 38%, rgba(4, 7, 15, .15) 72%, rgba(4, 7, 15, 0) 100%), linear-gradient(0deg, rgba(4, 7, 15, .75) 0%, transparent 38%); }
.hx-s2a .hx-wrap { display: flex; flex-direction: column; justify-content: center; padding-bottom: 70px; }
.hx-s2a h2 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); }
.hx-s2a .hx-big { display: block; font-family: var(--hx-en); font-size: clamp(5rem, 11vw, 9.6rem); line-height: .9; letter-spacing: -4px; margin-top: 4px; background: linear-gradient(180deg, #ffffff 0%, #ffd1da 40%, var(--hx-rose) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 30px rgba(244, 63, 94, .35)); }

/* สไตล์ 2 · Layered Fade — 3 ภาพเรียงซ้าย-กลาง-ขวา เฟดกลืนกัน + การ์ดกระจกกลางจอ */
.hx-s2b .hx-x { top: 0; bottom: 0; width: 46%; }
.hx-s2b .hx-x:nth-child(1) { left: 0; -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent 100%); mask-image: linear-gradient(90deg, #000 60%, transparent 100%); }
.hx-s2b .hx-x:nth-child(2) { left: 27%; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 70%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 70%, transparent 100%); z-index: 1; }
.hx-s2b .hx-x:nth-child(3) { left: auto; right: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%); mask-image: linear-gradient(90deg, transparent 0%, #000 40%); }
.hx-s2b .hx-shade { position: absolute; inset: 0; z-index: 1; background: radial-gradient(60% 70% at 50% 55%, rgba(4, 7, 15, .55), rgba(4, 7, 15, .2) 70%), linear-gradient(0deg, rgba(4, 7, 15, .6), transparent 40%); }
.hx-s2b .hx-wrap { display: flex; align-items: center; justify-content: center; padding-bottom: 60px; }
.hx-s2b .hx-card { text-align: center; max-width: 760px; padding: 38px 44px 34px; border-radius: 32px; background: linear-gradient(160deg, rgba(10, 16, 34, .62), rgba(10, 16, 34, .42)); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 40px 80px rgba(0, 0, 0, .45); display: flex; flex-direction: column; align-items: center; }
.hx-s2b .hx-kicker, .hx-s2b .hx-more { align-self: center; }
.hx-s2b h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
.hx-s2b .hx-sub { margin-left: auto; margin-right: auto; }
.hx-s2b .hx-lv { justify-content: center; }

/* สไตล์ 3 · Spotlight Type — ภาพสลับเฟด + สปอตไลต์ + ตัวเลข 2/69 แบบเส้นขอบยักษ์ */
.hx-s2c .hx-shade { position: absolute; inset: 0; z-index: 1; background: radial-gradient(55% 65% at 30% 55%, rgba(4, 7, 15, .2) 0%, rgba(4, 7, 15, .78) 75%), linear-gradient(0deg, rgba(4, 7, 15, .8), transparent 45%); }
.hx-s2c .hx-outline { position: absolute; z-index: 2; right: max(20px, calc(50% - 640px)); top: 50%; transform: translateY(-46%); font-family: var(--hx-en); font-weight: 800; font-size: clamp(9rem, 22vw, 20rem); line-height: .8; letter-spacing: -10px; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .55); text-shadow: 0 0 60px rgba(244, 63, 94, .25); pointer-events: none; }
.hx-s2c .hx-wrap { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 90px; }
.hx-s2c h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); text-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.hx-s2c .hx-tagline { display: inline-block; margin-top: 14px; font-size: 1.1rem; font-weight: 700; padding: 8px 18px; border-radius: 12px; background: linear-gradient(135deg, var(--hx-rose), var(--hx-rose-deep)); box-shadow: 0 12px 28px rgba(225, 29, 72, .4); align-self: flex-start; }

/* ===================================================================
   รูปที่ 3 — โปสเตอร์รุ่นพี่กางเป็นพัด
   =================================================================== */
.hx-s3 { background: radial-gradient(90% 90% at 78% 50%, #1d3fae 0%, #0d2558 45%, var(--hx-deep) 80%); }
.hx-s3 .hx-wrap { display: flex; flex-direction: column; justify-content: center; padding-bottom: 60px; }
.hx-s3 .hx-txt { max-width: 520px; position: relative; z-index: 2; display: flex; flex-direction: column; }
.hx-s3 h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); margin: 16px 0 0; font-weight: 800; line-height: 1.12; color: #fff; }
.hx-s3 h2 em { font-style: normal; background: linear-gradient(90deg, #fbbf24, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-s3 p { font-size: 1.1rem; line-height: 1.7; color: rgba(255, 255, 255, .85); margin: 14px 0 0; }
.hx-fan { position: absolute; z-index: 1; right: max(30px, calc(50% - 630px)); top: 50%; width: 620px; height: 470px; transform: translateY(-42%); }
.hx-fan::before { content: ''; position: absolute; inset: -10% -5%; background: radial-gradient(50% 50% at 55% 50%, rgba(251, 191, 36, .25), transparent 70%); }
.hx-rv { position: absolute; width: 340px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 26px 54px rgba(0, 0, 0, .45); border: 4px solid rgba(255, 255, 255, .95); }
.hx-rv img { display: block; width: 100%; height: auto; }
.hx-rv:nth-child(1) { left: 0; top: 64px; --tf: rotate(-9deg); }
.hx-rv:nth-child(2) { left: 140px; top: 10px; --tf: rotate(0deg); z-index: 2; }
.hx-rv:nth-child(3) { left: 280px; top: 72px; --tf: rotate(9deg); }

/* ===================================================================
   Tablet / mobile
   =================================================================== */
@media (max-width: 1100px) {
  .hx-left { width: 54%; }
  .hx-photos { width: 50%; }
  .hx-fan { transform: translateY(-42%) scale(.8); transform-origin: right center; }
}
@media (max-width: 900px) {
  .hx { height: 860px; }
  .hx-wrap { padding: 96px 18px 0; }
  .hx-nav { right: 50%; transform: translateX(50%); bottom: 10px; }
  .hx-arrow, .hx-spark { display: none; }
  .hx-dots button { width: 34px; }
  .hx-left { width: 100%; max-width: none; position: static; }
  .hx-inst { font-size: 1.15rem; }
  .hx-inst::before { width: 30px; }
  .hx-brand { font-size: 3.1rem; letter-spacing: -1px; }
  .hx-slogan { font-size: 1.55rem; }
  .hx-photos { top: 270px; bottom: auto; height: 340px; width: 100%; left: 0; }
  .hx-ph { border-radius: 20px; }
  .hx-ph-1 { top: 0; height: 52%; left: 4%; right: 14%; }
  .hx-ph-2 { bottom: 0; height: 52%; left: 14%; right: 4%; }
  .hx-team { position: absolute; left: 0; right: 0; bottom: 0; height: 330px; margin: 0 auto; max-width: 520px; z-index: 4; }
  .hx-tt figcaption { font-size: .8rem; padding: 4px 12px; bottom: 32px; }
  .hx-s2a .hx-shade { background: linear-gradient(180deg, rgba(4, 7, 15, .35) 0%, rgba(4, 7, 15, .9) 58%); }
  .hx-s2a .hx-wrap, .hx-s2c .hx-wrap { justify-content: flex-end; padding-bottom: 64px; }
  .hx-s2b .hx-x { width: 70%; }
  .hx-s2b .hx-x:nth-child(2) { left: 15%; }
  .hx-s2b .hx-card { padding: 26px 18px 22px; border-radius: 24px; }
  .hx-s2c .hx-outline { top: 26%; font-size: 9rem; letter-spacing: -5px; right: 10px; }
  .hx-lv div { min-width: 0; flex: 1; padding: 11px 12px; }
  .hx-lv b { font-size: 1.05rem; }
  .hx-s3 .hx-wrap { justify-content: flex-start; }
  .hx-fan { right: 50%; top: auto; bottom: 46px; transform: translateX(50%) scale(.62); transform-origin: center bottom; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .hx { height: 900px; }
  .hx-wrap { padding: 110px 32px 0; }
  .hx-brand { font-size: 4.4rem; }
  .hx-slogan { font-size: 2rem; }
  .hx-inst { font-size: 1.45rem; }
  .hx-photos { top: 320px; height: 330px; }
  .hx-team { height: 400px; max-width: 600px; }
  .hx-fan { transform: translateX(50%) scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  .hx-slide.is-active [data-in], .hx-slide.is-active [data-pop], .hx-slide.is-active .hx-tt, .hx-slide.is-active .hx-kb img, .hx-spark { animation: none !important; opacity: 1; transform: var(--tf, none); }
  .hx-cross .hx-x { animation: none; opacity: 0; }
  .hx-cross .hx-x:first-child { opacity: 1; }
}
@media (max-width: 600px) {
  .hx-lv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hx-lv div { padding: 10px 6px; text-align: center; border-radius: 14px; }
  .hx-lv span { display: none; }
  .hx-lv b { font-size: .98rem; }
}
/* ===================================================================
   รูปที่ 1 แบบ Cinematic Light — รูปเต็มฝั่งขวา เฟดแนวเฉียง + แสงวิ่งผ่าน + ตัว GEN มีประกาย
   (เส้นแดงคั่นรูปซ่อนไว้ เปิดได้ด้วย class hx-seam-on)
   =================================================================== */
.hx-cine { width: 62%; }
.hx-cine .hx-ph { left: 0; right: 0; border-radius: 0; box-shadow: none; }
.hx-cine .hx-ph::after { display: none; }
.hx-cine .hx-ph-1 { top: 0; height: 66%; z-index: 1; -webkit-mask-image: linear-gradient(105deg, transparent 0%, transparent 10%, #000 40%), linear-gradient(to bottom, #000 66%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(105deg, transparent 0%, transparent 10%, #000 40%), linear-gradient(to bottom, #000 66%, transparent 100%); mask-composite: intersect; }
.hx-cine .hx-ph-1 img { object-position: 40% 38%; }
.hx-cine .hx-ph-2 { top: auto; bottom: 0; height: 62%; z-index: 2; -webkit-mask-image: linear-gradient(105deg, transparent 0%, transparent 22%, #000 52%), linear-gradient(170deg, transparent 0%, transparent 18%, #000 42%); -webkit-mask-composite: source-in; mask-image: linear-gradient(105deg, transparent 0%, transparent 22%, #000 52%), linear-gradient(170deg, transparent 0%, transparent 18%, #000 42%); mask-composite: intersect; }
.hx-cine .hx-ph-2 img { object-position: 62% 55%; }
.hx-cine::before { content: ''; position: absolute; z-index: 3; top: -20%; bottom: -20%; width: 22%; left: -30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); transform: skewX(-18deg); animation: hxSweep 7s ease-in-out infinite; animation-delay: 1.2s; pointer-events: none; }
@keyframes hxSweep { 0% { left: -30%; } 45%, 100% { left: 120%; } }
.hx-cine::after { content: ''; position: absolute; inset: 0; z-index: 3; background: linear-gradient(0deg, rgba(7, 21, 48, .5) 0%, transparent 20%); pointer-events: none; }
.hx-seam { display: none; position: absolute; z-index: 4; left: 18%; right: -6%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, rgba(244, 63, 94, .95) 35%, #ffd1da 60%, transparent); transform: rotate(-9deg); box-shadow: 0 0 16px 2px rgba(244, 63, 94, .7); pointer-events: none; }
.hx-seam-on .hx-seam { display: block; }
.hx-water { position: absolute; z-index: 0; left: -1%; bottom: 4%; font-family: var(--hx-en); font-weight: 800; font-size: 13vw; line-height: .8; letter-spacing: -6px; color: transparent; -webkit-text-stroke: 1.5px rgba(147, 180, 255, .12); white-space: nowrap; pointer-events: none; }
.hx-s1-cine .hx-brand .new { background: linear-gradient(180deg, #ffffff 30%, #c9d7ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-brand .hx-shine { background: linear-gradient(100deg, var(--hx-rose-deep) 0%, #ff5c7a 38%, #ffe4ea 50%, #ff5c7a 62%, var(--hx-rose) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; animation: hxShine 5s ease-in-out infinite; }
@keyframes hxShine { 0%, 60% { background-position: 100% 0; } 100% { background-position: -120% 0; } }
@media (max-width: 900px) {
  .hx-cine { width: 100%; }
  .hx-cine .hx-ph-1 { height: 60%; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); }
  .hx-cine .hx-ph-2 { height: 60%; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 36%, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 36%, #000 72%, transparent 100%); }
  .hx-seam { display: none !important; }
  .hx-water { font-size: 30vw; bottom: 30%; }
}
@media (prefers-reduced-motion: reduce) { .hx-cine::before, .hx-brand .hx-shine { animation: none; } }
/* เงาจาง ๆ ขอบบน ให้แถบเมนูโปร่งใสอ่านชัดบนทุกรูป */
.hx::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 170px; z-index: 5; pointer-events: none; background: linear-gradient(180deg, rgba(7, 21, 48, .82) 0%, rgba(7, 21, 48, .45) 50%, transparent 100%); }
/* จองพื้นที่สไลด์ไว้ก่อนโหลดเสร็จ (หน้าไม่กระตุก) */
.lk-hero { min-height: clamp(660px, 92vh, 800px); background: #071530; }
@media (max-width: 900px) { .lk-hero { min-height: 860px; } }
@media (min-width: 601px) and (max-width: 900px) { .lk-hero { min-height: 900px; } }
/* ===================================================================
   ตัวอย่างการจัดวางรูปแรกบนมือถือ (?hm=1..4) — ติวเตอร์เด่นขึ้น รูปเด็กเด่นน้อยลง
   =================================================================== */
@media (max-width: 900px) {
  .hx-m1 .hx-team, .hx-m2 .hx-team, .hx-m3 .hx-team, .hx-m4 .hx-team { max-width: 560px; }
  .hx-m1 .hx-tt-1, .hx-m2 .hx-tt-1, .hx-m3 .hx-tt-1, .hx-m4 .hx-tt-1 { left: -4%; }
  .hx-m1 .hx-tt-2, .hx-m2 .hx-tt-2, .hx-m3 .hx-tt-2, .hx-m4 .hx-tt-2 { left: 17%; }
  .hx-m1 .hx-tt-3, .hx-m2 .hx-tt-3, .hx-m3 .hx-tt-3, .hx-m4 .hx-tt-3 { left: 35%; }
  .hx-m1 .hx-tt-4, .hx-m2 .hx-tt-4, .hx-m3 .hx-tt-4, .hx-m4 .hx-tt-4 { left: 66%; }
  .hx-m1 .hx-tt figcaption, .hx-m2 .hx-tt figcaption, .hx-m3 .hx-tt figcaption, .hx-m4 .hx-tt figcaption { font-size: .9rem; padding: 5px 13px; bottom: 46px; }
  .hx-m1 .hx-team::before, .hx-m2 .hx-team::before, .hx-m3 .hx-team::before, .hx-m4 .hx-team::before { background: radial-gradient(55% 60% at 50% 70%, rgba(42, 84, 214, .75), transparent 72%); }

  /* แบบ 1: รูปเด็กจางลงเป็นฉากหลังด้านบน ติวเตอร์ใหญ่ขึ้น */
  .hx-m1 .hx-photos { top: 230px; height: 300px; opacity: .38; filter: saturate(.75); }
  .hx-m1 .hx-team { height: 420px; bottom: -20px; }

  /* แบบ 2: รูปเด็กเป็นภาพเล็ก 2 ใบเรียงคู่ใต้สโลแกน ติวเตอร์ใหญ่เต็มด้านล่าง */
  .hx-m2 .hx-photos { top: 252px; height: 104px; left: 18px; right: 18px; width: auto; transform: none; max-width: none; }
  .hx-m2 .hx-photos::before, .hx-m2 .hx-photos::after { display: none; }
  .hx-m2 .hx-cine .hx-ph { top: 0; bottom: 0; height: 100%; border-radius: 16px; -webkit-mask-image: none; mask-image: none; box-shadow: 0 12px 26px rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .85); }
  .hx-m2 .hx-cine .hx-ph-1 { left: 0; right: 51%; }
  .hx-m2 .hx-cine .hx-ph-2 { left: 51%; right: 0; }
  .hx-m2 .hx-team { height: 440px; bottom: -24px; }
  .hx-m2 .hx-water { display: none; }

  /* แบบ 3: รูปเด็กเป็นพื้นหลังทั้งสไลด์แบบจางมาก ติวเตอร์ใหญ่ที่สุด */
  .hx-m3 .hx-photos { top: 0; height: 100%; opacity: .2; filter: saturate(.6); }
  .hx-m3 .hx-cine .hx-ph-1 { height: 100%; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); }
  .hx-m3 .hx-cine .hx-ph-1 img { object-position: 35% 40%; }
  .hx-m3 .hx-cine .hx-ph-2 { display: none; }
  .hx-m3 .hx-team { height: 480px; bottom: -36px; }

  /* แบบ 4: ไม่มีรูปเด็กในรูปแรก (รูปเด็กยังอยู่ในรูปที่ 2) ติวเตอร์เต็มเวที */
  .hx-m4 .hx-photos { display: none; }
  .hx-m4 .hx-team { height: 490px; bottom: -36px; }
  .hx-m4 .hx-water { bottom: 46%; font-size: 34vw; -webkit-text-stroke: 1.5px rgba(147, 180, 255, .16); }
}
/* มือถือ (ตัวอย่าง ?hm): ขนาด 4 คนสมดุล + ป้ายชื่อเป็นแถวแยก อยู่บนสุดเสมอ ไม่ถูกบัง */
.hx-names { display: none; }
@media (max-width: 900px) {
  .hx-m1 .hx-tt-1, .hx-m2 .hx-tt-1, .hx-m3 .hx-tt-1, .hx-m4 .hx-tt-1 { height: 80%; }
  .hx-m1 .hx-tt-2, .hx-m2 .hx-tt-2, .hx-m3 .hx-tt-2, .hx-m4 .hx-tt-2 { height: 86%; }
  .hx-m1 .hx-tt-3, .hx-m2 .hx-tt-3, .hx-m3 .hx-tt-3, .hx-m4 .hx-tt-3 { height: 92%; left: 37%; }
  .hx-m1 .hx-tt-4, .hx-m2 .hx-tt-4, .hx-m3 .hx-tt-4, .hx-m4 .hx-tt-4 { height: 82%; left: 67%; }
  .hx-m1 .hx-tt figcaption, .hx-m2 .hx-tt figcaption, .hx-m3 .hx-tt figcaption, .hx-m4 .hx-tt figcaption { display: none; }
  .hx-m1 .hx-team { height: 390px; bottom: -14px; }
  .hx-m2 .hx-team { height: 400px; bottom: -16px; }
  .hx-m3 .hx-team { height: 420px; bottom: -22px; }
  .hx-m4 .hx-team { height: 430px; bottom: -24px; }
  .hx-m1 .hx-names, .hx-m2 .hx-names, .hx-m3 .hx-names, .hx-m4 .hx-names { display: block; position: absolute; z-index: 10; left: 0; right: 0; bottom: 56px; height: 34px; }
  .hx-names span { position: absolute; transform: translateX(-50%); white-space: nowrap; font-weight: 700; font-size: .88rem; padding: 5px 13px; border-radius: 99px; background: rgba(255, 255, 255, .96); color: #0b1e3f; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
  .hx-names .hx-nm-1 { left: 17%; } .hx-names .hx-nm-2 { left: 41%; } .hx-names .hx-nm-3 { left: 64%; } .hx-names .hx-nm-4 { left: 87%; }
  .hx-slide .hx-names { opacity: 0; }
  .hx-slide.is-active .hx-names { animation: hxIn .8s ease forwards; animation-delay: 1s; }
}