.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.toggle-btn {
  display: none;
}

.footer {
  background-color: #333333;
  width: 100%;
  min-height: 80vh;
  position: relative;
}

.footer-content {
  margin: 0 auto;
  padding: 80px 0px 179px;
  min-height: inherit;
  position: relative;
  box-sizing: border-box; /* パディングを幅に含める */
}

/* 背景ロゴ用の新しいスタイル */
.footer-content::before {
  content: "";
  position: absolute;
  top: 47%;
  left: 68%;
  transform: translate(-50%, -50%);
  width: 77.5vw;
  max-width: 985px;
  aspect-ratio: 985 / 745;
  background-image: url("../../images/footer_js_logo.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  mix-blend-mode: luminosity;
  z-index: 1;
}

.footer-service-container {
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
  padding-top: 40px;
  position: relative;
  z-index: 2;
  box-sizing: border-box; /* パディングを幅に含める */
}

.footer-title {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 36px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 9px;
  margin: 0;
  padding: 0;
}

.footer-subtitle {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 3px;
  margin: 10px 0 20px; /* サブタイトルの上下余白を調整 */
}

.footer-divider {
  width: 100%;
  height: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-divider svg {
  width: 100%;
  height: 2px;
}

.footer-menu-grid {
  margin-top: 50px;
  display: grid;
  /* 1列目を1.5倍に広げ、残りの列を均等に分配 */
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 20px; /* ギャップを少し広げて余白を確保 */
}

.footer-menu-column {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.menu-category {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 5px;
  margin: 0 0 16px 0;
  /* 追加：フレックスボックスで配置を制御 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-right: 0px; /* トグルボタンのスペースを確保 */
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 50px;
}

.menu-list a {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 2.8px;
  text-decoration-line: underline;
  text-decoration-style: solid;
}
.footer-menu-column:last-child .menu-list a {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 3px;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.footer-menu-column:last-child .menu-list a:hover {
  color: #ffffff;
  transition: color 0.3s ease; /* スムーズな色の変化のためのトランジション */
}

.menu-category-link {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 5px;
  text-decoration: none;
}

.menu-list a:hover {
  color: #ffffff;
  transition: color 0.3s ease; /* スムーズな色の変化のためのトランジション */
}

/* 4列目のカテゴリーリンク用のホバー効果 */
.menu-category-link:hover {
  color: #ffffff;
  transition: color 0.3s ease;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.contact-icon {
  width: 20px;
  height: 20px;
}

.phone-number {
  color: #8e8e90;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 5px;
}

/* フッターバナー */
/* フッターバナー */
.footer-banner {
  background-color: #f3f8fd;
  height: 93px;
  width: 100%; /* 変更: 100%から100vwへ */
  position: absolute;
  bottom: 0;
  left: 50%; /* 追加 */
  transform: translateX(-50%); /* 追加 */
}

.footer-banner-content {
  max-width: 1350px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0px;
  position: relative; /* 追加 */
  z-index: 2; /* 追加 */
}

/* 21005066_WH_jp.png画像用スタイル */
.footer-service-image {
  position: absolute;
  bottom: -20px;
  right: 80px;
  height: 80px;
  width: auto;
  opacity: 0.7;
  z-index: 3;
}

/* 1920px未満のデフォルト設定 */
@media screen and (max-width: 1919px) {
  .footer-service-image {
    bottom: 20px;
  }
}

/* footer-contentのパディングを調整 */
.footer-content {
  padding: 80px 0px 193px; /* バナーの高さ分を確保 */
}

.footer-banner-logo {
  height: auto;
  margin-left: -16px;
}

.footer-banner-copyright {
  color: #333;
  text-align: right;
  font-family: "Noto Sans";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 3px;
  margin: 0;
}

@media screen and (max-width: 1919px) {
  .footer-content {
    margin: 0 auto;
    padding: 100px 0px;
    height: auto;
    min-height: inherit;
    position: relative;
    box-sizing: border-box;
  }
  .footer-content::before {
    content: "";
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 77.5vw; /* 985pxを相対値に変換 */
    max-width: 985px;
    aspect-ratio: 985 / 745; /* 元の画像の比率を維持 */
    background-image: url("../../images/footer_js_logo.webp");
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    mix-blend-mode: luminosity;
    z-index: 1; /* テキストより後ろに配置 */
  }
  .footer-service-container {
    padding: 0px 0 40px 0px;
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
  .footer-content {
    padding: 100px 20px; /* パディングを調整 */
  }
  .footer-banner-content {
    padding: 0 20px;
    box-sizing: border-box;
  }
  
  /* 1024px~1919px用画像調整 */
  .footer-service-image {
    height: 60px;
    right: 80px;
    bottom: 20px;
  }
  .menu-header {
    padding: 10px 0;
    border-bottom: 1px solid rgba(142, 142, 144, 0.3);
  }

  /* メニューヘッダーのホバー効果 */
  .menu-header:hover {
    opacity: 0.8;
  }

  /* メニューの間隔調整 */
  .footer-menu-column {
    gap: 0;
  }

  .footer-menu-column:last-child .menu-list.active {
    display: flex;
  }

  /* コンタクト項目の調整 */
  .contact-item {
    margin-top: 15px;
  }

  /* アニメーション時のスムーズな動き */
  .menu-list {
    margin-bottom: 30px;
  }
  .phone-number {
    font-size: 16px;
    letter-spacing: 4px;
  }
  .footer-service-container {
    max-width: 1270px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 0; /* 左右のパディングを0に */
    position: relative;
    z-index: 2;
  }
  .menu-list a {
    color: #8e8e90;
    font-family: "BIZ UDGothic";
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 2px;
    text-decoration-line: underline;
    text-decoration-style: solid;
  }
  .menu-category {
    color: #8e8e90;
    font-family: "BIZ UDGothic";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 25px; /* 156.25% */
    letter-spacing: 3px;
    margin: 0 0 16px 0;
  }
  .footer-menu-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
  }
  .footer-content::before {
    width: 85vw; /* タブレットサイズでは少し大きめに */
  }
}

/* レスポンシブ対応 */
/* タブレット用（768px～1024px） */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .footer-service-image {
    height: 60px;
    right: 80px;
    bottom: 20px;
  }
}

@media screen and (max-width: 767px) {
  .footer-menu-column:last-child .menu-list a {
    color: #8e8e90;
    font-family: "BIZ UDGothic";
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 25px;
    letter-spacing: 3px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
  }

  /* ▼変更後：1〜3列目のみデフォルト非表示にし、4列目はそのまま表示する */
  .footer-menu-column:not(:last-child) .menu-list {
    display: none; /* 1〜3列目は非表示 */
    overflow: hidden;
  }

  .footer-menu-column:not(:last-child) .menu-list.active {
    display: block; /* クリックされたら表示 */
    animation: slideDown 0.3s forwards;
  }

  /* 4列目の .toggle-btn も使わないのであれば、非表示にしておく場合 */
  .footer-menu-column:last-child .toggle-btn {
    display: none !important;
  }

  /* toggleボタン（＋アイコン）のスタイル（任意） */
  .toggle-btn {
    display: inline-block;
    margin-left: 0px;
    margin-right: 20px;
    cursor: pointer;
    vertical-align: middle;
    /* 回転アニメーションがわかりやすいように */
    transition: transform 0.3s ease;
    margin-top: 0px;
  }

  /* アイコン画像を回転させる例 */
  .toggle-btn.active img {
    transform: rotate(45deg);
  }

  /* 追加したkeyframes例 (一部既に記載済の場合は不要です) */
  @keyframes slideDown {
    0% {
      opacity: 0;
      transform: translateY(-10px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes slideUp {
    0% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateY(-10px);
    }
  }

  .footer-banner-copyright {
    color: #333;
    text-align: right;
    font-family: "Noto Sans";
    font-size: 8px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0.8px;
    margin-right: -55px;
  }

  .footer-banner {
    background-color: #f3f8fd;
    height: 73px;
    width: 100%;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-content {
    padding: 60px 30px; /* モバイル用にパディングを調整 */
  }
  .footer-banner-content {
    padding: 0 15px;
    margin-right: 60px;
  }

  .footer-banner-logo {
    max-width: 150px;
    margin-left: 0px;
  }
  
  /* モバイル用画像調整 */
  .footer-service-image {
    height: 50px;
    right: 20px;
    bottom: 35px;
  }

  .menu-list {
    padding-left: 0px;
  }

  .menu-list a {
    font-size: 14px;
  }

  /* コンタクト項目の調整 */
  .contact-item {
    margin-top: 0px;
  }

  .contact-icon {
    width: 16px;
    height: 16px;
  }

  .phone-number {
    font-size: 16px;
    letter-spacing: 3px;
  }
  .phone-number {
    font-size: 14px;
    letter-spacing: 4px;
  }

  .contact-icon {
    width: 18px;
    height: 18px;
  }

  .footer-content::before {
    width: 90vw; /* モバイルサイズではさらに大きめに */
    opacity: 0.2; /* モバイルでは少し透明度を上げる */
  }
  .menu-list {
    margin-bottom: 40px;
  }
  .footer-menu-grid {
    grid-template-columns: 1fr;
    gap: 0px;
  }

  .menu-category {
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 25px; /* 178.571% */
    letter-spacing: 2.8px;
  }

  .menu-list a {
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px; /* 166.667% */
    letter-spacing: 2.4px;
  }

  .menu-category-link {
    font-size: 18px;
    letter-spacing: 4px;
  }
  .footer {
    min-height: 60vh;
  }

  .footer-service-container {
    padding: 0px 0;
  }

  .footer-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
  }

  .footer-subtitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
  }
}

/* アニメーションの追加定義 */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* アクティブ状態の＋アイコン色変更 */
.toggle-btn.active svg path {
  stroke: #2ca7dc;
}

.footer,
.footer-title,
.footer-subtitle,
.footer .menu-category,
.footer .menu-category-link,
.footer .menu-list a,
.footer .footer-menu-column:last-child .menu-list a,
.footer .phone-number,
.footer .contact-item,
.footer .contact-item a {
  color: #ffffff;
}

.footer .menu-list a,
.footer .footer-menu-column:last-child .menu-list a,
.footer .menu-category-link,
.footer .phone-number {
  text-decoration-color: rgba(255, 255, 255, 0.85);
}

.footer .menu-header {
  color: #ffffff;
}
