/* =============================================================
   access：年表UI（路線・徒歩・バス・車）
   ============================================================= */

/* 0) 共通変数 */
:root {
  --acc-color: #8b6b4a; /* 縦ライン・ドット等に使うベースカラー */
}

/* -------------------------------------------------------------
 * 1) 情報ブロック／見出し（PC/SP 共通）
 * ---------------------------------------------------------- */
.access-wrap {
  margin-top: 15px;
}

.access-info-section {
  margin-bottom: 15px;
  padding: 0 1rem; /* 住所や駐車場の横余白（SP寄りだけどPCでも許容） */
}

.access-info-section h3 {
  font-weight: 700;
  font-size: .9rem;
  margin: 0 0 5px;
}

.access-info-section p {
  margin: 0;
}

/* アクセスの大きな見出し */
.access-block .access-h2 {
  display: inline-block;
  background: #5b3f28;
  color: #fff;
  padding: .6em .9em;
  border-radius: 8px;
  margin: 10px 0 14px;
  font-weight: 700;
  font-size: 1.25rem;
}

/* -------------------------------------------------------------
 * 2) アコーディオン周り（PC/SP 共通）
 * ---------------------------------------------------------- */
.access-accordion {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

/* 見出しボタン */
.access-btn {
  position: relative;
  width: 100%;
  padding: 14px 44px 14px 14px;
  border: 1px solid #ddd;
  border-radius: 8px !important;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5em;
  text-align: center;
  transition:
    background-color .2s,
    border-color .2s,
    box-shadow .2s;
  margin-top: 10px;
}

.access-btn:hover {
  background: #f8f8f8;
}

.access-btn:focus-visible {
  outline: 2px solid #4da3ff;
  outline-offset: 2px;
}

.access-btn[aria-expanded="true"] {
  border-color: #bbb;
  background: #fafafa;
}

.access-btn .btn-label {
  display: inline-block;
  white-space: normal;
  line-height: 1.3;
}

.access-btn .btn-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.access-btn .btn-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #666;
  transition: transform .25s;
}

.access-btn[aria-expanded="true"] .btn-icon::before {
  transform: rotate(180deg);
}

/* パネル（開閉本体） */
.access-panel {
  overflow: clip;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    height .28s,
    opacity .28s,
    transform .28s;
  margin-bottom: 1.5rem;
}

.access-panel.is-open {
  opacity: 1;
  transform: translateY(0);
}

.access-panel[hidden] {
  display: block; /* height アニメ用に display:none; を殺す */
}

/* パネル内余白 */
#access-accordion .route-timeline {
  padding: 14px 10px 18px;
}

.route-note {
  padding: 0 10px;
}

@media (max-width: 768px) {
  .route-note {
  padding: 0 10px 10px 10px;
}
}

/* アイテム間隔（保険） */
#access-accordion .rt-item + .rt-item {
  margin-top: 6px;
}

/* アクセスボタンの文字色統一 */
#access-accordion .access-btn,
#access-accordion .access-btn:link,
#access-accordion .access-btn:visited {
  color: #222;
  text-decoration: none;
}

#access-accordion .access-btn .btn-label {
  color: inherit;
}

/* -------------------------------------------------------------
 * 3) 駅・空港・当館ボックス（PC/SP 共通）
 * ---------------------------------------------------------- */
#access-accordion .rt-item .rt-box {
  width: min(92%, 520px);
  margin: 0 auto;
  border: 2px solid #5e4a2d;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #222;
}

/* 再度の保険（上で同じ指定あり） */
#access-accordion .rt-item + .rt-item {
  margin-top: 6px;
}

/* -------------------------------------------------------------
 * 4) 年表ライン本体（SVG 縦ライン）PC/SP 共通
 * ---------------------------------------------------------- */

/* ライン（土台） */
.rt-item.rt-line {
  position: relative;
  min-height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  background-repeat: no-repeat;
  background-position: center top; /* 左寄せにしたければ left top */
  background-size: auto 100%;      /* 高さ100%で縦ラインを伸ばす */
}

/* ラベル（前面） */
.rt-item.rt-line .rt-label {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 2px 10px;
  border-radius: 8px;
  line-height: 1.55;
  font-size: 17px;
  color: #222;
  box-shadow: 0 0 0 2px #fff;
}

/* 左寄せラベル */
.rt-item.rt-line.rt-left {
  justify-items: start;
}

.rt-item.rt-line.rt-left .rt-label {
  text-align: left;
  padding-left: 10px;
}

