/* AIKATA 共通ヘッダー（全ページ。2026-10-22 作り直し）
   参考：n-works.link のヘッダー。白い丸い板が画面の上に浮かび、スクロールすると横いっぱいの帯になる
   - 中の class 名（site-header・navigation108・menu-button・nav-services211 など）は JS が使うので変えない
   - 見た目はこのファイルで決める。theme.css の後に読み込む（AikataPageView）
   - 高さはスクロールしても変えない（下の中身が動かないように）。帯になるときは transform で上へ寄せる */

html body.aikata header.site-header {
  --hd-ink: #1b1e2b;
  --hd-blue: #0f64ae;
  --hd-cta: #d9480f;
  --hd-cta-hover: #b83c0c;
  --hd-ease: cubic-bezier(.43, .05, .17, 1);
  --hd-h: 72px;
  --hd-gap: 14px;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  height: calc(var(--hd-h) + var(--hd-gap) * 2) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: var(--hd-gap) clamp(12px, 2.5vw, 40px) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform .4s var(--hd-ease), opacity .4s var(--hd-ease) !important;
}
/* 白い板（ヘッダーの後ろに敷く。中身の並びに影響しないよう ::before で描く） */
html body.aikata header.site-header::before {
  content: '' !important;
  position: absolute !important;
  inset: var(--hd-gap) clamp(12px, 2.5vw, 40px) !important;
  z-index: -1 !important;
  display: block !important;
  border-radius: 100px !important;
  background: #fff !important;
  box-shadow: 0 3px 14px rgba(27, 30, 43, .1), 0 0 0 1px rgba(27, 30, 43, .04) !important;
  transition: inset .4s var(--hd-ease), border-radius .4s var(--hd-ease), box-shadow .4s var(--hd-ease) !important;
}
/* スクロールしたら：横いっぱいの帯 */
html body.aikata header.site-header.is-scrolled160 { background: transparent !important; }
html body.aikata header.site-header.is-scrolled160::before {
  inset: 0 0 calc(var(--hd-gap) * 2) 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 2px 10px rgba(27, 30, 43, .08) !important;
}
html body.aikata header.site-header.is-scrolled160 > * { transform: translateY(calc(var(--hd-gap) * -1)); }
html body.aikata header.site-header > * { transition: transform .4s var(--hd-ease); }

/* ロゴ */
html body.aikata header.site-header .brand {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  margin: 0 0 0 clamp(16px, 2vw, 32px) !important;
  padding: 0 !important;
  text-decoration: none !important;
}
html body.aikata header.site-header .aikata-brand-heading {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: 1 !important;
}
html body.aikata header.site-header .aikata-logo {
  flex: 0 0 auto !important;
  width: 120px !important;
  height: 35px !important;
  background-position: -1167px -21px !important;
  background-size: 1333px 750px !important;
}
html body.aikata header.site-header .aikata-brand-caption {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 0 0 14px !important;
  border-left: 1px solid #d5dae3 !important;
  font: 700 11px/1.45 'Noto Sans JP', sans-serif !important;
  letter-spacing: .04em !important;
  color: #55607a !important;
  white-space: nowrap !important;
}
html body.aikata header.site-header .caption-part { display: block !important; }

