/*
 * サービス LP（/kenzo/ /stress/ /houjin/）共通 UI
 * ハンバーガーメニュー・スマホの追従お問い合わせボタン（inc/lp-ui.php で出力）
 * 色は LP ごとに --lp-accent / --lp-accent-text / --lp-strong で指定する。
 */

/* ページ内リンクで移動したとき、見出しが画面上端に詰まりすぎないようにする */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
section[id] {
  scroll-margin-top: 80px;
}
body.lp-menu-open {
  overflow: hidden;
}

/* ---------- ハンバーガーボタン（右上に固定） ---------- */
.lp-menu-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.lp-menu-btn:focus-visible {
  outline: 3px solid var(--lp-strong);
  outline-offset: 2px;
}
.lp-menu-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--lp-strong);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.lp-menu-btn[aria-expanded="true"] .lp-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.lp-menu-btn[aria-expanded="true"] .lp-menu-bar:nth-child(2) {
  opacity: 0;
}
.lp-menu-btn[aria-expanded="true"] .lp-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- メニュー本体（右から開く） ---------- */
.lp-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lp-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.lp-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: min(340px, 86vw);
  height: 100%;
  overflow-y: auto;
  padding: 88px 24px 32px;
  box-sizing: border-box;
  background: #FFFFFF;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  text-align: left;
}
.lp-menu.is-open {
  transform: translateX(0);
}
.lp-menu-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #595959;
}
.lp-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-menu-list li {
  margin: 0;
  padding: 0;
}
.lp-menu-list a {
  position: relative;
  display: block;
  padding: 14px 24px 14px 4px;
  border-bottom: 1px solid #EBEBEB;
  color: #333333;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}
.lp-menu-list a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--lp-strong);
  border-right: 2px solid var(--lp-strong);
  transform: translateY(-50%) rotate(45deg);
}
.lp-menu-list a:hover,
.lp-menu-list a:focus-visible {
  background: #F7F7F7;
}
.lp-menu-cta {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.lp-menu-corporate {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 0;
  font-size: 14px;
  color: #333333;
  text-decoration: underline;
}

/* ---------- お問い合わせボタン（メニュー内・追従バー共通） ---------- */
.lp-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  box-sizing: border-box;
  border: 2px solid var(--lp-accent);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.lp-cta-btn:hover {
  opacity: 0.85;
}
.lp-cta-btn--primary {
  background: var(--lp-accent);
  color: var(--lp-accent-text);
}
.lp-cta-btn--outline {
  background: #FFFFFF;
  color: var(--lp-strong);
  border-color: var(--lp-strong);
}

/* ---------- スマホ：画面下に追従するお問い合わせボタン ---------- */
.lp-sticky-cta {
  display: none;
}
@media (max-width: 768px) {
  .lp-menu-btn {
    top: 10px;
    right: 10px;
    width: 46px;
    height: 46px;
  }
  .lp-sticky-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 998;
    display: flex;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, visibility 0.3s ease;
  }
  .lp-sticky-cta.is-hidden {
    transform: translateY(110%);
    visibility: hidden;
  }
  .lp-sticky-cta .lp-cta-btn {
    flex: 1 1 0;
    padding: 8px 10px;
    font-size: 14px;
  }
  /* 追従バーの分だけ、ページ最下部とページトップボタンを上げる */
  body.has-lp-ui {
    padding-bottom: 72px;
  }
  body.has-lp-ui .pagetop {
    bottom: 84px;
  }
}
