/* =========================================================
   header-footer.css — ヘッダー/フッター共通 + サブナビ/パンくず/フロート
   ブレイクポイント統一：SP は 879px 以下
   拡縮ポリシー：全体縮小は layout.css の --ui-scale を参照（局所縮小はしない）
========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap");

/* 変数（拡縮/位置）— ※ --content-max は layout.css で定義済みを使用 */
:root {
  --fsns-right: 16px;
  --topbtn-top: 91%;

  /* 全体縮小に追随（layout.css の --ui-scale を参照） */
  --fsns-scale: var(--ui-scale, 1);
  --topbtn-scale: var(--ui-scale, 1);
}

/* =======================
   旧・汎用ヘッダー/フッター
======================= */
.header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
}
.header__nav-list {
  display: flex;
  gap: 20px;
}
.header__nav-item a {
  color: #333;
  font-weight: 500;
}
.header__actions {
  display: flex;
  gap: 10px;
}

.footer {
  background: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}
.footer__copy {
  font-size: 0.875rem;
}

@media (max-width: 879px) {
  .header .container {
    flex-direction: row;
    align-items: center;
  }
  .footer {
    padding: 15px 10px;
  }
  .footer__copy {
    font-size: 0.75rem;
  }
}

/* =======================
   サブナビ（PCのみ）
======================= */
:root {
  --button-height: clamp(60px, 6vw, 90px);
}
.subnav {
  padding: 0;
  background: #0072ba;
}
.subnav__wrapper {
  height: calc(var(--button-height) + 40px);
  overflow: hidden;
  grid-column: 2;
}
.subnav__inner {
  max-width: 1310px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
}
.subnav__item {
  flex: 1;
  max-width: 320px;
  min-width: 150px;
  height: var(--button-height);
  background: #fff;
  color: #0072ba !important;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(16px, 2vw, 28px);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: height 0.3s ease, padding 0.3s ease !important;
}
.subnav__item:hover {
  height: calc(var(--button-height) + 20px);
  padding-top: 10px;
}
.subnav__text {
  display: block;
  line-height: 1.2;
  transition: transform 0.3s ease;
}

