/* ============================================
   みよの杜 共通ヘッダー/フッター
   公式サイト(Next.js)デザイン移植版
   色トークンは globals.css @theme より
   ============================================ */

:root {
  /* 藤色スケール */
  --mnm-fuji-50:  #f5f6fb;
  --mnm-fuji-100: #e8eaf5;
  --mnm-fuji-500: #6068a8;
  --mnm-fuji-600: #515599;
  --mnm-fuji-700: #443d8a;
  --mnm-fuji:     #6068a8;
  --mnm-shikon:   #381078;
  /* 文字 */
  --mnm-ink:      #303030;
  --mnm-ink-mute: #666666;
  /* アクセント */
  --mnm-urgent:       #e2041b;
  --mnm-urgent-hover: #e83929;
  --mnm-gold:         #c9a961;
  /* 罫線 */
  --mnm-rule:      #e0e0e0;
  --mnm-rule-soft: #f0f0f0;
  /* フッター */
  --mnm-footer-bg: #4d4d4d;
  /* フォント */
  --mnm-font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --mnm-font-display: "Oswald", "Helvetica Neue", Arial, sans-serif;
  /* レイアウト */
  --mnm-container: 1180px;
}

/* ============================================
   コンテナ共通
   ============================================ */
.mnm-container {
  max-width: var(--mnm-container);
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   ヘッダー上段（ロゴ + 電話CTA）
   ============================================ */
.mnm-header {
  background: #fff;
  position: relative;
  z-index: 40;
}
.mnm-header__top {
  max-width: var(--mnm-container);
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mnm-header__logo {
  display: block;
  flex-shrink: 0;
}
.mnm-header__logo img {
  height: auto;
  width: auto;
  max-height: 44px;
}

/* 電話CTA(PC) */
.mnm-header__tel {
  display: none;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: opacity .15s;
}
.mnm-header__tel:hover { opacity: .9; }
.mnm-header__tel-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 48px;
  color: var(--mnm-fuji);
  flex-shrink: 0;
}
.mnm-header__tel-num {
  font-family: var(--mnm-font-display);
  font-size: 46px;
  font-weight: 700;
  color: var(--mnm-ink);
  letter-spacing: 0.04em;
  line-height: 1;
}
.mnm-header__tel-badges {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}
.mnm-header__tel-badge {
  background: #fff;
  border: 1px solid var(--mnm-rule);
  padding: 9px 13px;
  font-size: 15px;
  color: var(--mnm-ink);
  text-align: center;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.35;
}

/* モバイル右側ボタン群 */
.mnm-header__mobile {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mnm-header__mobile-tel {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--mnm-urgent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.mnm-hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}
.mnm-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--mnm-ink);
  transition: all .3s;
}
.mnm-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translateY(8px); }
.mnm-hamburger.is-open span:nth-child(2) { opacity: 0; }
.mnm-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translateY(-8px); }

/* ============================================
   PCグローバルナビ(スティッキー)
   ============================================ */
.mnm-gnav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-top: 2px solid var(--mnm-fuji);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
/* パネルの全幅表示基準（item ではなく nav 全体を基準にする） */
.mnm-gnav__inner { position: relative; }
.mnm-gnav__inner {
  max-width: var(--mnm-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mnm-gnav__list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mnm-gnav__item {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 区切り線: セル(item)の左端に縦線を置く（7等分の境界に固定、文字幅に依存しない） */
.mnm-gnav__item:not(:first-child) {
  background-image: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18));
  background-size: 1px 18px;
  background-position: left center;
  background-repeat: no-repeat;
}
.mnm-gnav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 12px;
  font-family: var(--mnm-font-jp);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--mnm-ink);
  text-decoration: none;
  transition: color .2s;
}
.mnm-gnav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--mnm-shikon);
  transition: transform .3s;
  transform-origin: center;
}
.mnm-gnav__item:hover .mnm-gnav__link,
.mnm-gnav__link:hover {
  color: var(--mnm-shikon);
}
.mnm-gnav__item:hover .mnm-gnav__link::after {
  transform: translateX(-50%) scaleX(1);
}
.mnm-gnav__caret {
  width: 12px;
  height: 8px;
  opacity: .65;
  transition: transform .2s;
}
.mnm-gnav__item:hover .mnm-gnav__caret { transform: rotate(180deg); }

.mnm-gnav__urgent {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--mnm-urgent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-left: 16px;
  text-decoration: none;
  transition: background .2s;
}
.mnm-gnav__urgent:hover { background: var(--mnm-urgent-hover); }

