/* ===========================================================================
   메인 히어로 캐러셀 (2026-09-18 · session/main-banner-carousel)
   index.html 의 <section class="mt-po-hero mb-hero"> 에만 걸린다 — 다른 페이지에는 영향이 없다.
   관리자 「메인 배너」 미리보기(srcdoc iframe)도 **이 파일을 그대로** 불러온다 → 손님 화면과 같은 모습.

   🔴 높이 고정: PC 540px / ≤1024px(1열 구간) 560px — 폴백(HTML 히어로)·문구형·통이미지형이 같은 높이라
      API 응답 뒤 교체돼도 화면이 덜컹거리지 않는다(CLS). ⛔ 높이를 슬라이드 내용에 맡기지 말 것.
   🔴 폴백과 문구형은 **같은 레이아웃 클래스**(.mb-grid · .mb-copy · .mb-side)를 쓴다.
      모바일에서 우측 영역(.mb-side)은 둘 다 같은 자리·같은 높이(186px)다.
   🔴 문구가 길어도 넘치지 않게: 큰 제목 2줄 · 설명 2줄 말줄임.
   =========================================================================== */

.mb-hero { --mb-h: 540px; --mb-side-h: 186px; --mb-wave: 60px;
  position: relative; overflow: hidden; height: var(--mb-h); color: #fff; }
.mb-slides { position: absolute; inset: 0; }
/* 🔴 스와이프 — 가로 제스처는 캐러셀이 받고 세로 스크롤만 브라우저가 한다.
   ⛔ 이미지·링크 끌기를 막는다: 통이미지(링크 안의 img)를 옆으로 밀면 브라우저가 **링크 끌어다 놓기**로 받아
      페이지가 그 주소로 넘어가 버렸다(2026-09-18 실측 · 터치 에뮬레이션). */
.mb-hero { touch-action: pan-y; }
.mb-hero img, .mb-hero a { -webkit-user-drag: none; user-drag: none; }
.mb-slide img { user-select: none; -webkit-user-select: none; }
.mb-slide { position: absolute; inset: 0; overflow: hidden; opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s; }
.mb-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; z-index: 1; }
.mb-hero.mb-single .mb-slide, .mb-hero.mb-static .mb-slide { transition: none; }

/* ── 공통 레이아웃(폴백 · 문구형) ── */
.mb-hero .mb-grid { position: relative; z-index: 2; box-sizing: border-box; max-width: 1240px; height: 100%;
  margin: 0 auto; padding: 40px 24px calc(var(--mb-wave) + 34px); align-items: center; pointer-events: none; }