/* 縦長SVG：種別ごとに width を調整 */
.rt-item.rt-line.rt-rail,
.rt-item.rt-line.rt-train {
  background-image: url("/images/access/rail.svg");
  background-size: 48px 100%;
}

.rt-item.rt-line.rt-walk {
  background-image: url("/images/access/walk.svg");
  background-size: 8px 100%;
}

.rt-item.rt-line.rt-air,
.rt-item.rt-line.rt-plane {
  background-image: url("/images/access/air.svg");
  background-size: 4px 100%;
}

.rt-item.rt-line.rt-bus {
  background-image: url("/images/access/bus.svg");
  background-size: 6px 100%;
}

.rt-item.rt-line.rt-road,
.rt-item.rt-line.rt-car {
  background-image: url("/images/access/road.svg");
  background-size: 6px 100%;
}

/* PC で少しラインを高くする */
@media (min-width: 768px) {
  .rt-item.rt-line {
    min-height: 84px;
  }
}

/* -------------------------------------------------------------
 * 5) 周辺スポット（2パターン対応）PC/SP 共通＋レスポンシブ
 *  - three     : 画像3枚並び（既存）
 *  - two_right : 画像2枚＋右テキスト
 * ---------------------------------------------------------- */

.spots-block {
  padding-top: 24px;
}

@media (min-width: 768px) {
  .spots-block {
    padding-top: 32px;
  }
}

/* ===== 画像エリア：共通 ===== */
.spots-thumb {
  overflow: hidden;
}

/* ===== three（画像3枚並び） =====
   既存の .spots-gallery（grid 3列）をそのまま使用 */
.spots-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ===== two_right（画像2枚＋右テキスト） ===== */
.spots-media--two-right{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* ← 3等分 */
  gap: 12px; /* 3枚並びと揃えるなら 12px */
  padding: 0; /* 3枚並びと同じにしたいなら padding 0 に */
  align-items: start;
}

/* 左側：画像2枚（2列） */
.spots-media--two-right .spots-gallery--two{
  grid-column: 1 / span 2;         /* ← 1〜2列を使う */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* 右側：テキスト */
.spots-media--two-right .spots-side{
  grid-column: 3;                  /* ← 3列目 */
  line-height: 1.9;
}
/* ===== 下段本文（既存の mt-12 を維持） ===== */
.mt-12 {
  margin-top: 12px;
  padding: 0 1rem;
}

/* ===== SP：縦積み ===== */
@media (max-width: 768px){
  .spots-media--two-right{ grid-template-columns: 1fr; }
  .spots-media--two-right .spots-gallery--two{ grid-column:auto; grid-template-columns: 1fr; }
  .spots-media--two-right .spots-side{ grid-column:auto; }
}

/* SPだけ：上（spots-side）と下（spots-text）の左右余白を統一 */
@media (max-width: 768px){
  :root{ --spots-pad: 1rem; } /* ここで統一値を管理 */

  /* 上段（画像＋右テキスト） */
  .spots-media--two-right{
    padding-inline: var(--spots-pad);
  }

  /* 下段本文（既存の mt-12 にも効かせる） */
  .spots-text,
  .mt-12{
    padding-inline: var(--spots-pad);
  }
}



/* -------------------------------------------------------------
 * 6) アクセス：カード並び（PC/SP 共通＋ブレイクポイント）
 * ---------------------------------------------------------- */

/* デフォルト：PC 3カラム */
#access-accordion .access-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  padding-inline: 24px;
  align-items: stretch;
}

#access-accordion .access-item {
  min-width: 0;
}

#access-accordion .access-item > * {
  width: 100%;
}

/* タブレット：2カラム */
@media (max-width: 1024px) {
  #access-accordion .access-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* スマホ：1カラム＋横余白調整 */
@media (max-width: 640px) {
  #access-accordion .access-row {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }
}

/* -------------------------------------------------------------
 * 7) SP寄りのテキスト行間調整
 *    （PCでも致命的にはならないので max-width で軽く掛ける）
 * ---------------------------------------------------------- */
@media (max-width: 767px) {
  .access-info-section p,
  .access-info-section li {
    line-height: 1.6;
    margin: 0 0 .6em;
  }

  .access-info-section p:last-child,
  .access-info-section li:last-child {
    margin-bottom: 0;
  }
}

/* -------------------------------------------------------------
 * 8) Googlemap
 * ---------------------------------------------------------- */

.map {
  margin: 12px auto;
  border: 1px solid #c1b39a;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.map img,
.map iframe {
  width: 100%;
  display: block;
  border: 0;
}