/* page-access.php 固有スタイル */

/* Exterior photo */
/* HIN-196: 外観写真もライトボックス対象（JS が data-lightbox-trigger を付与）。
   ホバー時の視覚フィードバックは道順写真と同じトーンで揃える。 */
.exterior-photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.exterior-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exterior-photo[data-lightbox-trigger] {
  cursor: zoom-in;
}
@media (hover: hover) {
  .exterior-photo[data-lightbox-trigger]:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 28px rgba(31, 77, 67, 0.2);
  }
}
.exterior-photo[data-lightbox-trigger]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Access info grid */
.access-grid { align-items: start; gap: 28px; }
.access-info-block h2 { margin-bottom: 20px; }

/* Access info definition list */
.access-info { display: grid; gap: 0; margin: 0; padding: 0; }
.access-info-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(31,77,67,.08);
  align-items: baseline;
}
.access-info-row:first-child { border-top: 1px solid rgba(31,77,67,.08); }
.access-info dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
}
.access-info dd {
  margin: 0;
  color: var(--color-text);
  line-height: 1.7;
}

/* Nested business-hours dl inside the 営業時間 access-info-row */
.access-info dd > dl { margin: 0; padding: 0; }
.access-info dd > dl .access-info-row { padding: 5px 0; }
.access-info dd > dl .access-info-row:first-child { border-top: none; }

/* Map section */
.map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 320px;
  background: linear-gradient(135deg, #e0ede9 0%, #f0ede6 100%);
  position: relative;
}
.map-wrap iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}
.map-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--color-main);
  font-weight: 700;
  padding: 40px 20px;
}

/* ---------- HIN-194: 道順案内セクション ----------
   - section ごとに h3 + 連番 step の縦リスト
   - 各 step は「写真小 + テキスト」を常時 2-col grid（SP でも縦に並べない）
   - 写真は小さめ（テキスト補足）。SP は写真側を 96px 程度に抑える */
.access-route-section {
  margin-top: clamp(40px, 6vw, 64px);
}
.access-route-section:first-of-type {
  margin-top: clamp(28px, 4vw, 48px);
}
.access-route-title {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-main-dark);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-accent);
}
.access-route-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: route-step;
}
/* HIN-196: HIN-195 の 96px は小さすぎたため 50% 拡大して 144px に。
   PC でも視認性とコンパクトさを両立するサイズ。
   HIN-196 追加修正: さらに倍化し 288px に（写真の視認性を優先）。 */
.access-route-step {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  counter-increment: route-step;
}
.access-route-step + .access-route-step {
  border-top: 1px solid rgba(31, 77, 67, 0.08);
}
/* HIN-196: ホバー時のフィードバック用に transition を追加（hover でスケール＋シャドウ）。
   HIN-196 追加修正: aspect-ratio: 4/3 固定を撤廃し、写真本来の縦横比に枠を合わせる。
   縦長写真は縦長の枠、横長写真は横長の枠で表示される。 */
.access-route-step__photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f5f3ed;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
/* HIN-196: object-fit: cover はトリミングして写真の端が欠けるため contain に変更していたが、
   HIN-196 追加修正で枠を写真の縦横比に合わせる方針に変更したため、img 側で width:100% / height:auto
   とし、object-fit による余白制御は不要になった。枠は写真の自然サイズに追従する。 */
.access-route-step__photo img {
  width: 100%;
  height: auto;
  display: block;
}
/* HIN-196: ライトボックス トリガー要素（JS が data 属性で識別）。
   ホバーで「拡大できる」フィードバックを返す。タッチデバイスは hover が効かないため
   focus-visible でキーボード操作時の輪郭も担保する。 */
.access-route-step__photo[data-lightbox-trigger] {
  cursor: zoom-in;
}
@media (hover: hover) {
  .access-route-step__photo[data-lightbox-trigger]:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(31, 77, 67, 0.18);
  }
}
.access-route-step__photo[data-lightbox-trigger]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
/* HIN-195: 複数写真を 1 ステップに横並びで表示するモディファイア（busstop2/3 並列用）。
   左カラムを拡張して写真 2 枚分の領域を確保し、内部を 2-col grid に分割。
   HIN-196: サイズ 50% アップ（200 → 300px）。
   HIN-196 追加修正: さらに倍化し 600px に（写真サイズを単写真と整合）。 */
