/* ===== หน้าแรก: โปสเตอร์โฆษณาสไลด์ + เมนู “ตัวอย่าง” (js/67-home-media.js) ===== */

/* ---------- โปสเตอร์โฆษณา (แนวนอน 16:5) ---------- */
.hads{position:relative;margin:18px 0 6px;border-radius:18px;overflow:hidden;background:#0b0908;box-shadow:0 14px 40px rgba(0,0,0,.45);isolation:isolate}
.ha-vp{overflow:hidden;aspect-ratio:16/5}
.ha-track{display:flex;height:100%;transition:transform .7s cubic-bezier(.65,0,.35,1);will-change:transform}
.ha-s{flex:0 0 100%;height:100%;display:block}
.ha-s img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none}
a.ha-s{cursor:pointer}
.ha-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:44px;height:44px;border-radius:50%;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:28px;line-height:1;display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity .2s,background .2s;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.ha-nav.prev{left:14px}.ha-nav.next{right:14px}
.hads:hover .ha-nav,.ha-nav:focus-visible{opacity:1}
.ha-nav:hover{background:rgba(245,154,35,.92);color:#1a1009}
.ha-dots{position:absolute;left:0;right:0;bottom:12px;z-index:2;display:flex;justify-content:center;gap:7px;pointer-events:none}
.ha-dots button{pointer-events:auto;width:8px;height:8px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.5);box-shadow:0 1px 3px rgba(0,0,0,.4);cursor:pointer;transition:width .3s,background .3s}
.ha-dots button.on{width:26px;background:#fff}
.hads.empty{box-shadow:none;background:transparent;border:2px dashed rgba(255,255,255,.18);border-radius:16px}
.hads.empty a{display:block;padding:22px 16px;text-align:center;color:var(--mute);font-size:14px;text-decoration:none}
.hads.empty a:hover{color:var(--ink)}

/* ---------- เมนู หนังของฉัน | ตัวอย่าง ---------- */
.htabs{display:flex;gap:6px;margin:22px 0 0;padding:5px;width:max-content;max-width:100%;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08)}
.htabs button{display:inline-flex;align-items:center;gap:7px;padding:9px 20px;border:0;border-radius:999px;background:transparent;color:var(--mute);font:inherit;font-size:15px;font-weight:700;cursor:pointer;transition:background .2s,color .2s}
.htabs button:hover{color:var(--ink)}
.htabs button[aria-selected=true]{background:#f59a23;color:#1a1009;box-shadow:0 4px 14px rgba(245,154,35,.35)}
.htabs button i{font-style:normal;font-size:12px;min-width:20px;padding:1px 6px;border-radius:99px;background:rgba(255,255,255,.12)}
.htabs button[aria-selected=true] i{background:rgba(0,0,0,.15)}
.htabs[hidden],#hex[hidden],#hrows[hidden]{display:none!important}

/* ---------- ตัวอย่างผลงาน ---------- */
#p-home .hex{margin-top:22px;padding:0}
.hx-hd{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 20px;flex-wrap:wrap}
.hx-hd h2{margin:0;font-size:22px;font-weight:800;color:var(--ink)}
.hx-hd p{margin:4px 0 0;color:var(--mute);font-size:14px}
.hx-chips{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 4px}
.hx-chips button{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:transparent;color:var(--ink);font:inherit;font-size:14px;cursor:pointer}
.hx-chips button i{font-style:normal;font-size:12px;color:var(--mute)}
.hx-chips button[aria-pressed=true]{background:var(--ink);color:#141010;border-color:transparent}
.hx-chips button[aria-pressed=true] i{color:inherit;opacity:.6}
.hx-grid{columns:4 230px;column-gap:14px;margin-top:14px}
.hx-c{position:relative;display:block;width:100%;margin:0 0 14px;padding:0;border:0;border-radius:14px;overflow:hidden;background:#151110;color:#fff;font:inherit;text-align:left;cursor:zoom-in;break-inside:avoid;box-shadow:0 8px 22px rgba(0,0,0,.35);transition:transform .2s,box-shadow .2s}
.hx-c:hover{transform:translateY(-4px);box-shadow:0 16px 32px rgba(0,0,0,.5)}
.hx-c:focus-visible{outline:3px solid #f59a23;outline-offset:3px}
.hx-m{position:relative;display:block;background:#000}
.hx-m img,.hx-m video{display:block;width:100%;height:auto;min-height:120px;object-fit:cover}
.hx-c.t-video .hx-m video,.hx-c.t-youtube .hx-m img{aspect-ratio:16/9}
.hx-play{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;background:rgba(0,0,0,.55);display:grid;place-items:center;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);transition:opacity .2s,transform .2s}
.hx-play svg{width:24px;height:24px;fill:#fff;margin-left:3px}
.hx-c:hover .hx-play{opacity:0;transform:scale(.8)}
.hx-c.t-youtube:hover .hx-play{opacity:1;transform:scale(1.08);background:#e53935}
.hx-ln{display:grid;place-items:center;aspect-ratio:4/3;font-weight:700;background:linear-gradient(135deg,#2a2018,#120e0b)}
.hx-src{position:absolute;top:10px;left:10px;z-index:2;padding:4px 9px;border-radius:99px;font-size:11.5px;font-weight:700;color:#fff;background:rgba(0,0,0,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.hx-src.s-flow{background:linear-gradient(90deg,#1a73e8,#34a853)}
.hx-src.s-meta{background:linear-gradient(90deg,#0866ff,#a033ff)}
.hx-b{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:2px;padding:28px 12px 11px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.78))}
.hx-b b{font-size:14px;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hx-b small{font-size:12px;opacity:.8}
.hx-em{margin-top:18px;padding:34px 18px;text-align:center;color:var(--mute);border:1px dashed rgba(255,255,255,.18);border-radius:16px;font-size:14.5px;line-height:1.6}
.hx-em a{color:#f59a23}

/* ---------- ดูเต็มจอ ---------- */
.hxl{position:fixed;inset:0;z-index:99400;display:grid;place-items:center;padding:24px;background:rgba(6,4,3,.88);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;transition:opacity .2s}
.hxl.on{opacity:1}
.hxl[hidden]{display:none}
.hxl-bx{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 300px;width:min(1180px,100%);max-height:calc(100vh - 48px);border-radius:18px;overflow:hidden;background:#141010;box-shadow:0 30px 80px rgba(0,0,0,.6)}
.hxl-st{display:grid;place-items:center;min-height:300px;background:#000}
.hxl-st img,.hxl-st video{display:block;max-width:100%;max-height:calc(100vh - 48px);object-fit:contain}
.hxl-st iframe{width:100%;aspect-ratio:16/9;border:0;display:block}
.hxl-st .hx-open{color:#f59a23;font-weight:700;padding:40px}
.hxl-in{display:flex;flex-direction:column;gap:12px;padding:26px 22px;color:#f3ebe1;overflow:auto}
.hxl-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.hxl-tags .hx-src{position:static}
.hxl-cat,.hxl-n{font-size:12px;padding:4px 9px;border-radius:99px;background:rgba(255,255,255,.1)}
.hxl-n{background:none;color:#a99c8d}
.hxl-in h3{margin:0;font-size:19px;line-height:1.35}
.hxl-in p{margin:0;font-size:14.5px;line-height:1.6;color:#cdbfae;white-space:pre-wrap}
.hxl-in .aibtn{margin-top:auto;align-self:stretch;justify-content:center}
.hxl-x{position:absolute;top:10px;right:10px;z-index:3;width:38px;height:38px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;font-size:16px;cursor:pointer}
.hxl-nav{position:absolute;top:50%;z-index:3;width:44px;height:44px;margin-top:-22px;border-radius:50%;border:0;background:rgba(0,0,0,.5);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.hxl-nav.prev{left:10px}.hxl-nav.next{right:310px}
.hxl-nav:hover,.hxl-x:hover{background:#f59a23;color:#1a1009}
.hxl-nav[hidden]{display:none}

@media (max-width:860px){
  .hxl{padding:0}
  .hxl-bx{grid-template-columns:1fr;grid-template-rows:auto 1fr;width:100%;height:100%;max-height:none;border-radius:0}
  .hxl-st{min-height:0}
  .hxl-st img,.hxl-st video{max-height:62vh}
  .hxl-nav{top:31vh}.hxl-nav.next{right:10px}
}
@media (max-width:640px){
  .hads{margin:12px 0 4px;border-radius:12px}
  .ha-nav{display:none}
  .ha-dots{bottom:7px}.ha-dots button{width:6px;height:6px}.ha-dots button.on{width:18px}
  .htabs{width:100%}
  .htabs button{flex:1;justify-content:center;padding:9px 10px}
  .hx-hd .hx-cta{display:none}
  .hx-grid{columns:2 140px;column-gap:10px}
  .hx-c{margin-bottom:10px;border-radius:12px}
  .hx-b b{font-size:13px}
}
@media (prefers-reduced-motion:reduce){.ha-track,.hx-c,.hxl{transition:none}}
/* โหมดกลางวันของส่วนนี้อยู่ที่ css/152-day-mode.css (ไฟล์นั้นตัวแปลงสีไม่แตะ) */
