@charset "UTF-8";

/* ===============================
   Access Page
================================= */

/* 全体 */
.access {
  padding: 150px 0 120px;
  text-align: center; /* 全体を中央軸に */
}

/* ===== 見出し（緑の山アイコン付き） ===== */
.access .head {
    position: relative;
    display: inline-block;
    margin: 0 auto 60px;
  }
  
  .access .head::before {
    content: "";
    position: absolute;
    top: 36px;  /* ← 下にずらして高さ中央へ */
    left: 100px;
    width: 58px;
    height: 45px;
    background: url("../images/sub4_access/mountain_58x45.svg") no-repeat center / contain;
  }
    
  .access .head p {
    margin-top: 25px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
  }
  

/* ===== Google Map ===== */
.access .map {
  margin-top: 60px;
  width: 90%;              /* 👈 左右に10%の余白を確保 */
  margin-left: auto;
  margin-right: auto;      /* 中央寄せ */
}

.access .map iframe {
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
  width: 100%;
  height: 350px;
}

.access .map .address {
  margin-top: 10px;
}

/* ===== 交通案内（2カラム） ===== */
.route {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 100px;
  gap: 60px;
  flex-wrap: wrap;
  text-align: left; /* 内部説明は左揃え */
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* 背景画像を見出しとして使用 */
.train h3,
.car h3 {
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
  width: 444px;
  height: 62px;
  margin-bottom: 25px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-left: auto;
  margin-right: auto; /* 見出し画像も中央配置 */
}

/* alt読み上げ対応 */
.train h3::after {
  content: "電車でお越しの場合";
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.car h3::after {
  content: "お車でお越しの場合";
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 背景画像設定 */
.train h3 {
  background-image: url("../images/sub4_access/train_444x62.svg");
}

.car h3 {
  background-image: url("../images/sub4_access/car_444x62.svg");
}

.route ul {
  max-width: 420px;
  margin: 0 auto;
}

.route li {
  margin-bottom: 20px;
}

/* ===== ご予約・送迎について ===== */
.reservation {
  margin-top: 120px;
  position: relative;
  text-align: center; /* 全体中央寄せ */
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.reservation h3 {
  font-size: 36px;
  font-weight: 500;
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
  text-align: center;
}

/* 太陽アイコンを右に配置 */
.reservation h3::after {
  content: "";
  position: absolute;
  top: 15px;
  right: -80px;
  width: 57px;
  height: 57px;
  background: url("../images/sub4_access/sun_57x57.svg") no-repeat center / contain;
}

/* ===============================
   Responsive (置き換え版)
================================= */

/* 1024px 以下：微調整 */
@media (max-width: 1024px) {
    .access .map iframe { height: 320px; }
    /* ※装飾の位置(top/left)は固定のまま。必要なら手動で微調整OK
       .access .head::before { left: 120px; top: 32px; } */
  }
  
  /* 900px 以下：見出しをやや縮小。装飾は位置固定のまま、同比率で縮小 */
  @media (max-width: 900px) {
    /* 見出しサイズ（PC:42px → 34px を想定） */
    .access .head h2 { font-size: 34px; }
  
    /* 装飾（位置は固定のまま、サイズのみ連動縮小）
       58 * (34/42) ≒ 47, 45 * (34/42) ≒ 36 */
    .access .head::before {
      width: 47px;
      height: 36px;
      top: 22px;  /* ← 下にずらして高さ中央へ */
      left: 100px;
    }
  
    /* 交通案内：縦並び */
    .route {
      flex-direction: column;
      align-items: center;
      gap: 40px;
      max-width: 90%;
      text-align: left;
    }
    .train h3, .car h3 { width: 320px; height: auto; }
  
    /* ご予約・送迎：右アイコンは右に維持（はみ出し防止の余白） */
    .reservation { text-align: center; }
    .reservation h3 {
      display: inline-block;
      padding-right: 72px;   /* 右アイコン分スペース */
      margin-bottom: 20px;
      font-size:26px;
    }
    .reservation h3::after { 
      right: 0; 
      top: 8px; 
      width: 41px; 
      height: 41px;
    }
    
    .reservation p {
      text-align: left;
      max-width: 90%;
      margin: 0 auto;
    }
  
    .access .map iframe { height: 300px; }
  }
  
  /* 560px 以下：さらに縮小（位置は固定のまま） */
  @media (max-width: 560px) {
    .access { padding: 150px 0 100px; }
    .access h2 { font-size: 30px; }
  
    /* 装飾を同比率で縮小
       58 * (30/42) ≒ 41, 45 * (30/42) ≒ 32 */
    .access .head::before {
      width: 41px;
      height: 32px;
      top: 24px;
    }
  
    .train h3, .car h3 { width: 300px; }
    .access .map iframe { height: 260px; }
    .reservation h3 { font-size: 22px; }
  }
  
  /* 420px 以下：極小端末。右に置けない場合のみ下へ逃がす（任意） */
  @media (max-width: 420px) {
    .access .head::before{
      display:none;
    }
    .train h3, .car h3 { width: 260px; }
  
    /* 見出しは必要ならさらに微縮小（任意）
       .access h2 { font-size: 26px; }
       .access .head::before { width: 36px; height: 28px; } */
  
    .reservation h3 { padding-right: 0; }
    .reservation h3::after {
      display:none;
    }
  }
  
  /* アニメーション */

  .fadein {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .fadein.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .fadein:nth-of-type(1) { transition-delay: 0.1s; }
  .fadein:nth-of-type(2) { transition-delay: 0.2s; }
  .fadein:nth-of-type(3) { transition-delay: 0.3s; }
  .fadein:nth-of-type(4) { transition-delay: 0.4s; }

  /* ===============================
   Train / Car Animation
================================= */

/* ゆらゆら動きの定義（1回分） */
@keyframes sway-once {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  75% {
    transform: rotate(-2deg);
  }
}

/* 一度だけアニメーションを再生するクラス */
.animate-sway {
  animation: sway-once 3s ease-in-out 1;
  transform-origin: center center;
}