.access-route-step--multi-photo {
  grid-template-columns: 600px minmax(0, 1fr);
}
/* HIN-196 追加修正: 写真の縦横比が異なるケース（縦長 + 横長の混在）でも上端揃えにし、
   サイズ差による違和感を抑える。 */
.access-route-step__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: start;
}
.access-route-step__photos .access-route-step__photo {
  /* 内側で aspect-ratio が効くよう既定設定を継承（追加上書き不要） */
}
.access-route-step__text {
  margin: 0;
  line-height: 1.8;
  color: var(--color-text);
  font-size: 15px;
}
.access-route-step__text::before {
  content: counter(route-step, decimal-leading-zero);
  display: inline-block;
  margin-right: 10px;
  font-family: var(--font-en, monospace);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  vertical-align: middle;
}
/* HIN-195: ルートに 'no_number' フラグが付いたステップ群（例: 「お車でお越しの方へ」）は通し番号を非表示 */
.access-route-steps--no-number .access-route-step__text::before {
  content: none;
  margin-right: 0;
}
.access-route-note {
  margin-top: 20px;
  padding: 20px 24px;
  background: #faf7f0;
  border-left: 3px solid var(--color-accent);
  border-radius: 4px;
}
.access-route-note p {
  margin: 0;
  line-height: 1.8;
  font-size: 15px;
  color: var(--color-text);
}
.access-route-note p + p {
  margin-top: 10px;
}
.access-route-note__address {
  font-weight: 700;
  color: var(--color-main-dark);
}

/* ---------- 最終 CTA (HIN-162: /menu/ M-5 FooterCTA と同デザインに統一)
   - 深緑背景 + Reservation マーク + 中央寄せ H2/リード
   - LINE 予約 + お電話で予約する 2 ボタン + fv-cta__hours
   - .front-page .section-cta と同等のスタイルを `.page-access` スコープに複製 */
.page-access .section-cta {
  background: var(--color-main-dark);
  color: var(--ink-cream);
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--rule-light);
  text-align: center;
}
.page-access .section-cta .cta-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}
.page-access .section-cta .cta-mark {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-access .section-cta .cta-mark::before,
.page-access .section-cta .cta-mark::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-dark);
}
.page-access .section-cta .cta-mark-label {
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  text-transform: none;
  white-space: nowrap;
}
.page-access .section-cta .cta-title {
  margin: 36px 0 24px;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--ink-cream);
}
.page-access .section-cta .cta-lead {
  margin: 0 0 48px;
  font-family: var(--font-main);
  font-weight: 400;
  /* HIN-170: 本文サイズ +20% (15 → 18) */
  font-size: 18px;
  line-height: 2.0;
  color: #b8ad8c;
}
.page-access .section-cta .cta-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
/* HIN-166: .btn-outline-on-dark と形状を揃えるため border-radius を明示し四角枠化（基底 .btn の 999px を上書き） */
.page-access .section-cta .btn-line {
  padding: 20px 44px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-accent);
  background: transparent;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.16em;
}
.page-access .section-cta .btn-line:hover,
.page-access .section-cta .btn-line:focus-visible {
  background: var(--color-accent);
  color: var(--color-main-dark);
  border-color: var(--color-accent);
}
.page-access .section-cta .btn-outline-on-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 44px;
  border: 1px solid #b8ad8c;
  border-radius: var(--radius);
  color: var(--ink-cream);
  background: transparent;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-decoration: none;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}
