/* ==========================================================================
   site-header.css — 全ページ共通グローバルヘッダー (gh-*)
   トップページ (homepage-redesign.css) のトーンに合わせた白×ブルー基調。
   依存なしで単体動作する（style.css を読まないページでも使える）。
   マークアップは各ページに静的に埋め込み、開閉ロジックは menu.js を使う。
   ========================================================================== */

:root {
  --gh-primary: #2563EB;
  --gh-primary-strong: #1D4ED8;
  --gh-primary-soft: #EAF1FE;
  --gh-text: #0F172A;
  --gh-text-soft: #334155;
  --gh-border: rgba(36, 80, 160, 0.10);
  --gh-radius-pill: 999px;
}

/* ---- bar ---- */
.gh {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--gh-border);
}

.gh-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ---- logo ---- */
.gh-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--gh-text);
  flex-shrink: 0;
}

.gh-logo-mark {
  width: 27px;
  height: 27px;
  color: var(--gh-primary);
  display: block;
}

.gh-logo-text {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: var(--gh-text);
  white-space: nowrap;
}

.gh-logo:hover .gh-logo-text { color: var(--gh-primary-strong); }

/* ---- desktop nav ---- */
.gh-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  min-width: 0;
}

.gh-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: var(--gh-radius-pill);
  color: var(--gh-text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.gh-nav-link:hover {
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.gh-nav-link[aria-current="page"] {
  color: var(--gh-primary-strong);
  background: var(--gh-primary-soft);
}

.gh-beta {
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 6px;
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
  transform: translateY(-1px);
}

.gh-nav-link:hover .gh-beta { background: rgba(255, 255, 255, 0.7); }

/* ---- right actions ---- */
.gh-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gh-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--gh-radius-pill);
  background: linear-gradient(135deg, var(--gh-primary), var(--gh-primary-strong));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px -4px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gh-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px -5px rgba(37, 99, 235, 0.55);
  color: #fff;
}

/* ---- language toggle (menu.js の .lang-toggle-* を利用) ---- */
.gh-lang { position: relative; }

.gh-lang .lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-pill);
  color: var(--gh-text-soft);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gh-lang .lang-toggle-btn:hover { background: var(--gh-primary-soft); color: var(--gh-primary-strong); }

.gh-lang .lang-toggle-btn svg { width: 15px; height: 15px; }

.gh-lang .lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 130px;
  background: #fff;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.18);
  padding: 6px;
  z-index: 1200;
}

.gh-lang .lang-dropdown.open { display: block; }

.gh-lang .lang-dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--gh-text-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.gh-lang .lang-dropdown-item:hover { background: var(--gh-primary-soft); color: var(--gh-primary-strong); }
.gh-lang .lang-dropdown-item.active { color: var(--gh-primary-strong); }

/* ---- burger ---- */
.gh-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--gh-text);
  cursor: pointer;
  padding: 0;
}

.gh-burger svg { width: 21px; height: 21px; }
.gh-burger:hover { background: var(--gh-primary-soft); color: var(--gh-primary-strong); }

/* ---- mobile menu panel (menu.js が #mobileMenu を開閉) ---- */
.gh-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1290;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gh-backdrop.open { opacity: 1; }

.gh-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #fff;
  z-index: 1300;
  box-shadow: -12px 0 40px -12px rgba(15, 23, 42, 0.25);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.gh-menu.open { transform: translateX(0); }

.gh-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}

.gh-menu-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--gh-text);
}

.gh-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--gh-primary-soft);
  color: var(--gh-text-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.gh-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 14px 24px;
}

.gh-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  color: var(--gh-text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}

.gh-menu-link svg {
  width: 20px;
  height: 20px;
  color: var(--gh-primary);
  flex-shrink: 0;
}

.gh-menu-link:hover { background: var(--gh-primary-soft); color: var(--gh-primary-strong); }

.gh-menu-link-primary {
  background: linear-gradient(135deg, var(--gh-primary), var(--gh-primary-strong));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px -4px rgba(37, 99, 235, 0.45);
  margin-bottom: 6px;
}

.gh-menu-link-primary svg { color: #fff; }
.gh-menu-link-primary:hover { background: linear-gradient(135deg, var(--gh-primary-strong), var(--gh-primary-strong)); color: #fff; }

.gh-menu-sep {
  height: 1px;
  background: var(--gh-border);
  margin: 8px 14px;
  border: none;
}

/* ---- responsive ---- */
@media (max-width: 1020px) {
  .gh-nav { display: none; }
  .gh-burger { display: flex; }
}

@media (max-width: 560px) {
  .gh-inner { height: 56px; padding: 0 14px; gap: 10px; }
  .gh-cta { padding: 8px 14px; font-size: 0.84rem; }
  .gh-lang { display: none; }
  .gh-logo-text { font-size: 1rem; }
}

/* 旧 .mobile-menu / .main-header 由来のスタイルとの干渉を防ぐリセットは不要
   （新マークアップは gh-* クラスのみを使用し、ID だけ menu.js と共有する） */
