/* =============================================================
   サイトフッター
   - PCがデフォルト（デスクトップファースト）：4列グリッド、見出しはh3風、パネル常時展開
   - 901-1239px は 4列レイアウトを維持（カラム fr 比率 + gap clamp で自動縮小）
   - 900px 以下でアコーディオン挙動に切替（js-sp-dropdown-btn ハンドラ流用）
   ============================================================= */

.site-footer {
  background: #222222;
  color: #ffffff;
  font-size: 14px;
}

/* 既定リンク色（リスト・bottom links 等の汎用リンク用）
   ※ボタン系（__btn--*）には適用しない */
.site-footer__list a,
.site-footer__bottom-links a {
  color: #ffffff;
  transition:
    color 200ms ease,
    opacity 200ms ease;
}

.site-footer__bottom-links a {
  color: #000;
}

.site-footer__list a:hover,
.site-footer__list a:focus-visible,
.site-footer__bottom-links a:hover,
.site-footer__bottom-links a:focus-visible {
  opacity: 0.7;
}

.site-footer__inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-block: 100px;
  padding-inline: 20px;
}

.site-footer__main {
  display: grid;
  /* fr 比率（180/180/190/310 ≒ 1/1/1/1.7）で 901-1239px でも 4列レイアウトを維持。
     PC原寸（1200px container）では概ね実測の幅に収束する */
  grid-template-columns: minmax(0, 180px) minmax(0, 180px) minmax(0, 180px) minmax(0, 310px);
  gap: clamp(12px, 2vw, 60px);
  justify-content: space-between;
}

/* ── 見出しボタン（PCはh3風表示。1239px以下でアコーディオン化） ── */
.site-footer__heading {
  display: grid;
  grid-template-columns: 1fr 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 0 10px;
  margin: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: default;
  pointer-events: none; /* PC: クリック無効（h3的見た目） */
  transition: color 200ms ease;
}

.site-footer__heading::after {
  display: none; /* PC: +/- アイコン非表示 */
}

.site-footer__heading:hover,
.site-footer__heading:focus-visible {
  opacity: 0.85;
}

/* ── 展開パネル（PCは常時展開） ── */
.site-footer__panel {
  height: auto;
  overflow: visible;
}

.site-footer__panel[hidden] {
  display: block; /* PC: hidden 属性を無効化 */
}

/* PC 専用：SP アコーディオン JS が設定する inline style="height: 0px|auto"
   を打ち消し、panel が常に開いた状態で表示されるよう !important で固定。
   （SP 用の @media (max-width: 900px) 側では !important を使わず、
   JS のインライン height アニメーションが正常に効くようにする） */
@media (min-width: 901px) {
  .site-footer__panel {
    height: auto !important;
    overflow: visible !important;
  }
}

/* PC: SP専用の入れ子（関連サービス+インフラサービス）は非表示 */
.site-footer__nested-sp {
  display: none;
}

/* PC: SP専用の <li>（資料ダウンロードを コンテンツ に、他社+パートナーを サポート に
   重複させた SP 用 li）は非表示 */
.site-footer__li--sp {
  display: none;
}

/* ── 各リンクリスト ── */
.site-footer__list {
  list-style: none;
  padding-top: 16px;
  padding-bottom: 0;
}

.site-footer__panel:not(:last-child) {
  margin-bottom: 40px;
}

.site-footer__list li {
  margin-block: 8px;
}

.site-footer__list li::before {
  content: "- ";
  color: rgba(255, 255, 255, 0.6);
  margin-right: 4px;
}

.site-footer__list a {
  font-size: 12px;
  color: #aaa;
}

/* メインサービスリスト（#footer-services 直下）のみ：
   font-size 16px / ::before（"- " ブレット）なし
   ※ ≤900px の SP では別途 13px に上書きされる */
#footer-services > .site-footer__list a {
  font-size: 15px;
}
#footer-services > .site-footer__list li::before {
  content: none;
}

/* ── CTAエリア（右カラム）
   - 会員登録/ログイン + お申込み（薄オレンジ + オレンジ、307×60、角丸5）
   - メール/電話サポート（白bg + 青枠2px、307×60、角丸10）
   - SNSアイコン2つ並び、gap 21px
   ────────────────────────────────────────────── */

