/* =========================================
   フッター
========================================= */

/* サイト全体のフッター枠（ダークグレー背景、白文字、相対位置、z-index設定） */
.site-footer {
  background-color: #4D4D4D;
  color: #FFFFFF;
  padding-block: 4rem;
  margin-top: 0;
    position: relative;
  z-index: 2;
}

/* フッター専用のコンテナ（最大幅1920px、中央揃え、上マージン4rem） */
.footer__container {
  max-width: 1920px;
  margin: 0 auto;
  padding-inline: 0;
  width: 100%;
  margin-top: 4rem;
}

/* フッター内の並び替えを担うラッパー（全幅、中央揃え） */
.footer-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* フッターレイアウト（会社情報 + ナビゲーション） */
.footer-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  max-width: 1800px;
  width: fit-content;
  margin: 0 auto;
  column-gap: 64px;/* ロゴとTOPの間のスペースを32pxに設定 */
  padding-inline: clamp(20px, 4vw, 40px);
}

/* 会社情報ブロックのラッパー */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: center; /* 中央揃え */
  align-items: center; /* 中央揃え */
  width: fit-content; /* コンテンツ幅に合わせる */
}

/* フッターのロゴ全体（縦方向フレックス、中央揃え） */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center; /* ロゴを水平方向の中央に配置 */
  text-align: center;
  width: fit-content; /* コンテンツ幅に合わせる */
}

/* フッターのロゴリンク（インラインブロック、行間1、ホバー効果無効化） */
.footer-logo a {
  display: inline-block;
  line-height: 1;
  cursor: default;
}

/* ロゴリンクのホバー状態（視覚変化なしでクリック抑止） */
.footer-logo a:hover {
  opacity: 1;
}

/* フッターのロゴ画像（幅135px、最大幅200px、アスペクト比維持） */
.footer-logo img {
  width: 135px;
  max-width: 200px;
  height: auto;
  display: block;
}

/* フッターの会社情報のタイトル（白文字、下マージン1.5rem、中央揃え） */
.footer-info__title {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #FFFFFF;
  text-align: center;
}

/* フッターの会社情報タイトルの英語部分（太字、大サイズ、白文字、ブロック表示） */
.footer-info__title__en {
  display: none;
}

/* フッターの会社情報タイトルの日本語部分（メインリンクと同じサイズ、白文字、ブロック表示） */
.footer-info__title__ja {
  font-weight: 700;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.2;
  color: #FFFFFF;
  display: block;
  margin-bottom: 0.25rem; /* 英語時と同じ余白感を維持 */
}

/* フッターの会社所在地や連絡先のテキスト（メインリンクの日本語部分と同じサイズ、白文字、1.6倍行間、中央揃え） */
.footer-info__address {
  font-size: clamp(12px, 1.5vw, 16px);
  line-height: 1.6;
  color: #FFFFFF;
  text-align: center;
}

/* フッターのナビゲーション（可変幅、最小幅0） */
.footer-nav {
  flex: 1 1 auto;
  min-width: 0;
}

/* フッターのナビゲーションカラムのグリッド構成（5カラム、不等幅、上揃え） */
.footer-nav__columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: min-content;
  column-gap: 5rem;
  row-gap: 0;
  align-items: start;
}

/* フッターのナビゲーション アイテム（グリッドの各セル） */
.footer-nav__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 1列目のアイテムの幅を確実に統一 */
.footer-nav__item--home {
  box-sizing: border-box;
}

