.site-footer {
  background-color: var(--pale-marron);
  color: var(--text-main);
  /* 左右余白を他のセクション(var(--side-gutter))と統一 */
  padding: 180px var(--side-gutter) 80px; 
  border-top: 1px solid #dfd4cc;
  position: relative; /* z-indexを有効にするために必要 */
  z-index: 1000;      /* 固定ナビ(z-index: 100)よりも上に重ねて物理的に隠す */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between; /* 左右に配置を分ける */
  align-items: stretch; /* 左右の要素の高さを揃える */
  flex-wrap: wrap; /* スマホ時に折り返し */
  gap: 100px; /* 左右の間隔をさらに広げ、ゆとりを持たせる */
}

/* 左側：ロゴ周辺 */
.footer-left {
  flex: 1;
  min-width: 300px;
  margin: 0;
}

.footer-logo {
  margin-bottom: 60px; /* 余白をさらに広げてゆったりさせる */
  margin-left: -10px;  /* 揃えを微調整 */
}

.footer-logo img {
  height: 6rem; /* 3倍だとPCで圧迫感があるため、2.5倍程度に調整 */
  width: auto;
  display: block;
  /* 画像の色を --accent-marron (#715b4f) に変更するフィルタ */
  filter: brightness(0) saturate(100%) invert(39%) sepia(10%) saturate(1100%) hue-rotate(334deg) brightness(94%) contrast(87%);
}

.footer-id {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 40px; /* ゆとりを追加 */
  opacity: 0.7;
}

.footer-message {
  font-size: 1.1rem;
  line-height: 2.2; /* さらに行間を広げて空気感を持たせる */
}

/* 右側：リンク周辺 */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* 右寄せ */
  text-align: right;
  margin: 0;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 20px;
  margin-bottom: 80px; /* 上下のリンクグループの間隔を広げる */
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s, transform 0.3s; /* transformもアニメーション対象に追加 */
  display: inline-block; /* transformを適用するために必要 */
}

.footer-nav a:hover {
  color: var(--accent-marron);
  transform: translate(-3px, -3px); /* 斜め上に移動 */
}

.footer-legal {
  display: flex;
  gap: 25px; /* リーガルリンク同士の間隔を広げる */
  font-size: 0.75rem;
}

.footer-legal a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  display: inline-block; /* transformを適用するために必要 */
  transition: transform 0.3s, color 0.3s; /* transformとcolorをアニメーション対象に追加 */
}

/* ホバー時に斜め上に移動 */
.footer-legal a:hover {
  transform: translate(-3px, -3px);
  color: var(--accent-marron); /* ホバー時に色も変更 */
}

/* 画像コンテナ：フッターのメイン幅に合わせる */
.footer-image-container {
  width: 100%;
  max-width: 100%; /* 画面幅を超えないように制限 */
  margin: 120px auto 0; /* サンクス画像の上にさらに大胆な余白（120px）を設定 */
  display: flex;
  justify-content: center;
}

.footer-thankyou {
  width: 90%;
  max-width: 100%; /* 画像がコンテナからはみ出すのを防止 */
  height: auto;
  display: block;
  /* 画像の色を --accent-marron (#715b4f) に近似させるフィルタ */
  filter: brightness(0) saturate(100%) invert(39%) sepia(10%) saturate(1100%) hue-rotate(334deg) brightness(94%) contrast(87%);
}

/* 下部エリア */
.footer-bottom {
  max-width: 100%; /* コンテナ幅いっぱいに広げる */
  margin: 60px auto 0; 
  padding-top: 40px;
  border-top: 1px solid #dfd4cc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 1rem;
  opacity: 0.6;
}

.back-to-top {
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--accent-marron);
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: transform 0.3s;
}

.back-to-top::before {
  content: '↑';
  margin-right: 5px;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* モバイル対応 */
@media (max-width: 788px) {
  .site-footer {
    padding: 160px var(--side-gutter) 80px;
  }
  .footer-inner {
    gap: 40px;
  }
  .footer-right {
    align-items: flex-start;
    text-align: left;
  }
  .footer-nav ul {
    flex-wrap: wrap;
    gap: 10px;
  }
  .footer-thankyou {
    width: 100%;
  }
  .footer-logo {
    display: none;
  }
}