/* 共通ボタン基底
   矢印はボタン右端からの絶対位置に固定 → コンテンツ幅に関係なく
   3ボタン（login / apply / inquiry）の矢印が同じ x 位置で揃う */
.site-footer__btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 100%;
  padding: 16px 36px;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.03em;
  transition:
    filter 200ms ease,
    background 200ms ease;
}

.site-footer__cta-buttons {
  margin-bottom: 60px;
}

/* ボタン内のラベル（矢印は親 .site-footer__btn の右端に絶対配置） */
.site-footer__btn-label {
  display: inline-block;
}

/* ボタン右端の 45° 矢印（共通位置） */
.site-footer__btn::after {
  content: "";
  position: absolute;
  right: 50px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.site-footer__btn:hover,
.site-footer__btn:focus-visible {
  opacity: 1;
}

/* 会員登録/ログイン：薄オレンジ */
.site-footer__btn--login {
  background: #ffecd7;
  color: #111111;
  border-radius: 5px;
  margin-bottom: 20px;
}

.site-footer__btn--login:hover,
.site-footer__btn--login:focus-visible {
  background: #ffd7a8;
  color: #111111;
}

/* お申込み：オレンジ + 内側白枠 */
.site-footer__btn--apply {
  position: relative;
  background: #ff8802;
  color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 0 40px rgba(169, 185, 207, 0.16);
}

.site-footer__btn--apply::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  pointer-events: none;
}

.site-footer__btn--apply:hover,
.site-footer__btn--apply:focus-visible {
  filter: brightness(0.92);
  color: #ffffff;
}

/* メールサポート：白bg + 青枠 + 青テキスト + メールアイコン
   icon と label を横並びに配置（矢印は親 .site-footer__btn::after が右端に絶対配置） */
.site-footer__btn--inquiry {
  background: #ffffff;
  color: #0068b7;
  border: 2px solid #0068b7;
  border-radius: 10px;
  grid-template-columns: 28px auto;
  justify-content: center;
  align-items: center;
  column-gap: 18px;
}

.site-footer__btn--inquiry img {
  width: 28px;
  height: auto;
}

.site-footer__btn--inquiry:hover,
.site-footer__btn--inquiry:focus-visible {
  background: #0068b7;
  color: #ffffff;
}

.site-footer__btn--inquiry:hover img,
.site-footer__btn--inquiry:focus-visible img {
  filter: brightness(0) invert(1);
}

/* 電話サポート：白bg + 青枠 + 青番号 + 矢印なし */
.site-footer__btn--phone {
  background: #ffffff;
  color: #0068b7;
  border: 2px solid #0068b7;
  border-radius: 10px;
  grid-template-columns: 20px auto;
  justify-content: center;
  column-gap: 12px;
  font-family: "Barlow", "DIN 2014", "Arial Narrow", sans-serif;
  font-size: 27px;
  letter-spacing: 0;
  cursor: default;
}

.site-footer__btn--phone {
  padding: 8px 36px;
}

.site-footer__btn--phone img {
  width: 24px;
  height: auto;
}

/* 電話番号は矢印不要 */
.site-footer__btn--phone::after {
  display: none;
}

/* サポートブロック（タイトル + ボタン + 受付時間） */
.site-footer__support-block {
  text-align: center;
  margin-bottom: 30px;
}

.site-footer__support-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.site-footer__support-hours {
  font-size: 15px;
  font-weight: 500;
  margin-top: 5px;
  color: #ffffff;
}

/* ソーシャル：2アイコン横並び、gap 21px */
.site-footer__social {
  display: grid;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 21px;
  padding-block: 16px;
  list-style: none;
}

.site-footer__social a {
  display: grid;
  place-items: center;
}

.site-footer__social img {
  height: 26px;
  width: auto;
}

/* =============================================================
   フッターボトムバー（ロゴ + 法務リンク + 認証マーク + copyright）
   ============================================================= */
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: clamp(24px, 3vw, 40px);
  background: #ffffff;
}

.site-footer__bottom-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 40px;
  text-align: left;
  width: 100%;
  max-width: 1200px;
  padding-inline: 20px;
}

.site-footer__bottom-logo img {
  width: clamp(120px, 12vw, 175px);
  height: auto;
}

.site-footer__bottom-links {
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  gap: 40px;
  list-style: none;
}

.site-footer__bottom-links a {
  font-size: 14px;
}