/* サブナビ内リンクはグローバル a:hover 無効化（PCのみ） */
@media (min-width: 880px) and (hover: hover) and (pointer: fine) {
  .subnav .subnav__item,
  .subnav .subnav__item:link,
  .subnav .subnav__item:visited {
    text-decoration: none !important;
    color: #0072ba !important;
    opacity: 1 !important;
    filter: none !important;
  }
  .subnav .subnav__item:hover,
  .subnav .subnav__item:focus,
  .subnav .subnav__item:active {
    text-decoration: none !important;
    color: #0072ba !important;
    opacity: 1 !important;
    filter: none !important;
  }
  .subnav .subnav__item:hover .subnav__text,
  .subnav .subnav__item:focus .subnav__text,
  .subnav .subnav__item:active .subnav__text {
    text-decoration: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
@media (max-width: 879px) {
  .subnav {
    display: none;
  }
}

/* =======================
   パンくず
======================= */
.breadcrumbs {
  background: #f4f4f4;
}
.breadcrumbs__inner {
  height: 40px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable both-edges;
}
.breadcrumbs__inner::-webkit-scrollbar {
  height: 8px;
}
.breadcrumbs__inner::-webkit-scrollbar-track {
  background: transparent;
}
.breadcrumbs__inner::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  word-break: keep-all;
  font-size: 14px;
  color: #333;
  line-height: 1;
}
.breadcrumbs__item {
  display: flex;
  align-items: center;
}
.breadcrumbs__item + .breadcrumbs__item {
  margin-left: 0;
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  margin-right: 10px;
  color: #999;
  line-height: 1;
}
.breadcrumbs__link,
.breadcrumbs__current {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.breadcrumbs__link {
  text-decoration: none;
  color: #0072ba;
}
.breadcrumbs__link:hover {
  text-decoration: underline;
}
.breadcrumbs__current {
  color: #111;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  display: inline-flex;
}
.breadcrumbs__home-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
@media (max-width: 879px) {
  .breadcrumbs__inner {
    height: 24px;
    padding: 16px;
  }
  .breadcrumbs__list {
    font-size: 10px;
    gap: 6px;
  }
  .breadcrumbs__home-icon {
    width: 10px;
    height: 10px;
  }
  .breadcrumbs__item + .breadcrumbs__item::before {
    margin-right: 6px;
  }
}
@media (min-width: 880px) {
  .breadcrumbs__inner {
    box-sizing: border-box;
    max-width: 1480px;
    width: 100%;
    padding: 6px;
    margin-left: auto;
    margin-right: auto;
  }
  .breadcrumbs__home-icon {
    width: 20px;
    height: 20px;
  }
}

/* =======================
   site-footer
======================= */
.site-footer {
  background: #0072ba;
  color: #fff;
  padding-top: 40px;
  padding-bottom: 60px;
  font-size: 16px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: var(--content-max);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
}
@media (min-width: 880px) {
  .site-footer__inner {
    flex-wrap: nowrap !important;
  }
}
.site-footer__branding {
  flex: 1 1 200px;
  max-width: 200px;
}
.site-footer__logo-wrapper img {
  width: 200px;
  height: 44px;
}
.site-footer__copyright {
  margin: 8px 0 20px;
  font-size: 16px;
  color: #cce5f7;
}
.site-footer__sns-label {
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
  font-size: 18px;
}
.site-footer__sns {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-footer__sns .sns-item {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}
.site-footer__sns .sns-item a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.site-footer__sns .sns-item a span {
  margin-left: 20px;
  font-size: 16px;
  position: relative;
  top: -1px;
}
.site-footer__sns .sns-item img.sns-icon--pc {
  display: none;
}
.site-footer__sns .sns-item img.sns-icon--sp {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}
.site-footer__nav {
  flex: 0 1 640px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 12px;
}
.footer-col {
  list-style: none;
  padding: 0 28px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 140px;
  border-left: 1px solid #fff;
  box-sizing: border-box;
}
.footer-col li a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
  font-size: 16px;
}
.footer-col li a:hover {
  text-decoration: none;
}

@media (max-width: 879px) {
  .site-footer {
    height: 54px;
    padding: 0;
    display: flex;
    align-items: center;
  }
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }
  .site-footer__branding {
    flex: 1 1 auto;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .site-footer__logo-wrapper {
    display: none;
  }
  .site-footer__copyright {
    margin: 0;
    font-size: 12px;
    color: #cce5f7;
  }
  .site-footer__sns-label {
    display: none;
  }
  .site-footer__sns {
    flex-direction: row;
    gap: 8px;
    margin-left: auto;
  }
  .site-footer__nav {
    display: none;
  }
  .site-footer__sns .sns-item a span {
    display: none;
  }
}

/* PC時のSNSアイコン切替 */
@media (min-width: 880px) {
  .site-footer__sns .sns-item img.sns-icon--pc {
    display: inline-block !important;
    max-width: 20px !important;
    max-height: 20px !important;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
    box-sizing: content-box !important;
  }
  .site-footer__sns .sns-item img.sns-icon--sp {
    display: none !important;
  }
}

/* =======================
   PC：TOPボタン（フロート）
======================= */
.float-button {
  position: fixed;
  right: 16px;
  left: auto;
  bottom: 20px;
  width: clamp(32px, calc(68px * var(--topbtn-scale, 1)), 68px);
  height: clamp(32px, calc(68px * var(--topbtn-scale, 1)), 68px);
  background: #0072ba;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1px, calc(2px * var(--topbtn-scale, 1)), 2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
  z-index: 1999;
}
@media (min-width: 880px) {
  .float-button {
    top: var(--topbtn-top);
    bottom: auto;
  }
}
@media (min-width: 880px) {
  .float-button {
    left: auto !important;
    right: calc(var(--fsns-right, 16px) + (60px * var(--fsns-scale, 1) - 68px * var(--topbtn-scale, 1)) / 2) !important;
  }
}
.float-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.float-button__icon {
  width: clamp(14px, calc(24px * var(--topbtn-scale, 1)), 24px);
  height: clamp(14px, calc(24px * var(--topbtn-scale, 1)), 24px);
  display: block;
  margin: 0 auto 8px;
}
.float-button__text {
  color: #fff;
  font-size: clamp(9px, calc(11px * var(--topbtn-scale, 1)), 11px);
  font-weight: 700;
  line-height: 1;
}
@media (min-width: 880px) and (hover: hover) and (pointer: fine) {
  .float-button:hover {
    opacity: 0.6;
  }
}
.float-button:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* =======================
   SP：フロート抑止 → フッター内固定版
======================= */
@media (max-width: 879px) {
  .float-button {
    display: none !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  .site-footer__branding #scrollToTop {
    width: 32px;
    height: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    border: none;
    padding: 0;
    margin-left: 30px;
    z-index: 1;
    position: relative;
  }
  .site-footer__branding #scrollToTop .float-button__icon {
    width: 12px !important;
    height: 12px !important;
    margin: 0;
  }
  .site-footer__branding #scrollToTop .float-button__text {
    color: #0072ba;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
  }
  body.menu-open .site-footer__branding #scrollToTop {
    opacity: 0;
    pointer-events: none;
  }
}

/* =======================
   フローティングSNS（PCのみ表示／拡縮）
======================= */
.float-sns {
  position: fixed !important;
  top: 20% !important;
  right: calc(var(--fsns-right, 16px) * 1) !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: calc(20px * var(--fsns-scale, 1)) !important;
  z-index: 998 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}
.float-sns__item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: calc(60px * var(--fsns-scale, 1)) !important;
  height: calc(60px * var(--fsns-scale, 1)) !important;
  background: #fff !important;
  border-radius: calc(8px * var(--fsns-scale, 1)) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  flex: 0 0 auto !important;
  box-sizing: content-box !important;
}
.float-sns__item img {
  display: block !important;
  width: calc(34px * var(--fsns-scale, 1)) !important;
  height: calc(34px * var(--fsns-scale, 1)) !important;
  object-fit: contain !important;
  max-width: none !important;
  max-height: none !important;
}
@media (min-width: 880px) and (hover: hover) and (pointer: fine) {
  .float-sns__item {
    transition: opacity 0.3s ease;
  }
  .float-sns__item:hover {
    opacity: 0.6;
  }
}
@media (max-width: 879px) {
  html body .float-sns {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* =======================
   細部調整
======================= */
@media (min-width: 880px) {
  .site-footer__inner.container {
    max-width: var(--content-max) !important;
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}
.site-footer__sns .sns-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  line-height: 1.4;
}
.site-footer__sns .sns-item img {
  background: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: content-box;
  padding: 0;
}