/* 全幅ドロップダウン(CSS hover) */
.mnm-gnav__panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-top: 1px solid var(--mnm-rule);
  z-index: 50;
}
.mnm-gnav__item:hover .mnm-gnav__panel { display: block; }
.mnm-gnav__panel-inner {
  max-width: var(--mnm-container);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.mnm-gnav__panel-head {
  width: 180px;
  flex-shrink: 0;
  border-right: 1px solid var(--mnm-rule-soft);
  padding-right: 24px;
}
.mnm-gnav__panel-head span {
  display: inline-block;
  color: var(--mnm-fuji-700);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .08em;
  border-bottom: 3px solid var(--mnm-fuji-700);
  padding-bottom: 8px;
}
.mnm-gnav__panel-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
  padding-top: 4px;
  list-style: none;
  margin: 0;
}
.mnm-gnav__panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--mnm-ink);
  text-decoration: none;
  white-space: nowrap;
}
.mnm-gnav__panel-link:hover { color: var(--mnm-shikon); }
.mnm-gnav__panel-link svg {
  width: 12px;
  height: 17px;
  flex-shrink: 0;
  color: var(--mnm-fuji-500);
}
.mnm-gnav__panel-link:hover svg { color: var(--mnm-shikon); }
.mnm-gnav__panel-link span {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.mnm-gnav__panel-link:hover span { border-bottom-color: var(--mnm-shikon); }

/* ============================================
   モバイルドロワー
   ============================================ */
.mnm-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 30;
}
.mnm-drawer-overlay.is-open { display: block; }
.mnm-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  border-top: 1px solid var(--mnm-rule);
  z-index: 40;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
.mnm-drawer.is-open { display: block; }
.mnm-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mnm-drawer__item { border-bottom: 1px solid var(--mnm-rule-soft); }
.mnm-drawer__toggle,
.mnm-drawer__link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--mnm-ink);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.mnm-drawer__caret { width: 16px; height: 16px; transition: transform .2s; }
.mnm-drawer__toggle.is-open .mnm-drawer__caret { transform: rotate(180deg); }
.mnm-drawer__sub {
  display: none;
  background: var(--mnm-fuji-50);
  border-top: 1px solid var(--mnm-rule-soft);
  list-style: none;
  margin: 0;
  padding: 0;
}
.mnm-drawer__sub.is-open { display: block; }
.mnm-drawer__sub-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  font-size: 14px;
  color: var(--mnm-ink);
  text-decoration: none;
}
.mnm-drawer__sub-link:hover { color: var(--mnm-shikon); }
.mnm-drawer__sub-link .mnm-sub-label { display: block; font-weight: 700; }
.mnm-drawer__sub-link .mnm-sub-desc { display: block; font-size: 11px; color: var(--mnm-ink-mute); }
.mnm-drawer__sub-icon { color: var(--mnm-fuji-600); flex-shrink: 0; }
.mnm-drawer__urgent-wrap { padding: 20px; }
.mnm-drawer__urgent {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  background: var(--mnm-urgent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s;
}
.mnm-drawer__urgent:hover { background: var(--mnm-urgent-hover); }

/* ============================================
   フッター
   ============================================ */
.mnm-footer {
  background: var(--mnm-footer-bg);
  color: rgba(255,255,255,.92);
  padding: 20px 20px 24px;
  font-size: 16px;
  line-height: 1.6;
}
.mnm-footer__inner { max-width: var(--mnm-container); margin: 0 auto; }
.mnm-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: 12px;
}
.mnm-footer__logo img { height: 52px; width: auto; }
.mnm-footer__sns { display: flex; gap: 10px; }
.mnm-footer__sns a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: all .2s;
}
.mnm-footer__sns a:hover { transform: translateY(-2px); }
.mnm-footer__sns a.is-fb:hover { background: #1877F2; }
.mnm-footer__sns a.is-ig:hover { background: #d62976; }
.mnm-footer__sns a.is-line:hover { background: #06C755; }
.mnm-footer__sns svg { width: 18px; height: 18px; }
.mnm-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.mnm-footer__legal { font-size: 12px; line-height: 1.9; }
.mnm-footer__legal a { color: rgba(255,255,255,.9); text-decoration: none; }
.mnm-footer__legal a:hover { color: var(--mnm-gold); text-decoration: underline; }
.mnm-footer__legal .mnm-sep { margin: 0 8px; color: rgba(255,255,255,.35); }
.mnm-footer__copy { font-size: 14px; color: rgba(255,255,255,.6); letter-spacing: .08em; }

/* ============================================
   レスポンシブ: 1024px以上でPC表示
   ============================================ */
@media (min-width: 1024px) {
  .mnm-header__top { padding: 0 24px; }
  .mnm-header__logo img { max-height: 76px; }
  .mnm-header__tel { display: flex; }
  .mnm-header__mobile { display: none; }
  .mnm-gnav { display: block; }
}
@media (max-width: 1023px) {
  .mnm-footer__top { flex-direction: column; gap: 12px; }
  .mnm-footer__bottom { flex-direction: column; text-align: center; }
  .mnm-footer__logo img { height: 42px; }
}

/* 電話アイコンの波アニメ */
@keyframes mnm-header-wave {
  0%, 100% { opacity: 0; }
  30%, 70% { opacity: 1; }
}

/* ============================================
   お知らせバー（最上部・紫紺帯）
   ============================================ */
.mnm-announce {
  background: var(--mnm-shikon);
  color: #fff;
}
.mnm-announce__inner {
  max-width: var(--mnm-container);
  margin: 0 auto;
  padding: 4px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