.mb-hero .mb-grid a, .mb-hero .mb-grid button { pointer-events: auto; }
.mb-hero .mb-copy { min-width: 0; }
.mb-hero .mb-side { position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; height: 100%; max-height: 420px; }
.mb-hero .mb-side img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.mb-hero .mb-h { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.mb-hero .mb-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.mb-hero .mt-po-cta-row { flex-wrap: nowrap; }
.mb-hero .mt-po-cta-main, .mb-hero .mt-po-cta-ghost { white-space: nowrap; }

/* 배너 전체 클릭(문구형은 버튼이 우선 — 버튼이 위층이다) */
.mb-cover { position: absolute; inset: 0; z-index: 1; }

/* ── 문구형 ── */
.mb-text { background: linear-gradient(105deg, #063a5e 0%, #14a6c2 100%); }
.mb-text::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.08) 46%, transparent 72%); }
.mb-text.tone-dark { color: #14181f; }
.mb-text.tone-dark::before { background: linear-gradient(90deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,.08) 46%, transparent 72%); }
.mb-text.tone-dark .mt-po-badge { background: rgba(20,24,31,.07); border-color: rgba(20,24,31,.18); color: #14181f; }
.mb-text.tone-dark .mt-po-badge .dot { background: #E60012; box-shadow: 0 0 0 4px rgba(230,0,18,.18); }
.mb-text.tone-dark .mt-po-sub { color: #3b4350; }
.mb-text.tone-dark .mt-po-cta-ghost { border-color: rgba(20,24,31,.35); color: #14181f; }
.mb-text.tone-dark .mt-po-cta-ghost:hover { background: #14181f; color: #fff; }

/* ── 통이미지형 — 가운데 정렬 cover · 1920 넘는 화면은 좌우를 여백 색으로 ── */
.mb-image { background: #0b1b2b; }
.mb-image .mb-img-link { position: absolute; inset: 0; display: block; }
.mb-image picture, .mb-image .mb-img { display: block; width: 100%; height: 100%; max-width: 1920px; margin: 0 auto; }
.mb-image .mb-img { object-fit: cover; object-position: center; }
/* 모바일 이미지가 없으면 PC 이미지를 **통째로**(가로 맞춤) 보여 준다 — cover 로 자르면 가운데 글자만 남아 읽을 수 없다 */
@media (max-width: 768px) { .mb-image.mb-no-mobile .mb-img { object-fit: contain; } }

/* ── 컨트롤: 좌하단 「◀ 3 / 9 ▶ ⏸」 ── */
.mb-ctrl { position: absolute; z-index: 5; bottom: calc(var(--mb-wave) + 14px);
  left: max(24px, calc((100% - 1240px) / 2 + 24px));
  display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 4px;
  border-radius: 999px; background: rgba(8, 14, 24, .46); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 13px; font-weight: 700; }
.mb-ctrl[hidden] { display: none; }
.mb-ctrl button { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.mb-ctrl button:hover { background: rgba(255,255,255,.16); }
.mb-ctrl button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.mb-ctrl svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.mb-play .mb-ic-play, .mb-play[data-paused="1"] .mb-ic-pause { display: none; }
.mb-play[data-paused="1"] .mb-ic-play { display: block; }
.mb-play span { pointer-events: none; }
.mb-count { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mb-count .mb-total { opacity: .7; }

/* 하단 물결은 슬라이드 위에 얹는다 */
.mb-hero .mb-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: var(--mb-wave); display: block; z-index: 4; pointer-events: none; }

.mb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 관리자 미리보기 — 링크 클릭 무효 */
.mb-preview a { cursor: default; }

/* ── 폴백 히어로(폴더블8) — 우측 카드 PC 크기 ── */
.mb-hero .mb-fallback { background: linear-gradient(105deg,#063a5e 0%,#0a5f86 50%,#14a6c2 100%); }

/* ================= ≤1024px : 1열 · 높이 560 ================= */
@media (max-width: 1024px) {
  .mb-hero { --mb-h: 560px; --mb-wave: 40px; }
  .mb-hero .mb-grid { grid-template-columns: 1fr; grid-template-rows: auto var(--mb-side-h); gap: 16px;
    align-content: start; padding: 26px 16px 0; }
  .mb-hero .mb-side { height: var(--mb-side-h); max-height: none; }
  .mb-hero .mt-po-badge { padding: 5px 12px; font-size: 12px; margin-bottom: 10px; }
  .mb-hero .mt-hero-h1 { font-size: 30px !important; line-height: 1.18; margin: 0 0 8px; }
  .mb-hero .mt-po-sub { font-size: 15px; line-height: 1.45; margin: 0 0 14px; }
  .mb-hero .mt-po-cta-row { gap: 8px; }
  .mb-hero .mt-po-cta-main, .mb-hero .mt-po-cta-ghost { flex: 1 1 0; width: auto; min-width: 0; height: 46px; padding: 0 12px;
    justify-content: center; font-size: 15px; border-radius: 12px; box-shadow: none; }
  .mb-ctrl { left: 16px; bottom: calc(var(--mb-wave) + 16px); height: 34px; }

  /* 폴백 우측 카드 축소 — 높이 186 안쪽(숨기지 않는다) */
  .mb-hero .mb-side .teaser-card { --panel-w: 58px; --panel-h: 88px; --shift: 29px;
    height: var(--mb-side-h); max-width: none; padding: 12px 14px; border-radius: 18px; box-sizing: border-box; }
  .mb-hero .mb-side .teaser-card .teaser-badge { position: absolute; top: 12px; left: 14px; padding: 5px 10px; font-size: 11px; }
  .mb-hero .mb-side .teaser-card .stage { margin: 0; min-height: 0; flex: 1 1 auto; }
  .mb-hero .mb-side .teaser-card .glow { max-width: 180px; }
  .mb-hero .mb-side .teaser-card .teaser-caption { font-size: 12px; margin: 0; text-align: center; }
  .mb-hero .mb-side .teaser-card .st-samsung { font-size: 7px; margin-bottom: 4px; }
  .mb-hero .mb-side .teaser-card .st-new { font-size: 5px; margin-bottom: 2px; }
  .mb-hero .mb-side .teaser-card .st-fold { font-size: 13px; }
  .mb-hero .mb-side .teaser-card .st-date { font-size: 5px; margin-top: 4px; }
}
@media (max-width: 1024px) and (min-width: 600px) {
  .mb-hero .mb-grid { padding-left: 24px; padding-right: 24px; }
  .mb-hero .mt-po-cta-row { max-width: 460px; }
}
@media (max-width: 380px) {
  .mb-hero .mt-hero-h1 { font-size: 27px !important; }
}

/* 움직임 줄이기 — 전환 애니메이션 없음(자동 넘김은 JS 가 끈다) */
@media (prefers-reduced-motion: reduce) {
  .mb-slide, .mb-slide.is-active { transition: none; }
}
