/* ============================================================
   共通ヘッダー／ナビゲーション（sub-header + navbar）
   全ページ共通。変更はこのファイルのみで反映されます。
   ============================================================ */
.sub-header { position: fixed; top: 0; left: 0; right: 0; height: 72px; background: rgb(1,50,118); display: flex; align-items: center; justify-content: space-between; padding-inline: max(24px, calc((100% - 1640px) / 2)); z-index: 1001; gap: 24px; }
.sub-header__brand { display: flex; align-items: center; gap: 18px; flex-shrink: 0; min-width: 0; }
.sub-header__logo-link { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.sub-header__logo { height: 32px; object-fit: contain; display: block; filter: brightness(0) invert(1); }
.sub-header__tagline { font-size: 14px; color: #fff; line-height: 1.4; white-space: nowrap; opacity: 0.95; padding-left: 18px; border-left: 1px solid rgba(219,234,254,0.4); }
.sub-header__actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sub-header__btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 500; font-family: 'Noto Sans JP', sans-serif; text-decoration: none; white-space: nowrap; transition: opacity 0.15s, background 0.15s; flex-shrink: 0; }
.sub-header__btn--outline { background: transparent; border: 1px solid rgba(255,255,255,0.7); color: #fff; }
.sub-header__btn--outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.sub-header__btn--fill { background: #fff; color: rgb(1,50,118); border: none; }
.sub-header__btn--fill:hover { background: rgba(255,255,255,0.88); }
.sub-header__btn svg { flex-shrink: 0; }
.sub-header__links { display: flex; align-items: center; gap: 0; margin-right: 8px; }
.sub-header__link { font-size: 13px; color: #fff; text-decoration: none; padding: 0 14px; white-space: nowrap; cursor: pointer; }
.sub-header__link:hover { opacity: 0.85; }
.sub-header__links > .dropdown:first-child .sub-header__link { padding-left: 0; }
.sub-header__sep { width: 1px; height: 18px; background: rgb(219,234,254); opacity: 0.5; }

.dropdown { position: relative; }
.navbar__nav--desktop .dropdown { display: flex; align-items: center; }
.dropdown:hover .dropdown__menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown__menu { position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(1,50,118,0.13); min-width: 200px; padding: 8px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; z-index: 1002; }
.dropdown__menu a { display: block; padding: 9px 18px; font-size: 13px; color: rgb(30,50,90); text-decoration: none; white-space: nowrap; transition: background .12s; }
.dropdown__menu a:hover { background: rgb(235,243,255); color: rgb(1,56,132); }
.navbar__nav--desktop .dropdown__menu a { padding: 9px 18px; }
.sub-header .dropdown { display: flex; align-items: center; }
.sub-header .dropdown__menu { right: 0; left: auto; }
.sub-header .dropdown .sub-header__link { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.sub-header .dropdown .sub-header__link::after { content: "▾"; font-size: 10px; opacity: 0.8; }
.navbar__nav .dropdown > a::after, .navbar__nav--desktop .dropdown > a::after { content: " ▾"; font-size: 10px; opacity: 0.7; }
.dropdown__menu .sub-dropdown { position: relative; }
.dropdown__menu .sub-dropdown > a { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sub-dropdown__menu { position: absolute; top: 0; left: 100%; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(1,50,118,0.13); min-width: 220px; padding: 8px; opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity 0.15s, transform 0.15s; z-index: 1003; }
.sub-dropdown:hover .sub-dropdown__menu { opacity: 1; pointer-events: auto; transform: translateX(0); }
.sub-dropdown__menu a { display: block; padding: 9px 18px; font-size: 13px; color: rgb(30,50,90); text-decoration: none; white-space: nowrap; transition: background .12s; }
.sub-dropdown__menu a:hover { background: rgb(235,243,255); color: rgb(1,56,132); }
.dropdown__menu__sep { height: 1px; background: #eef3f8; margin: 6px 0; }

.navbar { position: fixed; top: 72px; left: 0; right: 0; height: 60px; display: flex; align-items: center; padding-inline: max(24px, calc((100% - 1640px) / 2)); z-index: 1000; background: rgba(255,255,255,0.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(1,50,118,0.08); }
.navbar__mobile-logo-link { display: none; align-items: center; flex-shrink: 0; margin-right: 16px; text-decoration: none; }
.navbar__mobile-logo { height: 26px; object-fit: contain; }
.navbar__nav { display: none; }
.navbar__nav--desktop { display: flex; align-items: center; flex: 0 1 auto; justify-content: center; column-gap: clamp(20px, 2.4vw, 44px); max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.navbar__nav--desktop > a, .navbar__nav--desktop > .dropdown { flex: 0 0 auto; }
.navbar__nav--desktop a { font-size: 15px; font-weight: 500; color: rgb(1,50,118); text-decoration: none; white-space: nowrap; cursor: pointer; letter-spacing: 0.02em; padding: 4px 2px; }
.navbar__nav--desktop a:hover { opacity: 0.75; }
.navbar__nav-cta { display: none; }
.navbar__hamburger { display: none; width: 44px; height: 44px; background: transparent; border: none; cursor: pointer; padding: 0; margin-left: auto; flex-direction: column; justify-content: center; align-items: center; gap: 6px; flex-shrink: 0; }
.navbar__hamburger span { display: block; width: 24px; height: 2px; background: rgb(1,50,118); transition: transform 0.25s ease, opacity 0.25s ease; border-radius: 2px; }
.navbar__hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar__hamburger.is-open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(1,50,118,0.45); z-index: 9998; opacity: 0; transition: opacity 0.25s ease; }
.mobile-menu-overlay.is-open { display: block; opacity: 1; }

/* ── ヘッダー自動2行化 ── */
.navbar.is-stacked { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 12px; }
.navbar.is-stacked .navbar__nav--desktop { flex-basis: 100%; width: 100%; justify-content: center; margin-top: 6px; }
.sub-header.is-compact .sub-header__tagline { display: none; }

@media (max-width: 960px) {
  .sub-header { display: none; }
  .sub-header__links { display: none; }
  .navbar { top: 0; height: 64px; padding: 0 16px; }
  .navbar__mobile-logo-link { display: flex; }
  .navbar__mobile-logo { height: 26px; }
  .navbar__nav--desktop { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__nav { display: flex; position: fixed; top: 0; right: -340px; bottom: 0; width: 320px; max-width: 85vw; background: #fff; flex-direction: column; align-items: stretch; gap: 0; margin-right: 0; padding: 56px 0 32px; box-shadow: -8px 0 32px rgba(1,50,118,0.18); overflow-y: auto; transition: right 0.3s ease; z-index: 9999; }
  .navbar__nav-close { display: flex; align-items: center; justify-content: center; position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; background: transparent; border: 1px solid rgb(219,234,254); border-radius: 50%; cursor: pointer; color: rgb(1,50,118); transition: background 0.15s, color 0.15s; flex-shrink: 0; }
  .navbar__nav-close:hover { background: rgb(1,50,118); color: #fff; }
  .navbar__nav.is-open { right: 0; }
  .navbar__nav > a, .navbar__nav .dropdown > a { display: block; padding: 18px 24px; font-size: 15px; font-weight: 500; color: rgb(1,50,118); text-decoration: none; border-bottom: 1px solid rgb(235,243,255); }
  .navbar__nav > a:hover, .navbar__nav .dropdown > a:hover { opacity: 0.75; }
  .navbar__nav .dropdown { position: static; }
  .navbar__nav .dropdown__menu { position: static; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; border: none; border-radius: 0; background: rgb(248,251,255); padding: 4px 0; display: none; min-width: 0; }
  .navbar__nav .dropdown.is-open > .dropdown__menu { display: block; }
  .navbar__nav .dropdown > a::after { content: "+"; float: right; font-size: 18px; font-weight: 400; opacity: 0.6; }
  .navbar__nav .dropdown.is-open > a::after { content: "−"; }
  .navbar__nav .dropdown__menu a { padding: 14px 36px; font-size: 13px; color: rgb(1,50,118); text-decoration: none; }
  .navbar__nav .sub-dropdown__menu { position: static; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; border: none; background: transparent; padding: 0; }
  .navbar__nav .sub-dropdown > a { padding: 14px 36px; color: rgb(1,50,118); text-decoration: none; }
  .navbar__nav .sub-dropdown__menu a { padding-left: 52px; font-size: 12px; color: rgb(1,50,118); text-decoration: none; }
  .navbar__nav .dropdown__menu .sub-dropdown > a::after { content: ""; }
  .navbar__nav .sub-dropdown__menu { display: none; }
  .navbar__nav .sub-dropdown.is-open > .sub-dropdown__menu { display: block; }
  .navbar__nav .sub-dropdown > a::after { content: "+"; float: right; font-size: 16px; font-weight: 400; opacity: 0.5; }
  .navbar__nav .sub-dropdown.is-open > a::after { content: "−"; }
  .navbar__nav-cta { display: flex; flex-direction: column; gap: 12px; padding: 24px; margin-top: auto; }
  .navbar__nav-cta a { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; }
  .navbar__nav-cta .navbar__nav-cta--outline { border: 1px solid rgb(1,50,118); color: rgb(1,50,118); background: #fff; }
  .navbar__nav-cta .navbar__nav-cta--fill { background: rgb(1,56,132); color: #fff; }
}

/* ============================================================
   共通フッター
   ============================================================ */
footer { background: rgb(1,30,80); color: rgba(255,255,255,0.75); padding: 44px 0 24px; padding-inline: max(24px, calc((100% - 1240px) / 2)); }
.footer-inner { display: grid; grid-template-columns: 240px 1fr 1fr 1fr; gap: 40px; max-width: 1640px; margin: 0 auto 32px; }
.footer-brand img { height: 32px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.8; }
.footer-brand p { font-size: 12px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 12px; text-decoration: none; transition: color 0.15s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; text-align: center; font-size: 11px; color: rgba(255,255,255,0.4); max-width: 1240px; margin: 0 auto; }
@media (max-width: 960px) {
  footer { padding: 48px 20px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
