/*
 * トップのヒカル×PGハウス カルーセル（template/tobe/top-hikaru.php）。2026-12-02 夜 吉田さん「Tesla参考」
 * Tesla のトップ（12/2 実測）: 大きな画面 3枚・5秒ごと・1秒で重ねて切替・見出し 56px 中央上・ボタン 200x40 角丸4px・左右の矢印 40px・下に点
 *   その下に次のカードがのぞく横並び（カード幅 約72%・間 24px）、画面下中央に固定の「試乗予約」
 * PG の色: 濃紺 #0B1F44 / #123770、予約ボタンはサイトの CTA と同じオレンジ #FA7748
 */
.pg-hc, .pg-hcc, .pg-hkpill { --hc-navy: #0B1F44; --hc-orange: var(--pg-orange, #FA7748); --hc-yt: #ff0033; --hc-ease: cubic-bezier(.23, 1, .32, 1); }
.pg-hc {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--hc-navy);
  margin-top: var(--pg-hd, 60px); /* ヘッダーは固定で写真の上に重なるので、その下から始める（Tesla も白いヘッダーの下から） */
  height: clamp(560px, calc(100svh - var(--pg-hd, 60px) - 48px), 760px); }
.pg-hc br.sp { display: none; }
.pg-hc__track { position: absolute; inset: 0; }
.pg-hc__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease-out, visibility .8s ease-out; cursor: pointer; }
.pg-hc__slide.is-on { opacity: 1; visibility: visible; z-index: 1; }
.pg-hc__bg, .pg-hc__bg img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pg-hc__bg img { object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.pg-hc__slide.is-on .pg-hc__bg img { transform: none; }
.pg-hc__scrim { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(11,31,68,.82) 0%, rgba(11,31,68,.55) 26%, rgba(11,31,68,0) 52%),
  linear-gradient(0deg, rgba(11,31,68,.55) 0%, rgba(11,31,68,0) 22%); }
