/* ================================================================
 * Components : Buttons / Header / Footer / Floating CTA
 * ============================================================== */

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 260px;
  padding: 18px 36px;
  background: linear-gradient(90deg, #1fa6c1 0%, #006d83 100%);
  color: #fff;
  font-family: var(--font-jp-heading);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50px;
  border: 0;
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
  cursor: pointer;
  transition: transform .15s var(--ease),
              box-shadow .15s var(--ease),
              filter .15s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
  filter: brightness(1.05);
  opacity: 1;
}
.btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.btn__arrow {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.btn--yellow {
  background: #ffd447;
  color: #222;
  box-shadow: 0 6px 0 #c9a528;
}
.btn--yellow:hover { box-shadow: 0 4px 0 #c9a528; }

.btn--white {
  background: #fff;
  color: #006d83;
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
}

.btn--ghost {
  background: #fff;
  color: #006d83;
  box-shadow: 0 4px 0 #d9d9d9;
}
.btn--ghost:hover { box-shadow: 0 2px 0 #d9d9d9; }

/* ---------------- Header ---------------- */
.site-info-bar {
  background: #1d99b2;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.5;
}
.site-info-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 24px;
  text-align: left;
}
@media (max-width: 768px) {
  .site-info-bar { font-size: 10px; }
  .site-info-bar__inner { padding: 6px 12px; line-height: 1.4; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin-inline: auto;
  padding: 10px 24px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d99b2;
  color: #ffd447;
  height: 48px;
  padding: 0 20px;
  font-family: var(--font-jp-mincho);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.1em;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1;
}

.global-nav { display: flex; align-items: center; gap: 30px; }
.global-nav ul { display: flex; gap: 30px; }
.global-nav a,
.global-nav li a {
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #222;
  position: relative;
  padding: 8px 0;
  display: inline-block;
  white-space: nowrap;
}
.global-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: #1fa6c1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.global-nav a:hover { opacity: 1; }
.global-nav a:hover::after { transform: scaleX(1); }

/* ---- ドロップダウン（アクセス → 施設マップ / 近隣マップ） ---- */
.global-nav__item { position: relative; display: inline-flex; align-items: center; }

/* 親リンク横の▼キャレット（ホバーで反転） */
.global-nav__caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 5px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #1d99b2;
  vertical-align: middle;
  transition: transform .2s var(--ease);
}
.global-nav__item--has-sub:hover .global-nav__caret,
.global-nav__item--has-sub:focus-within .global-nav__caret { transform: rotate(180deg); }

/* サブメニュー本体
   ※ .global-nav ul { gap:30px }（詳細度0,1,1）に勝たせるため .global-nav 付きで詳細度を上げ、
     項目間の継承gapを確実に0にする（間隔は各リンクのpaddingで制御＝Figma準拠） */
.global-nav .global-nav__sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 280px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 60;
}
/* ホバー継続用の透明ブリッジ（リンクとカードの隙間を埋める） */
.global-nav__sub::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -8px;
  height: 8px;
}
.global-nav__item--has-sub:hover .global-nav__sub,
.global-nav__item--has-sub:focus-within .global-nav__sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(2px);
}
.global-nav__sub li { margin: 0; }
/* アイコン＋ラベルの行（参考デザイン準拠：左揃え・アイコン付き）
   .global-nav li a（詳細度 0,1,2）より高い詳細度で display:flex を確実に適用 */
