/* =========================================================
   sitemap.css (Final v3 - Hover Slide Animation)
   - common.css連携
   - フッター同様の右スライドホバー
   - PC: 3列グリッド / SP: 1列
========================================================= */

/* -------------------------------------------
   1. サイトマップコンテナ（開閉パネル）
------------------------------------------- */
.sitemap {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--bg-body, #fff);
  z-index: 998;
  transition: right 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 90px 40px 60px;
  box-sizing: border-box;
}

.sitemap.panelactive {
  right: 0;
}

/* -------------------------------------------
   2. グリッドレイアウト
------------------------------------------- */
.sitemap-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 60px;
  align-items: start;
}

.sitemap-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* -------------------------------------------
   3. 親リンク（大項目/見出し）
------------------------------------------- */
.sitemap-section ul li:first-child {
  margin-bottom: 12px;
}

.sitemap-section ul li:first-child a,
.sitemap-section ul li:first-child span[style*='block'] {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-left: 3px solid transparent;
  padding-left: 10px;
  margin-left: -13px;
  transition: all 0.3s ease;
}

/* 英語テキスト (Top) */
.text-en {
  display: block;
  font-size: 0.8rem;
  color: var(--text-sub, #999);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 2px;
}

/* 日本語テキスト (Bottom) */
.text-ja {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main, #1a1a1a);
  font-family: var(--ff-sans, sans-serif);
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* 親リンクホバー時 */
.sitemap-section ul li:first-child a:hover {
  border-left-color: var(--color-primary, #00a1e9);
}
.sitemap-section ul li:first-child a:hover .text-ja {
  color: var(--color-primary-dark, #1b4b8d);
}
.sitemap-section ul li:first-child a:hover .text-en {
  color: var(--color-primary, #00a1e9);
}

/* -------------------------------------------
   4. 小項目（サブリンク）
   ★ここをフッターと同じ挙動に修正
------------------------------------------- */
.sitemap-section ul li:not(:first-child) {
  margin-bottom: 8px;
}

.sitemap-section ul li:not(:first-child) a {
  display: inline-block; /* スライド動作に必須 */
  font-size: 0.9rem;
  color: var(--color-gray-dark, #555);
  text-decoration: none;
  font-family: var(--ff-sans, sans-serif);
  line-height: 1.6;

  /* なめらかな動きを設定 */
  transition: all 0.3s ease;
}

/* 擬似要素（ハイフン） */
.sitemap-section ul li:not(:first-child) a::before {
  content: '-';
  margin-right: 8px;
  color: var(--color-gray, #ccc);
  font-family: sans-serif;
  transition: color 0.3s ease;
}

/* ホバー時の挙動：下線を消して右へスライド */
.sitemap-section ul li:not(:first-child) a:hover {
  color: var(--color-primary, #00a1e9); /* フッターと同じ明るい青 */
  text-decoration: none; /* 下線を削除 */
  transform: translateX(4px); /* 右に4pxスライド */
}

/* ハイフンの色も連動 */
.sitemap-section ul li:not(:first-child) a:hover::before {
  color: var(--color-primary, #00a1e9);
}

/* -------------------------------------------
   5. スマホ対応 (Responsive)
------------------------------------------- */
@media screen and (max-width: 768px) {
  .sitemap {
    padding: 80px 20px 40px;
  }

  .sitemap-inner {
    display: block;
  }

  .sitemap-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-gray-border, #eee);
  }

  .sitemap-section:last-child {
    border-bottom: none;
  }

  .text-ja {
    font-size: 1.1rem;
  }

  .sitemap-section ul li:not(:first-child) a {
    padding: 6px 0;
    display: block;
  }

  /* スマホではスライド無効化（指で隠れるのを防ぐ＆操作性向上） */
  .sitemap-section ul li:not(:first-child) a:hover {
    transform: none;
  }
}