.page-access .section-cta .btn-outline-on-dark:hover,
.page-access .section-cta .btn-outline-on-dark:focus-visible {
  background: var(--ink-cream);
  color: var(--color-main-dark);
  border-color: var(--ink-cream);
}
/* fv-cta__hours: TEL / HOURS / CLOSED 3 列情報ブロック */
.page-access .section-cta .fv-cta__hours {
  margin: 56px 0 0;
  padding-top: 32px;
  border-top: 1px solid rgba(216, 192, 138, 0.32);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}
.page-access .section-cta .fv-cta__hours-row {
  border-left: 1px solid rgba(216, 192, 138, 0.24);
  padding-left: 22px;
}
.page-access .section-cta .fv-cta__hours-label {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--color-accent);
  margin: 0 0 12px;
}
.page-access .section-cta .fv-cta__hours-value {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-cream);
  letter-spacing: 0.06em;
  margin: 0;
}
.page-access .section-cta .fv-cta__hours-value--en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 22px;
}

@media (max-width: 1024px) {
  /* HIN-162: 最終 CTA SP レイアウト (menu-footer-cta と同等) */
  .page-access .section-cta .cta-actions .btn,
  .page-access .section-cta .cta-actions .btn-line,
  .page-access .section-cta .cta-actions .btn-outline-on-dark {
    width: 100%;
    padding: 16px 32px;
  }
  .page-access .section-cta .cta-mark {
    gap: 14px;
  }
  .page-access .section-cta .cta-mark-label {
    font-size: 18px;
  }
  .page-access .section-cta .fv-cta__hours {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .access-info-row { grid-template-columns: 70px 1fr; gap: 8px; }
  .map-wrap iframe { height: 280px; }

  /* HIN-194: SP でも step は 2-col grid 維持。写真側を縮小して縦長化を防ぐ。 */
  /* HIN-195: PC 既定値 (96px) と SP の値が揃ったため、ここではモディファイア (multi-photo) のみ調整。 */
  /* HIN-196 フォローアップ: PC は 288px / 600px に拡大したが、SP では写真を大きく
                             せず HIN-195 時点に戻す。
                             - 単写真は SP のみ 96px に固定（PC 既定 288px の継承を上書き）
                             - multi-photo は 420 → 140px に戻す
     PC 側（288px / 600px）は HIN-196 のまま維持する。 */
  .access-route-step {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }
  .access-route-step--multi-photo {
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .access-route-step__text {
    font-size: 14px;
    line-height: 1.7;
  }
  .access-route-step__text::before {
    margin-right: 6px;
    font-size: 11px;
  }
  .access-route-note {
    padding: 16px 18px;
  }
  .access-route-note p {
    font-size: 14px;
  }
}

/* ---------- HIN-196: 写真拡大ライトボックス ----------
   - JS（access-lightbox.js）が data-lightbox-trigger を持つ写真をクリック / Enter / Space で開く
   - 全画面オーバーレイ + 中央に拡大写真。閉じるは右上 × ボタン / 背景クリック / ESC
   - body のスクロールはオープン中ロック（JS が `is-lightbox-open` を付与）
   - `prefers-reduced-motion` を尊重し、アニメーションは控えめ */
.access-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(15, 28, 24, 0.88);
  opacity: 0;
  transition: opacity 180ms ease;
}
.access-lightbox.is-open {
  display: flex;
  opacity: 1;
}
.access-lightbox__figure {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.access-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  background: #f5f3ed;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.access-lightbox__caption {
  color: var(--ink-cream, #f5f0e2);
  font-family: var(--font-main);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: min(680px, 90vw);
  line-height: 1.6;
  margin: 0;
}
.access-lightbox__caption:empty {
  display: none;
}
.access-lightbox__close {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 180ms ease, transform 180ms ease;
}
.access-lightbox__close:hover,
.access-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
  outline: none;
}
.access-lightbox__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(216, 192, 138, 0.7);
}
body.is-lightbox-open {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .access-lightbox,
  .access-lightbox__close,
  .access-route-step__photo,
  .exterior-photo {
    transition: none;
  }
  .access-route-step__photo[data-lightbox-trigger]:hover,
  .exterior-photo[data-lightbox-trigger]:hover {
    transform: none;
  }
}