.site-footer__cert img {
  width: clamp(48px, 5vw, 60px);
  height: auto;
}

.site-footer__copyright {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #000;
}

.site-footer__heading--static.--mss {
  margin-top: 20px;
}

/* =============================================================
   1239px 以下：アコーディオン挙動 + 1カラム化
   - 見出しをタップで開閉、パネルは初期状態 collapsed
   - ボトムバーは縦積み中央寄せ
   ============================================================= */
@media (max-width: 900px) {
  .site-footer__inner {
    padding-block: 30px;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* 見出しをアコーディオン操作ボタンに戻す */
  .site-footer__heading {
    padding: 16px 0;
    margin: 0;
    font-size: 13px;
    cursor: pointer;
    pointer-events: auto;
  }

  /* +/- アイコン：SVGフィルタだと円塗りに馴染むため CSS 文字で表現 */
  .site-footer__heading::after {
    content: "＋";
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: #ffffff;
  }

  .site-footer__heading[aria-expanded="true"]::after {
    content: "−"; /* U+2212 MINUS SIGN */
  }

  /* 静的見出し（サービスパネル内のメインサービス / 関連サービス / インフラサービス）：
     表示するが、アコーディオン用 +/- は出さない、罫線も非表示 */
  .site-footer__heading--static {
    display: block;
    cursor: default;
    pointer-events: none;
    border-bottom: none;
    margin-top: 20px;
  }
  .site-footer__heading--static::after {
    display: none;
  }

  /* SP専用：サービスパネル内に入れ子表示 */
  .site-footer__nested-sp {
    display: block;
  }

  /* PC専用 Column 2 は SP で非表示 */
  .site-footer__col--pc-only {
    display: none;
  }

  /* PC専用：その他セクションのボタン+パネル を SP で非表示 */
  .site-footer__heading--pc-only,
  .site-footer__panel--pc-only {
    display: none;
  }

  /* SP専用：資料ダウンロードを コンテンツ に、他社+パートナーを サポート に表示 */
  .site-footer__li--sp {
    display: list-item;
  }

  /* PC専用：サポート内の資料ダウンロードは SP で非表示（コンテンツ側に重複している） */
  .site-footer__li--pc {
    display: none;
  }

  /* メインサービスリスト（#footer-services 直下の ul）のみ：
     太字 + 13px + bullet なし。
     入れ子の関連/インフラリストは対象外（直下セレクタで限定） */
  #footer-services > .site-footer__list a {
    font-weight: 700;
    font-size: 13px;
  }
  #footer-services > .site-footer__list li::before {
    content: none;
  }

  #footer-about {
    margin-bottom: 0;
  }

  /* パネルは折りたたみ */
  .site-footer__panel {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }

  .site-footer__panel[hidden] {
    display: none;
  }

  .site-footer__list {
    padding: 0;
  }

  .site-footer__btn {
    font-size: 14px;
    padding: 15px 10px 15px 0;
  }

  .site-footer__btn::after {
    right: 10px;
  }
  .site-footer__panel .site-footer__heading {
    padding-bottom: 0;
  }

  .site-footer__btn--login {
    margin-bottom: 0;
    order: 2;
  }

  .site-footer__cta-area {
    padding-block: 0;
    padding: 20px 0px 0;
  }

  /* ボトムバー：1カラム中央寄せ */
  .site-footer__bottom-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: stretch;
    text-align: left;
  }

  /* ロゴは左寄せ */
  .site-footer__bottom-logo {
    justify-self: start;
  }

  /* リンクは 1行に並べ、入らなければ次行に折り返す（flex-wrap）
     固定 2列ではなくテキスト幅で自動配置するため flex を採用 */
  .site-footer__bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    font-size: 12px;
  }

  .site-footer__cert {
    margin: 0 auto;
  }

  .site-footer__copyright {
    margin-top: 0;
    text-align: center;
    font-size: 11px;
  }

  /* CTA エリア内：ログイン+お申込みボタンを 2 カラム */
  .site-footer__cta-buttons {
    display: grid;
    margin-bottom: 30px;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* メール/電話サポートブロックは SP で非表示 */
  .site-footer__cta-area .site-footer__support-block {
    display: none;
  }

  /* SNSアイコンは中央寄せ */
  .site-footer__social {
    justify-content: center;
  }
}