/* グリッド上の配置指定（左から1番目: TOP, 2番目: ABOUT, 3番目: PRODUCT, 4番目: POLICY, 5番目: OTHER） */
/* 1列目: TOP */
.footer-nav__item--home {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* 2-5列目: ABOUT, PRODUCT, POLICY, OTHERは1行目から開始し、複数行にまたがる */
.footer-nav__item--about {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: start;
}

.footer-nav__item--product {
  grid-column: 3;
  grid-row: 1 / 4;
  align-self: start;
}

.footer-nav__item--policy {
  grid-column: 4;
  grid-row: 1 / 4;
  align-self: start;
}

.footer-nav__item--other {
  grid-column: 5;
  grid-row: 1 / 4;
  align-self: start;
}

/* フッターの会社情報ブロック（縦方向フレックス、ロゴの下に配置、中央揃え） */
.footer-info {
  display: flex;
  flex-direction: column;
  margin-top: 0; /* ロゴの下に配置 */
  align-items: center;
  text-align: center;
  width: fit-content; /* コンテンツ幅に合わせる */
}

/* フッターのナビゲーションカラム（縦方向フレックス、間隔5rem） */
.footer-nav__column {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

/* フッターのナビゲーション右端カラム（左揃え、間隔2.5rem） */
.footer-nav__column--right {
  align-items: flex-start;
  gap: 2.5rem;
}

/* フッターのナビゲーション各セクション（縦方向フレックス） */
.footer-nav__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* 1列目のセクションの幅を統一 */
.footer-nav__item--home .footer-nav__section {
  width: 100%;
}

/* フッターのナビゲーション各セクションのメインリンク（ブロック表示、下マージン1.5rem、ホバー時に透明度変化、常時白色アンダーライン表示、縦方向フレックス） */
.footer-nav__main-link {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0.9;
  transition: opacity 0.3s ease, text-decoration 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: none;
  border-bottom: 1px solid #FFFFFF;
  background: none;
  padding: 0;
  padding-bottom: 0.5rem;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

/* アンカータグのデフォルトスタイルをリセット（divタグと同じ動作にする） */
.footer-nav__main-link:link,
.footer-nav__main-link:visited,
.footer-nav__main-link:active,
.footer-nav__main-link:focus {
  text-decoration: none;
  color: inherit;
  outline: none;
}

/* フッターのナビゲーションの英語部分（メインリンク） */
.footer-nav__main-link__en {
  font-weight: 700;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.2;
  color: #FFFFFF;
  display: block;
  margin-bottom: 0.25rem; /* 英語と日本語の間隔 */
  background: transparent;
  text-align: left;
}

/* フッターのナビゲーションの日本語部分（トップページ、私たちについてなど、通常サイズ、白文字、ブロック表示） */
.footer-nav__main-link__ja {
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 400;
  line-height: 1.4;
  color: #a5a5a5;
  display: block;
  background: transparent;
  text-align: left;
}

/* フッターのナビゲーションメインリンクのホバー状態 */
.footer-nav__main-link:hover {
  opacity: 0.7;
  cursor: pointer;
}
/* ホバー時も日本語タイトルに下線を付けない */
.footer-nav__main-link:hover .footer-nav__main-link__ja {
  text-decoration: none;
}


/* フッターのナビゲーションサブリンクリスト（縦方向フレックス、間隔0.75rem） */
.site-footer .footer-nav__list,
.footer-nav__section .footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 0;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}

/* フッターのナビゲーションサブリンクリストの各項目（リストスタイルなし、左パディング1rem、ハイフンアイコン用） */
.site-footer .footer-nav__item,
.footer-nav__list .footer-nav__item {
  list-style: none;
  position: relative;
  cursor: pointer;
  margin: 0;
  padding: 0;
  padding-left: 1rem;
  width: 100%;
  display: block;
}

/* フッターのナビゲーションサブリンクリストのハイフンアイコン（疑似要素、白文字、左側配置） */
.footer-nav__list .footer-nav__item::before {
  content: '-';
  position: absolute;
  left: 0;
  color: #FFFFFF;
}

/* フッターのナビゲーションサブリンク（ブロック表示、通常サイズ、白文字、ホバー時に透明度変化と下線表示） */
.footer-nav__link {
  padding: 0;
  padding-left: 0;
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 400;
  line-height: 1.6;
  color: #FFFFFF;
  opacity: 0.9;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: block;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.footer-nav__link--disabled {
  pointer-events: none;
  cursor: default;
  opacity: 0.8;
  text-decoration: none;
  color: #999999; /* 未実装のためグレー系の色に変更 */
}

/* フッターのナビゲーションサブリンクのホバー状態 */
.footer-nav__link:hover {
  opacity: 0.7;
  cursor: pointer;
}

/* フッター下部（アンダーラインと著作権表示、上マージン2rem、上パディング3rem） */
.footer-bottom {
  padding-top: 3rem;
}

/* フッターとコピーライトの仕切り線（半透明白色、下マージン3rem） */
.footer-bottom__border {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 3rem;
}

/* フッターの著作権表示（メインリンクと同じサイズ、半透明白色、中央揃え） */
.footer-copyright {
  font-size: clamp(18px, 2.5vw, 24px);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* スクロールトップボタン（固定位置、右下、円形、半透明背景、初期状態は非表示、浮遊アニメーション） */
 .scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: rgba(77, 77, 77, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  animation: scrollTopFloat 2.4s ease-in-out infinite;
}

/* スクロールトップボタンが表示された状態（JS制御、完全表示、ポインターイベント有効） */
.scroll-top--visible {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* メニューが開いているときにスクロールトップボタンを非表示 */
body.menu-open .scroll-top {
  display: none;
  opacity: 0;
  pointer-events: none;
}

/* スクロールトップボタンのホバー状態（背景色濃化、上に移動、シャドウ拡大） */
.scroll-top:hover {
  background-color: rgba(77, 77, 77, 1);
  transform: translateY(-0.25rem);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
 
/* スクロールトップボタンの浮遊アニメーション（上下に移動） */
@keyframes scrollTopFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* =========================================
   レスポンシブ対応
========================================= */

/* タブレット以下（1024px以下） */
@media (max-width: 1024px) {
  /* 会社情報とナビゲーションを縦積みに */
  .footer-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* タブレットでの左右余白最適化 */
  .footer__container {
    padding-inline: 0;
  }
}

/* モバイル（768px以下） */
@media (max-width: 768px) {
  /* モバイル時のフッター余白 */
  .site-footer {
    padding-block: 2rem;
    margin-top: 0;
  }

  /* モバイル時の左右余白 */
  .footer__container {
    padding-inline: 0;
  }

  /* フッターレイアウトのパディングを調整 */
  .footer-layout {
    padding-inline: clamp(16px, 3vw, 24px);
  }

  /* モバイル時は縦型レイアウトへ */
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* モバイルではfooter-brandを全幅に戻す */
  .footer-brand {
    align-self: stretch;
    align-items: center;
    width: 100%;
  }

  /* モバイルではfooter-logoを全幅に戻す */
  .footer-logo {
    width: 100%;
  }

  /* モバイルではfooter-infoを全幅に戻す */
  .footer-info {
    width: 100%;
  }

  /* 2カラム構成に変更、セクションを直接グリッドアイテムとして配置 */
  .footer-nav__columns {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
  }

  /* スマホ時はTOPとABOUTを同じ行に配置（ハンバーガーメニューと同じ） */
  .footer-nav__item--home {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-nav__item--about {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-nav__item--product {
    grid-column: 1;
    grid-row: 2;
  }

  .footer-nav__item--policy {
    grid-column: 2;
    grid-row: 2;
  }

  .footer-nav__item--other {
    grid-column: 1;
    grid-row: 3;
  }

  /* カラムを無効化して、セクションを直接グリッドアイテムとして扱う */
  .footer-nav__column {
    display: contents;
  }

  /* セクションを直接グリッドアイテムとして扱う */
  .footer-nav__section {
    text-align: center;
    align-items: center;
  }

  /* メインリンクも中央揃え */
  .footer-nav__main-link {
    text-align: center;
  }

  /* サブリンクリストを左揃え */
  .footer-nav__list {
    align-items: flex-start;
  }

  /* サブリンクを左揃え */
  .footer-nav__link {
    text-align: left;
    padding-left: 1rem;
  }

  /* ハイフンアイコンを表示（ulのリストアイテムのみ） */
  .footer-nav__list .footer-nav__item::before {
    content: '-';
    position: absolute;
    left: 0;
    color: #FFFFFF;
  }

  /* モバイル時の行間を統一・狭める */
  /* 会社情報タイトルの行間 */
  .footer-info__title {
    line-height: 1.3;
  }

  /* 会社情報タイトル（英語部分）の行間 */
  .footer-info__title__en {
    line-height: 36px;
  }

  /* 会社情報住所の行間 */
  .footer-info__address {
    line-height: 1.3;
  }

  /* ナビゲーションメインリンク（英語部分）の行間を統一（ハンバーガーメニューと同じ） */
  .footer-nav__main-link__en {
    display: block;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }

  /* モバイルでも縦並びに（ハンバーガーメニューと同じ） */
  .footer-nav__main-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  /* モバイルでも日本語をブロック表示に（ハンバーガーメニューと同じ） */
  .footer-nav__main-link__ja {
    display: block;
    font-size: clamp(12px, 1.5vw, 16px);
    line-height: 1.4;
  }

  /* 会社情報タイトルもモバイルでは横並びに */
  .footer-info__title {
    display: block;
  }

  .footer-info__title__en {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0;
  }

  .footer-info__title__ja {
    display: inline-block;
  }

  /* ナビゲーションサブリンクの行間を統一 */
  .site-footer .footer-nav__section .footer-nav__list .footer-nav__link,
  .site-footer .footer-nav__link,
  .footer-nav__section .footer-nav__list .footer-nav__link {
    font-size: clamp(12px, 1.5vw, 16px);
    font-weight: 400;
    line-height: 1.8;
    padding: 0;
    padding-left: 0;
    text-align: left;
    width: 100%;
  }

  /* ナビゲーションサブリンクリストの間隔を統一 */
  .site-footer .footer-nav__list,
  .footer-nav__section .footer-nav__list {
    gap: 0.35rem;
  }

  /* 各セクションの高さを柔軟にする（リスト有無で自然に） */
  .footer-nav__section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  /* コピーライトの行間 */
  .footer-copyright {
    line-height: 1.3;
  }

  /* コピーライト付近の余白調整 */
  .footer-bottom {
    padding-top: 1.5rem;
  }

  /* モバイル時の仕切り線間隔 */
  .footer-bottom__border {
    margin-bottom: 1.5rem;
  }
}

/* さらに小さい画面（480px以下） */
@media (max-width: 480px) {
  /* 2カラムレイアウトに変更、セクションを直接グリッドアイテムとして配置 */
  .footer-nav__columns {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
  }

  /* TOPとABOUTを同じ行に配置（ハンバーガーメニューと同じ） */
  .footer-nav__item--home {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-nav__item--about {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-nav__item--product {
    grid-column: 1;
    grid-row: 2;
  }

  .footer-nav__item--policy {
    grid-column: 2;
    grid-row: 2;
  }

  .footer-nav__item--other {
    grid-column: 1;
    grid-row: 3;
  }

  /* セクションを直接グリッドアイテムとして扱う */
  .footer-nav__column {
    display: contents;
  }

  /* セクションを直接グリッドアイテムとして扱う */
  .footer-nav__section {
    text-align: center;
    align-items: center;
  }

  /* メインリンクも中央揃え */
  .footer-nav__main-link {
    text-align: center;
  }

  /* サブリンクリストを左揃え */
  .footer-nav__list {
    align-items: flex-start;
  }

  /* サブリンクを左揃え */
  .footer-nav__link {
    text-align: left;
    padding-left: 1rem;
  }

  /* ハイフンアイコンを表示（ulのリストアイテムのみ） */
  .footer-nav__list .footer-nav__item::before {
    content: '-';
    position: absolute;
    left: 0;
    color: #FFFFFF;
  }

  /* 右カラムのテキストを中央寄せに */
  .footer-nav__column--right {
    align-items: center;
    text-align: center;
  }

  /* ロゴを中央配置に */
  .footer-logo {
    text-align: center;
    margin: 0 auto;
    width: 100%;
  }

  /* 会社情報ブロックを中央揃えに */
  .footer-info {
    text-align: center;
    align-items: center;
    width: 100%;
  }

  /* 480px以下でもfooter-brandを全幅に戻す */
  .footer-brand {
    align-self: stretch;
    align-items: center;
    width: 100%;
  }

  /* 480px以下でも行間を統一（768pxの設定を継承しつつ、必要に応じて調整） */
  /* 会社情報タイトルの行間 */
  .footer-info__title {
    line-height: 1.3;
  }

  /* 会社情報タイトル（英語部分）の行間 */
  .footer-info__title__en {
    line-height: 36px;
  }

  /* 会社情報住所の行間 */
  .footer-info__address {
    line-height: 1.3;
  }

  /* ナビゲーションメインリンク（英語部分）の行間を統一（ハンバーガーメニューと同じ） */
  .footer-nav__main-link__en {
    display: block;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }

  /* モバイルでも縦並びに（ハンバーガーメニューと同じ） */
  .footer-nav__main-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  /* モバイルでも日本語をブロック表示に（ハンバーガーメニューと同じ） */
  .footer-nav__main-link__ja {
    display: block;
    font-size: clamp(12px, 1.5vw, 16px);
    line-height: 1.4;
  }

  /* 会社情報タイトルもモバイルでは横並びに */
  .footer-info__title {
    display: block;
  }

  .footer-info__title__en {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0;
  }

  .footer-info__title__ja {
    display: inline-block;
  }

  /* ナビゲーションサブリンクの行間を統一 */
  .site-footer .footer-nav__section .footer-nav__list .footer-nav__link,
  .site-footer .footer-nav__link,
  .footer-nav__section .footer-nav__list .footer-nav__link {
    font-size: clamp(12px, 1.5vw, 16px);
    font-weight: 400;
    line-height: 1.8;
    padding: 0;
    padding-left: 0;
    text-align: left;
    width: 100%;
  }

  /* ナビゲーションサブリンクリストの間隔を統一 */
  .site-footer .footer-nav__list,
  .footer-nav__section .footer-nav__list {
    gap: 0.35rem;
  }

  /* 各セクションの高さを柔軟にする（リスト有無で自然に） */
  .footer-nav__section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  /* コピーライトの行間 */
  .footer-copyright {
    line-height: 1.3;
  }
}