.global-nav .global-nav__sub a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 30px 26px;
  font-size: 15px;
  font-weight: 500;
  color: #222222;
  white-space: nowrap;
  text-align: left;
}
.global-nav__sub-icon {
  flex-shrink: 0;
  color: #1d99b2;
  transition: color .15s var(--ease);
}
.global-nav__sub-label { line-height: 1; }
.global-nav__sub a::after { display: none; } /* ドロップダウン内は下線アニメ無効 */
.global-nav__sub a:hover { background: #ecfcff; color: #1fa6c1; opacity: 1; }
.global-nav__sub a:hover .global-nav__sub-icon { color: #1fa6c1; }
/* 上下paddingを無くしたぶん、端の項目のホバーは箱の角丸に合わせてベタ塗り */
.global-nav__sub li:first-child a:hover { border-radius: 10px 10px 0 0; }
.global-nav__sub li:last-child a:hover  { border-radius: 0 0 10px 10px; }

.header-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d99b2;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}
.header-tel__hours {
  display: block;
  margin-top: 3px;
  color: #1d99b2;
  font-family: var(--font-jp-body);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}
.header-tel__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

/* SP-only helper labels（PCでは非表示） */
.header-tel__sp-label,
.hamburger__label,
.hamburger__bars { display: none; }

/* ---------------- SP（≤767px）── Figma 262:2244 準拠 ---------------- */
@media (max-width: 767px) {
  /* 情報バー：先頭タグラインのみ表示 */
  .site-info-bar__long { display: none; }

  /* サイトヘッダー：Figmaのシャドウ仕様 */
  .site-header { box-shadow: 0 4px 20px rgba(0,0,0,.25); }
  .site-header__inner {
    max-width: none;
    gap: 0;
    padding: 0;
    height: 58px;
  }

  /* PCナビを隠す */
  .global-nav { display: none; }

  /* ロゴセル：flex-1 で残り幅全てを占有（周囲12px余白＋内側#1d99b2塗り） */
  .site-logo {
    flex: 1 1 0;
    min-width: 0;
    height: 70%;
    margin: 0 12px;
    padding: 12px;
    font-family: "BIZ UDMincho", "Yu Mincho", "游明朝", "Hiragino Mincho ProN", serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.1em;
    line-height: 1;
    background: #1d99b2;
    color: #ffd447;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* お電話ボタン：58×58 黄色 */
  .header-tel {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: #ffd447;
    color: #007c91;
    font-size: 0;
  }
  .header-tel__icon { width: 20px; height: 20px; }
  .header-tel__text { display: none; }
  .header-tel__sp-label {
    display: block;
    font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    color: #007c91;
  }

  /* メニューボタン：58×58 濃緑 */
  .hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 58px;
    height: 58px;
    background: #007c91;
    padding: 0;
  }
  .hamburger__bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
  }
  .hamburger__bars span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    transition: transform .15s var(--ease);
  }
  .hamburger__label {
    display: block;
    font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    color: #fff;
  }

  /* ハンバーガー開時：×マーク */
  .hamburger[aria-expanded="true"] .hamburger__bars span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .hamburger[aria-expanded="true"] .hamburger__bars span:nth-child(2) {
    opacity: 0;
  }
  .hamburger[aria-expanded="true"] .hamburger__bars span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }
}

/* ---------------- モバイルドロワー：ヘッダー直下にスライドダウン ---------------- */
.mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #007c91;
  color: #fff;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
  z-index: 150;
}
.mobile-drawer.is-open {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.mobile-drawer a {
  display: block;
  padding: 30px 40px;
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  transition: background .15s var(--ease);
}
.mobile-drawer a:hover { background: rgba(0,0,0,.1); opacity: 1; }
/* サブ項目（施設マップ／近隣マップ）はインデント＋小さめ表示 */
.mobile-drawer__sublink {
  padding-left: 64px !important;
  font-size: 14px !important;
  background: rgba(0,0,0,.08);
}
.mobile-drawer__sublink::before {
  content: "└ ";
  opacity: .7;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: #1d99b2;
  color: #fff;
  padding: 20px 24px;
  text-align: center;
  font-size: 14px;
  font-family: var(--font-jp-body);
}

/* ---------------- Floating CTA (10秒でかんたん見積!!) ---------------- */
.float-cta {
  position: fixed;
  right: 50px;
  bottom: 50px;
  width: 180px;
  height: 180px;
  display: block;
  z-index: 90;
  transition: transform .25s var(--ease);
  text-decoration: none;
  line-height: 0;
}
.float-cta:hover {
  transform: scale(1.05);
  opacity: 1;
}
.float-cta__img {
  width: 100%;
  height: 100%;
  display: block;
}

/* スマホ：フローティングCTAは小さめにして右下固定で表示 */
@media (max-width: 768px) {
  .float-cta {
    width: 100px;
    height: 100px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