.pg-hc__tx { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; padding: clamp(36px, 6svh, 56px) 24px 0; text-align: center; cursor: auto; }
.pg-hc__tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; font-size: 14px; font-weight: 700; letter-spacing: .04em; line-height: 1.5; }
.pg-hc__yt { width: 22px; height: 16px; border-radius: 4px; background: var(--hc-yt); position: relative; flex: none; }
.pg-hc__yt::after { content: ""; position: absolute; left: 8px; top: 4px; border-left: 7px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.pg-hc__ttl { margin: 0; font-size: clamp(30px, 3.6vw, 50px); font-weight: 700; line-height: 1.3; letter-spacing: .02em; text-wrap: balance; text-shadow: 0 2px 18px rgba(11,31,68,.45); }
.pg-hc__sub { margin: 12px 0 0; font-size: 16px; line-height: 1.6; }
.pg-hc__sub a { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.pg-hc__sub a:hover { text-decoration-thickness: 2px; }
.pg-hc__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pg-hc__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 220px; height: 48px; padding: 0 22px; border-radius: 4px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-decoration: none; line-height: 1.3; transition: background-color .2s, transform .16s var(--hc-ease); }
.pg-hc__btn:active { transform: scale(.97); }
.pg-hc__btn:focus-visible, .pg-hc__arr:focus-visible, .pg-hc__dot:focus-visible, .pg-hcc__arr:focus-visible, .pg-hkpill:focus-visible { outline: 3px solid #00B6C9; outline-offset: 2px; }
.pg-hc__btn--main { background: var(--hc-orange); color: #fff; }
.pg-hc__btn--main:hover { background: #f0612d; color: #fff; }
.pg-hc__btn--sub { background: rgba(255,255,255,.94); color: var(--hc-navy); }
.pg-hc__btn--sub:hover { background: #fff; color: var(--hc-navy); }
/* 1枚目: ヒカルさんの切り抜きを右下に、動画のサムネイルを左下に */
.pg-hc__hikaru { position: absolute; z-index: 1; right: max(4vw, calc(50% - 620px)); bottom: 0; height: 74%; width: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); pointer-events: none; }
.pg-hc__thumb { position: absolute; z-index: 2; left: max(4vw, calc(50% - 620px)); bottom: 64px; width: min(26vw, 340px); aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.4); background: #000; }
.pg-hc__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--hc-ease); }
.pg-hc__thumb:hover img { transform: scale(1.04); }
.pg-hc__play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px 0 0 -28px; border-radius: 10px; background: var(--hc-yt); }
.pg-hc__play::after { content: ""; position: absolute; left: 22px; top: 11px; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.pg-hc__tcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: rgba(0,0,0,.62); color: #fff; font-size: 13px; font-weight: 700; }
/* 矢印と点 */
.pg-hc__arr { position: absolute; z-index: 3; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 4px; background: rgba(255,255,255,.82); cursor: pointer; display: grid; place-items: center; transition: background-color .2s, transform .16s var(--hc-ease); }
.pg-hc__arr:hover { background: #fff; }
.pg-hc__arr:active { transform: scale(.94); }
.pg-hc__arr span { width: 10px; height: 10px; border-top: 2px solid var(--hc-navy); border-right: 2px solid var(--hc-navy); }
.pg-hc__arr--prev { left: 24px; } .pg-hc__arr--prev span { transform: translateX(2px) rotate(-135deg); }
.pg-hc__arr--next { right: 24px; } .pg-hc__arr--next span { transform: translateX(-2px) rotate(45deg); }
.pg-hc__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 4px; }
.pg-hc__dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; transition: width .3s var(--hc-ease); }
.pg-hc__dot i { display: block; width: 8px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.5); position: relative; overflow: hidden; transition: width .3s var(--hc-ease), background-color .3s; }
.pg-hc__dot.is-on { width: 44px; }
.pg-hc__dot.is-on i { width: 36px; background: rgba(255,255,255,.4); }
.pg-hc__dot.is-on i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: pg-hc-fill var(--hc-hold, 6000ms) linear forwards; }
.pg-hc.is-paused .pg-hc__dot.is-on i::after, .pg-hc.is-still .pg-hc__dot.is-on i::after { animation-play-state: paused; }
.pg-hc.is-still .pg-hc__dot.is-on i::after { animation: none; transform: none; }
@keyframes pg-hc-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 横並びのカード（Tesla の車種カード）。次のカードが少しのぞく */
.pg-hcc { position: relative; background: #fff; padding: 24px 0 8px; }
.pg-hcc__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc(50% - 620px)); padding: 0 max(24px, calc(50% - 620px)) 16px; scrollbar-width: none; outline: none; }
.pg-hcc__track::-webkit-scrollbar { display: none; }
.pg-hcc__card { position: relative; flex: 0 0 min(72vw, 940px); height: clamp(380px, 46vw, 540px); border-radius: 4px; overflow: hidden; scroll-snap-align: start; color: #fff; background: var(--pg-deep, #0B1F44); }
.pg-hcc__bg, .pg-hcc__bg img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pg-hcc__bg img { object-fit: cover; transition: transform .6s var(--pg-out, ease-out); }
.pg-hcc__card:hover .pg-hcc__bg img { transform: scale(1.03); }
.pg-hcc__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,31,68,.55) 0%, rgba(11,31,68,0) 24%, rgba(11,31,68,0) 46%, rgba(11,31,68,.82) 100%); pointer-events: none; }
.pg-hcc__label { position: absolute; z-index: 1; left: 32px; top: 26px; margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.pg-hcc__bot { position: absolute; z-index: 1; left: 32px; right: 32px; bottom: 28px; }
.pg-hcc__ttl { margin: 0; font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; line-height: 1.35; text-wrap: balance; }
.pg-hcc__meta { margin: 6px 0 0; font-size: 14px; opacity: .92; font-variant-numeric: tabular-nums; }
.pg-hc__btns--card { justify-content: flex-start; margin-top: 16px; }
.pg-hc__btns--card .pg-hc__btn { min-width: 180px; height: 44px; font-size: 14px; }
.pg-hcc__arr { position: absolute; z-index: 2; top: calc(24px + clamp(380px, 46vw, 540px) / 2); width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 4px; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(11,31,68,.18); cursor: pointer; display: grid; place-items: center; }
.pg-hcc__arr[hidden] { display: none; }
.pg-hcc__arr span { width: 10px; height: 10px; border-top: 2px solid #0B1F44; border-right: 2px solid #0B1F44; }
.pg-hcc__arr--prev { left: 16px; } .pg-hcc__arr--prev span { transform: translateX(2px) rotate(-135deg); }
.pg-hcc__arr--next { right: 16px; } .pg-hcc__arr--next span { transform: translateX(-2px) rotate(45deg); }
.pg-hcc__down { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px auto 0; padding: 12px 16px; color: var(--pg-navy, #123770); font-size: 14px; font-weight: 700; text-decoration: none; }
.pg-hcc__down:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 画面下の固定ボタン（Tesla の「試乗予約」）。期間中はトップのスマホ下部バー・PC右下の相談ボタンを隠す */
.pg-hkpill { position: fixed; z-index: 960; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 20px 8px 10px; border-radius: 4px; background: #fff; color: #0B1F44; border: 1px solid #dfe4ee; box-shadow: 0 10px 30px rgba(11,31,68,.22); text-decoration: none; white-space: nowrap; transition: transform .16s var(--pg-out, ease-out), box-shadow .2s; }
.pg-hkpill:hover { color: #0B1F44; box-shadow: 0 12px 34px rgba(11,31,68,.3); }
.pg-hkpill:active { transform: translateX(-50%) scale(.97); }
.pg-hkpill__gift { display: grid; place-items: center; height: 34px; padding: 0 10px; border-radius: 4px; background: var(--pg-orange, #FA7748); color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.pg-hkpill__t { display: flex; flex-direction: column; line-height: 1.3; font-size: 16px; font-weight: 900; }
.pg-hkpill__t small { font-size: 12px; font-weight: 700; color: #c4471b; }
.pg-hkpill__arr { font-weight: 700; color: var(--pg-orange, #FA7748); }
html.pg-hk-on .pg-sticky, html.pg-hk-on #pg-float-cta { display: none !important; }

@media (max-width: 767px) {
  .pg-hc { height: clamp(520px, calc(100svh - var(--pg-hd, 60px) - 84px), 680px); } /* 画面下の固定ボタン（約84px）に点とサムネイルが隠れないように */
  .pg-hc br.sp { display: inline; }
  .pg-hc__tx { padding: 28px 16px 0; }
  .pg-hc__tag { font-size: 12px; margin-bottom: 10px; }
  .pg-hc__ttl { font-size: 27px; }
  .pg-hc__sub { font-size: 13.5px; margin-top: 10px; }
  .pg-hc__btns { flex-wrap: nowrap; gap: 8px; margin-top: 16px; }
  .pg-hc__btn { min-width: 0; flex: 1 1 0; height: 46px; padding: 0 8px; font-size: 14px; letter-spacing: 0; }
  .pg-hc__scrim { background: linear-gradient(180deg, rgba(11,31,68,.86) 0%, rgba(11,31,68,.62) 34%, rgba(11,31,68,0) 62%), linear-gradient(0deg, rgba(11,31,68,.5) 0%, rgba(11,31,68,0) 20%); }
  .pg-hc__hikaru { height: 50%; right: 2vw; }
  .pg-hc__thumb { left: 16px; bottom: 44px; width: 48vw; }
  .pg-hc__tcap { font-size: 11px; padding: 4px 8px; }
  .pg-hc__play { width: 44px; height: 32px; margin: -16px 0 0 -22px; border-radius: 8px; }
  .pg-hc__play::after { left: 17px; top: 9px; border-left-width: 13px; border-top-width: 7px; border-bottom-width: 7px; }
  .pg-hcc__down .pc { display: none; }
  .pg-hc__arr { display: none; }
  .pg-hc__dots { bottom: 14px; }
  .pg-hcc { padding-top: 16px; }
  .pg-hcc__track { gap: 12px; padding: 0 16px 12px; scroll-padding-inline: 16px; }
  .pg-hcc__card { flex-basis: 86vw; height: 460px; }
  .pg-hcc__label { left: 20px; top: 18px; font-size: 13px; }
  .pg-hcc__bot { left: 20px; right: 20px; bottom: 20px; }
  .pg-hcc__ttl { font-size: 22px; }
  .pg-hcc__meta { font-size: 12.5px; }
  .pg-hc__btns--card .pg-hc__btn { min-width: 0; height: 44px; }
  .pg-hcc__arr { display: none; }
  .pg-hcc__down { font-size: 13px; padding-bottom: 88px; }
  .pg-hkpill { left: 16px; right: 16px; transform: none; justify-content: center; }
  .pg-hkpill:active { transform: scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-hc__slide, .pg-hc__bg img, .pg-hcc__bg img, .pg-hc__dot, .pg-hc__dot i { transition: none; }
  .pg-hc__bg img { transform: none; }
}

/* 合体案（?hkv=combo・12/2 夜）: 1枚目に 12/1 の案（.pg-hk・再生ボタン→予約ボタン）をそのまま入れる。
   12/1 の案は固定ヘッダーの裏から始まる前提で上の余白にヘッダー分を足していたので、カルーセルの中ではその分を外して枠の高さに収める */
.pg-hc__slide--m2 .pg-hk { position: absolute; inset: 0; height: 100%; min-height: 0 !important; }
.pg-hc__slide--m2 .pg-hk__in { min-height: 0; height: 100%; padding: 32px 22px 56px; box-sizing: border-box; }
.pg-hc__slide--m2 .pg-hk--thumb .pg-hk__thumb { top: 50%; }
@media (min-width: 768px) {
  .pg-hc__slide--m2 .pg-hk__in { padding: 24px 40px 64px; }
}
@media (max-width: 767px) {
  .pg-hc__slide--m2 .pg-hk__in { padding: 18px 22px 44px; }
  .pg-hc__slide--m2 .pg-hk__vis { height: 240px; margin-top: 14px; }
  .pg-hc__slide--m2 .pg-hk__lead { margin-top: 12px !important; font-size: 12.5px; }
}
