/* =========================================================
  Design Palette Footer
  - PC:  1200px〜  （ヘッダーと統一）
  - TAB: 481px〜1199px（ヘッダーと統一）
    - TAB large: 680px〜1199px → デスクトップナビ（1行）
    - TAB small: 481px〜679px  → SPナビ（2行）
  - SP:  〜480px   （ヘッダーと統一）
  - 375px以下は横スクロール（ヘッダーと統一）
========================================================= */


/* =========================
  1. Base
========================= */

* {
  box-sizing: border-box;
}


/* =========================
  2. Variables
========================= */

:root {
  --footer-color-bg: #222222;
  --footer-color-text: #ffffff;
  --footer-color-copyright: #dddddd;
  --footer-color-button-bg: #ffffff;

  --footer-inner-pc: 1200px;
  --footer-inner-sp: 335px;

  --footer-transition: 0.2s ease;
}


/* =========================
  3. Footer / Common
========================= */

.site-footer {
  width: 100%;
  /*
    【背景切れ防止 + 375px横スクロール対応】
    PC ブレイクポイントを 1200px に合わせたため、1200px 未満では
    inner がフッター幅を超えなくなり背景切れが解消される。
    375px 以下はヘッダーと同じく横スクロール表示。
  */
  min-width: 375px;
  background: var(--footer-color-bg);
  color: var(--footer-color-text);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer button {
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.site-footer img {
  display: block;
  max-width: 100%;
}

.site-footer__inner {
  margin-inline: auto;
}

.site-footer__logo {
  display: block;
}

.site-footer__logo-image {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.site-footer__nav {
  display: flex;
  align-items: center;
}

.site-footer__nav-list {
  align-items: center;
}

/* デスクトップナビ（PC・TAB large）：デフォルトは非表示 */
.site-footer__nav-list--desktop {
  display: none;
}

/* SPナビ（SP・TAB small）：デフォルトは非表示 */
.site-footer__nav-list--sp {
  display: none;
}

.site-footer__nav-row {
  display: flex;
  align-items: center;
}

.site-footer__link {
  color: var(--footer-color-text);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: opacity var(--footer-transition);
}

.site-footer__link:hover {
  opacity: 0.7;
}

.site-footer__divider {
  display: block;
  flex: 0 0 auto;
  width: 1px;
  background: var(--footer-color-text);
}

.site-footer__copyright {
  margin: 0;
  color: var(--footer-color-copyright);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
}

.site-footer__back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--footer-color-button-bg);
  transition:
    opacity var(--footer-transition),
    transform var(--footer-transition);
}

.site-footer__back-to-top:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.site-footer__back-to-top-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* =========================
  4. Footer / PC
  - 1200px〜（ヘッダーと統一）
========================= */

@media (min-width: 1200px) {
  .site-footer {
    height: 332px;
  }

  .site-footer__inner {
    width: var(--footer-inner-pc);
    max-width: 100%;
    height: 100%;
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .site-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-footer__logo {
    width: auto;
    height: 48px;
  }

  /* PC：デスクトップナビ表示 */
  .site-footer__nav-list--desktop {
    display: flex;
    gap: 24px;
  }

  .site-footer__nav-list--sp {
    display: none;
  }

  .site-footer__link {
    font-size: 24px;
  }

  .site-footer__divider {
    height: 40px;
  }

  .site-footer__bottom {
    position: relative;
    min-height: 64px;
    margin-top: 60px;
  }

  .site-footer__copyright {
    font-size: 20px;
    line-height: 64px;
    text-align: center;
  }

  .site-footer__back-to-top {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
  }
}


/* =========================
  5. Footer / Tablet Common
  - 481px〜1199px（ヘッダーと統一）
  - ロゴ上・ナビ下のカラム配置
  - inner は流動幅で背景切れを防止
========================= */

@media (min-width: 481px) and (max-width: 1199px) {
  .site-footer {
    height: auto;
  }

  .site-footer__inner {
    /*
      流動幅で背景切れを防止。
      max 900px / 左右 40px ずつの余白。
    */
    width: min(900px, calc(100% - 80px));
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .site-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .site-footer__logo {
    height: 40px;
  }

  .site-footer__bottom {
    position: relative;
    min-height: 56px;
    margin-top: 48px;
  }

  .site-footer__copyright {
    font-size: 16px;
    line-height: 56px;
    text-align: center;
  }

  .site-footer__back-to-top {
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
  }
}


/* =========================
  5a. Footer / Tablet Large
  - 680px〜1199px
  - デスクトップナビ（1行）
========================= */

@media (min-width: 680px) and (max-width: 1199px) {
  .site-footer__nav-list--desktop {
    display: flex;
    gap: 20px;
  }

  .site-footer__nav-list--sp {
    display: none;
  }

  .site-footer__link {
    font-size: 18px;
  }

  .site-footer__divider {
    height: 32px;
  }
}


/* =========================
  5b. Footer / Tablet Small
  - 481px〜679px
  - SPナビ（2行）
========================= */

@media (min-width: 481px) and (max-width: 679px) {
  .site-footer__nav-list--desktop {
    display: none;
  }

  .site-footer__nav-list--sp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 0;
  }

  .site-footer__nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

  .site-footer__link {
    font-size: 16px;
    line-height: 1;
  }

  .site-footer__divider {
    width: 1px;
    height: 24px;
  }
}


/* =========================
  6. Footer / SP
  - 〜480px（ヘッダーと統一）
========================= */

@media (max-width: 480px) {
  .site-footer {
    height: auto;
  }

  .site-footer__inner {
    width: min(var(--footer-inner-sp), calc(100% - 40px));
    margin-inline: auto;
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .site-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer__logo {
    height: 32px;
  }

  /* SP：SPナビ表示 */
  .site-footer__nav-list--desktop {
    display: none;
  }

  .site-footer__nav-list--sp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
  }

  .site-footer__nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

  .site-footer__link {
    font-size: 16px;
    line-height: 1;
  }

  .site-footer__divider {
    width: 1px;
    height: 24px;
  }

  .site-footer__bottom {
    width: 100%;
    margin-top: 40px;
  }

  .site-footer__copyright {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
  }

  .site-footer__back-to-top {
    width: 48px;
    height: 48px;
    margin-top: 32px;
    margin-right: 0;
    margin-left: auto;
  }
}