/* メニュー（PC） */
@media (min-width: 1101px) {
  html body.aikata header.site-header .navigation108 {
    display: flex !important;
    align-items: center !important;
    gap: clamp(14px, 1.6vw, 28px) !important;
    margin: 0 0 0 auto !important;
    padding: 0 8px 0 0 !important;
    background: transparent !important;
  }
  html body.aikata header.site-header .navigation108 > a:not(.nav-contact108),
  html body.aikata header.site-header .nav-services211 > a {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: var(--hd-h) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    font: 700 15px/1 'Noto Sans JP', sans-serif !important;
    letter-spacing: .04em !important;
    color: var(--hd-ink) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: color .4s var(--hd-ease) !important;
  }
  /* 下線：ふだんは幅0、乗せたとき・今いるページで伸びる */
  html body.aikata header.site-header .navigation108 > a:not(.nav-contact108)::after,
  html body.aikata header.site-header .nav-services211 > a::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 18px !important;
    height: 3px !important;
    border-radius: 3px !important;
    background: var(--hd-blue) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform .4s var(--hd-ease) !important;
  }
  html body.aikata header.site-header .navigation108 > a:not(.nav-contact108):hover,
  html body.aikata header.site-header .nav-services211 > a:hover,
  html body.aikata header.site-header .navigation108 a[aria-current="page"] { color: var(--hd-blue) !important; }
  html body.aikata header.site-header .navigation108 > a:not(.nav-contact108):hover::after,
  html body.aikata header.site-header .nav-services211 > a:hover::after,
  html body.aikata header.site-header .navigation108 > a[aria-current="page"]::after,
  html body.aikata header.site-header .nav-services211 > a[aria-current="page"]::after { transform: scaleX(1) !important; }

  html body.aikata header.site-header .nav-services211 { display: flex !important; align-items: center !important; gap: 2px !important; }
  html body.aikata header.site-header .nav-toggle211 {
    display: grid !important;
    place-items: center !important;
    width: 26px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--hd-ink) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background-color .4s var(--hd-ease), transform .4s var(--hd-ease) !important;
  }
  html body.aikata header.site-header .nav-toggle211:hover { background: #eef5fc !important; }
  html body.aikata header.site-header .nav-toggle211[aria-expanded="true"] { transform: rotate(180deg) !important; }

  /* 申し込みボタン（朱色の丸ボタン。右に白い丸の矢印） */
  html body.aikata header.site-header .nav-contact108 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    height: 52px !important;
    min-height: 0 !important;
    margin: 0 0 0 clamp(4px, .8vw, 12px) !important;
    padding: 0 8px 0 24px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--hd-cta) !important;
    box-shadow: none !important;
    color: #fff !important;
    font: 700 16px/1 'Noto Sans JP', sans-serif !important;
    letter-spacing: .04em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background-color .4s var(--hd-ease) !important;
  }
  html body.aikata header.site-header .nav-contact108:hover { background: var(--hd-cta-hover) !important; }
  html body.aikata header.site-header .nav-contact108 .cta-icon130 {
    display: grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--hd-cta) !important;
    transition: transform .4s var(--hd-ease) !important;
  }
  html body.aikata header.site-header .nav-contact108:hover .cta-icon130 { transform: translateX(3px) !important; }
  html body.aikata header.site-header .nav-contact108 .cta-icon130 svg { width: 18px !important; height: 18px !important; }

  /* 支援内容のメガメニュー：白い板の下にすき間をあけて出す */
  html body.aikata header.site-header .mega220 { top: calc(100% - var(--hd-gap) + 8px) !important; border-radius: 24px !important; }
}
/* 幅が足りないときは、ロゴ横の説明を消す */
@media (max-width: 1360px) {
  html body.aikata header.site-header .aikata-brand-caption { display: none !important; }
}

/* スマホ・タブレット：丸い板のまま、右にメニューボタン */
@media (max-width: 1100px) {
  html body.aikata header.site-header { --hd-h: 60px; --hd-gap: 10px; justify-content: space-between !important; }
  html body.aikata header.site-header .brand { margin-left: 18px !important; }
  html body.aikata header.site-header .aikata-logo { width: 96px !important; height: 28px !important; background-size: 1067px 600px !important; background-position: -934px -17px !important; }
  html body.aikata header.site-header .menu-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 44px !important;
    min-height: 0 !important;
    margin: 0 8px 0 auto !important;
    padding: 0 18px 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--hd-ink) !important;
    box-shadow: none !important;
    color: #fff !important;
    font: 700 14px/1 'Noto Sans JP', sans-serif !important;
    letter-spacing: .06em !important;
  }
  html body.aikata header.site-header .menu-button .hamburger130 { display: grid !important; gap: 4px !important; width: 18px !important; }
  html body.aikata header.site-header .menu-button .hamburger130 i { display: block !important; width: 18px !important; height: 2px !important; margin: 0 !important; border-radius: 2px !important; background: #fff !important; }
}

/* ---- 古いCSSから引き取った動き（2026-10-22 の整理で古い側は削除） ---- */
/* 最後の申し込みセクションまで来たらヘッダーを隠す（header160.js が html に hd160-off を付ける） */
html.hd160-off body header.site-header { transform: translateY(-110%) !important; opacity: 0; pointer-events: none; }
/* メニューを開いている間は、右下の相談ボタンを隠す */
html:has(.menu-button[aria-expanded="true"]) body .fb173 { opacity: 0; pointer-events: none; }
/* 支援内容の開閉ボタン：記号の代わりに線の矢印 */
html body.aikata header.site-header .nav-toggle211 > span { display: none !important; }
html body.aikata header.site-header .nav-toggle211::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
/* PC はナビ、スマホ・タブレットはメニューボタン（中身は aikata-ui130.js が作るダイアログ） */
@media (min-width: 1101px) {
  html body.aikata header.site-header .menu-button { display: none !important; }
}
@media (max-width: 1100px) {
  html body.aikata header.site-header .navigation108 { display: none !important; }
}
/* 申し込みボタンの白い丸の中の矢印は朱色 */
html body.aikata header.site-header .nav-contact108 .cta-icon130 :is(svg, path) { color: var(--hd-cta) !important; stroke: currentColor; }
html body.aikata header.site-header .nav-contact108 .cta-label130 { background: none !important; color: #fff !important; font: inherit !important; }
html body.aikata header.site-header .nav-toggle211:focus:not(:focus-visible) { outline: 0 !important; box-shadow: none !important; }
