/* =======================================
   Global Header / Navigation
   – Sony-like bold & precise UI
======================================= */

/* ヘッダー本体：濃いネイビーのグラデーション＋影 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #020617 0%, #0b1340 45%, #020617 100%);
  color: #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
}

/* インナー：センター寄せの横並び */
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 1.4rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

/* =========================
   Branding（ロゴ＋サイト名）
   – Luxury & Tech Hybrid Branding
========================= */

/* ロゴ領域は縮まない */
.site-header .site-branding{
  flex: 0 0 auto;
  min-width: 0;
}

/* ナビは伸びる（PCでメニューを置く） */
.site-header .global-nav{
  flex: 1 1 auto;
  min-width: 0;
}

/* ナビのULを横並びに固定（折返しさせない） */
.site-header .global-nav .nav-list{
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}

/* クリック領域 */
.site-branding-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

/* ロゴ wrapper（正方形で揃える） */
.site-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 20%;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 3px 8px rgba(0,0,0,0.28);
  flex-shrink: 0;
}

/* ロゴ（custom-logo） */
.site-logo-wrapper img.custom-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;             /* ← cover → contain に変更 */
  background: transparent;         /* 念のため */
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
}

/* ホバー時の浮遊感 */
.site-branding-link:hover .site-logo-wrapper img.custom-logo {
  transform: translateY(-1px) scale(1.02);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
}

/* サイト名（最高級のタイポグラフィ） */
.site-name-wrapper {
  font-family:
    "Inter Tight",
    "SF Pro Display",
    "Segoe UI",
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;

  font-size: 1.28rem;
  font-weight: 640;
  letter-spacing: 0.01em;

  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #93c5fd 100%);
  -webkit-background-clip: text;
  color: transparent;

  white-space: nowrap;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.site-branding-link:hover .site-name-wrapper {
  transform: translateY(-1px);
  opacity: 1;
}

/* =========================================
   Header layout: Auth button always right
   ========================================= */

/* 4カラム位置を明示（順序が変でも崩れにくい） */
.site-header .nav-toggle{ grid-column: 1; }
.site-header .site-branding{ grid-column: 2; }
.site-header .global-nav{ grid-column: 3; min-width: 0; }
.site-header .header-auth{ grid-column: 4; justify-self: end; }

/* ナビ側のリンク整形が btn を潰すのを防ぐ */
.site-header .header-auth .btn{
  text-decoration: none;
}

/* ヘッダー内で折り返し/はみ出しで消えるのを防ぐ */
.site-header,
.site-header .header-inner{
  overflow: visible !important;
}

/* auth ボタンは絶対に改行しない */
.site-header .header-auth .btn--nav,
.site-header .header-auth a{
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

/* 認証ボタンのLIを右端へ押し出す（これが肝） */
.site-header .global-nav .nav-list > li.menu-item--auth{
  margin-left: auto !important;
  flex: 0 0 auto;
}

/* global-navが消えても auth は右端に張り付く */
.site-header .header-auth{
  margin-left: auto;
  flex: 0 0 auto;
}

.site-header .header-right{
  margin-left: auto;            /* 右端に寄せる */
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

/* ナビ側の a の装飾が .btn を潰すのを確実に防ぐ（強めに上書き） */
.site-header .global-nav .nav-list > li.menu-item--auth > a.btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* =========================
   Responsive（Mobile）
========================= */

@media (max-width: 959px) {

  .site-header .header-inner{
    grid-template-columns: auto 1fr auto; /* toggle | logo | auth */
  }

  /* ロゴを中央寄せ */
  .site-header .site-branding{
    grid-column: 2;
    justify-self: center;
  }

  /* global-navが消えても auth は右端に張り付く */
  .site-header .header-auth{
    grid-column: 3;
    justify-self: end;
  }

  /* ヘッダーの検索エリア（入力欄＋ボタン）を丸ごと非表示 */
  .header-right .header-search.search-submit {
    display: none;
  }

/* 1行：toggle | logo(中央) | auth(右) */
.site-header .header-inner{
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 10px !important;
}

/* 画面が狭い端末でボタンが長すぎる場合の保険：少し詰める */
.site-header .header-auth .btn--nav{
  padding: 0.34rem 0.78rem !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.03em !important;
}
}

/* モバイル時：global-nav（日本/世界…）は表示しない。ハンバーガーに統一 */
@media (max-width: 768px){

    .site-header .header-inner{
      grid-template-columns: auto 1fr auto; /* toggle | logo | auth */
    }

    /* ロゴを中央寄せ */
    .site-header .site-branding{
      grid-column: 2;
      justify-self: center;
    }

    .site-header .header-auth{
      grid-column: 3;
      justify-self: end;
    }

  /* 1行：toggle | logo(中央) | auth(右) */
  .site-header .header-inner{
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* 画面が狭い端末でボタンが長すぎる場合の保険：少し詰める */
  .site-header .header-auth .btn--nav{
    padding: 0.34rem 0.78rem !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.03em !important;
  }

/* ロゴ（custom-logo） */
.site-logo-wrapper img.custom-logo {
  display: block;
  width: 70%;
  height: 70%;
  object-fit: contain;             /* ← cover → contain に変更 */
  background: transparent;         /* 念のため */
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
}

/* サイト名（最高級のタイポグラフィ） */
.site-name-wrapper {
  font-family:
    "Inter Tight",
    "SF Pro Display",
    "Segoe UI",
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;

  font-size: 1.00rem;
  font-weight: 640;
  letter-spacing: 0.01em;

  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #93c5fd 100%);
  -webkit-background-clip: text;
  color: transparent;

  white-space: nowrap;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

/* ロゴとサイト名の間を詰める */
.site-branding-link { gap: 0.35rem; }

}

/* モバイル時狭すぎるとき：ログイン／ログアウトボタンを消す */
@media (max-width: 410px){
.site-header .header-auth{
  display: none;
 }
}

/* =========================
   Hamburger Toggle
   （PC・SP共通で常に左に表示）
========================= */

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at 30% 0, rgba(148,163,184,0.45), rgba(15,23,42,0.9));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.16s ease-out,
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    transform 0.12s ease-out;
}

/* 3本バー */
.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background-color: #e5e7eb;
  transition:
    transform 0.18s ease-out,
    opacity 0.18s ease-out,
    width 0.18s ease-out,
    background-color 0.18s ease-out;
}

.nav-toggle:hover {
  background: radial-gradient(circle at 30% 0, rgba(191,219,254,0.55), rgba(15,23,42,0.95));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.7);
  transform: translateY(-1px);
}

.nav-toggle:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 1px #0b1120,
    0 0 0 3px rgba(96, 165, 250, 0.9);
}

/* 開いているときの表情変化 */
.nav-toggle.is-open {
  border-color: rgba(251, 191, 36, 0.95);
  background: radial-gradient(circle at 30% 0, rgba(251,191,36,0.35), rgba(15,23,42,0.98));
}

.nav-toggle.is-open span {
  background-color: #fbbf24;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(40deg);
  width: 19px;
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-5px) rotate(-40deg);
  width: 19px;
}

/* =========================
   Global Nav（PC メイン）
========================= */

.global-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* リンク：細めサンセリフ＋インジケータライン */
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.82);
  text-decoration: none;
  border-bottom: none;
  transition:
    color 0.18s ease-out,
    transform 0.18s ease-out;
}

/* 下のグラデーションライン */
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #38bdf8);
  transform: scaleX(0.25);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.18s ease-out,
    opacity 0.18s ease-out;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #f9fafb;
  transform: translateY(-1px);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

/* =========================
   ヘッダー右側：検索＋ログイン
========================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: 1.2rem;
}

/* PC ヘッダー内の検索フォームだけをターゲットにする */
.header-search .search-form {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  background: radial-gradient(circle at 0 0, rgba(148,163,184,0.35), rgba(15,23,42,0.9));
  border-radius: 999px;
  padding: 0.1rem 0.1rem 0.1rem 0.75rem;
  border: 1px solid rgba(148,163,184,0.75);
  box-shadow: 0 8px 22px rgba(15,23,42,0.75);
}

/* WordPress デフォルト構造を想定 */
.header-search .search-form label {
  margin: 0;
  flex: 1 1 auto;
}

.header-search .search-field {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.3rem 0.25rem;
  font-size: 0.84rem;
  background: transparent;
  color: #e5e7eb;
}

.header-search .search-field::placeholder {
  color: rgba(148,163,184,0.85);
}

/* =========================
   ヘッダー検索ボタン（search-logo.webp）
========================= */

.header-search .search-submit {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: 0.35rem;

  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background-color: #2563eb;
  background-image: url("/wp-content/themes/jpnmedical-theme/assets/images/images/search-logo.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;

  box-shadow: 0 4px 12px rgba(15,23,42,0.8);

  /* WordPress の value="検索" を完全に隠す */
  font-size: 0;
  color: transparent;
  text-indent: -9999px;

  transition:
    background-color 0.18s ease-out,
    transform 0.12s ease-out,
    box-shadow 0.18s ease-out;
}

.header-search .search-submit:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15,23,42,0.9);
}

/* フォーカスリング */
.header-search .search-field:focus-visible,
.header-search .search-submit:focus-visible {
  outline: none;
}

.header-search .search-form:focus-within {
  border-color: rgba(96,165,250,1);
  box-shadow:
    0 0 0 1px rgba(15,23,42,0.9),
    0 0 0 3px rgba(96,165,250,0.9);
}


/* Header auth buttons */
.nav-auth{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.85);
  color: rgba(15,23,42,.9);
  transition: background-color .12s ease, transform .12s ease;
}


/* =========================
   HEADER DRAWER
   （左からスライドするメニュー）
========================= */

.header-drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;           /* is-open のときだけクリック可 */
  z-index: 60;
}

/* 背景の暗い幕 */
.header-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none; /* ★ これが重要 */
  transition: opacity 0.22s ease-out;
}

/* 左から出てくるパネル本体 */
.header-drawer__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: 340px;
  max-width: 84%;
  background: radial-gradient(circle at top left, #0b1120 0%, #020617 40%, #020617 100%);
  color: #e5e7eb;
  transform: translateX(-100%);   /* 初期状態は画面外 */
  transition: transform 0.24s ease-out;
  box-shadow: 8px 0 26px rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
}

/* ドロワーヘッダー（ロゴ＋タイトル＋閉じるボタン） */
.header-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem 0.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.header-drawer__logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-drawer__logo img {
  max-height: 32px;
  width: auto;
  height: auto;
}

.header-drawer__title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  margin: 0 0 0 0.4rem;
}

/* 閉じるボタン（丸いアイコン） */
.header-drawer__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    background-color 0.16s ease-out,
    border-color 0.16s ease-out,
    transform 0.12s ease-out;
}

.header-drawer__close:hover {
  background: rgba(30, 64, 175, 0.95);
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateY(-1px);
}

/* 中身スクロール */
.header-drawer__inner {
  padding: 0.7rem 1.1rem 1.2rem;
  overflow-y: auto;
  max-height: 100%;
}

/* 開いている状態 */
.header-drawer.is-open {
  pointer-events: auto;
}

.header-drawer.is-open .header-drawer__backdrop {
  opacity: 1;
  pointer-events: auto;
}

.header-drawer.is-open .header-drawer__panel {
  transform: translateX(0);
}

/* ★ ドロワー最上部の検索フォーム */
.header-drawer__search {
  margin: 0.4rem 0 0.8rem;
}



/* =========================
   Drawer Auth Panel (Bright / Glass / Readable)
========================= */

.header-drawer {
  /* ここだけで完結する色設計 */
  --auth-surface: rgba(255, 255, 255, .94);
  --auth-surface2: rgba(255, 255, 255, .86);
  --auth-text: #0b1220;
  --auth-muted: rgba(11, 18, 32, .68);

  /* “輝き”の核（青→シアン） */
  --auth-accent-1: #2563eb; /* blue */
  --auth-accent-2: #06b6d4; /* cyan */

  --auth-border: rgba(6, 182, 212, .35);
  --auth-ring: rgba(37, 99, 235, .35);
}

/* Drawer Auth Panel */
.drawer-auth{
  margin: 12px 0 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.drawer-auth__card{
  border: 1px solid var(--auth-border);
  border-radius: 18px;

  /* 白でも“のっぺり”しない、うっすらグラデ＋透明感 */
  background: linear-gradient(180deg, var(--auth-surface), var(--auth-surface2));

  /* 暗いドロワー上で「エッジが光る」感じ */
  box-shadow:
    0 16px 40px rgba(0,0,0,.18),
    0 8px 24px rgba(37,99,235,.10),
    0 10px 28px rgba(6,182,212,.14);
  padding: 14px 14px 12px;

  backdrop-filter: blur(10px);
}

.drawer-auth__meta{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.drawer-auth__eyebrow{
  font-size: 11px;
  letter-spacing: .06em;
  margin: 0;
  color: var(--auth-muted);      /* opacity は使わない */
}

.drawer-auth__name{
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--auth-text);
  line-height: 1.2;
}

.drawer-auth__actions{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-auth__btn{
  width:100%;
  justify-content:center;
  border-radius:999px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

/* ボタン：このパネル内だけ “輝く主役色” に上書き */
.drawer-auth .btn.btn-primary{
  color:#fff;
  border: 0;
  background: linear-gradient(135deg, var(--auth-accent-1), var(--auth-accent-2));
  box-shadow:
    0 12px 26px rgba(37,99,235,.24),
    0 10px 22px rgba(6,182,212,.18);
}

.drawer-auth .btn.btn-outline{
  color: var(--auth-text);
  background: rgba(255,255,255,.72);
  border: 2px solid rgba(37,99,235,.25);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

/* “新規登録”を無効っぽく見せない（白ボタンでも存在感） */
.drawer-auth__btn--accent{
  border-color: rgba(6,182,212,.38) !important;
}

/* hover / focus（“輝く”体験） */
.drawer-auth .btn:hover{
  transform: translateY(-1px);
}

.drawer-auth .btn.btn-primary:hover{
  box-shadow:
    0 16px 34px rgba(37,99,235,.30),
    0 14px 28px rgba(6,182,212,.22);
}

.drawer-auth .btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.75),
    0 0 0 6px var(--auth-ring);
}

@media (prefers-reduced-motion: reduce){
  .drawer-auth__btn{ transition: none; }
  .drawer-auth .btn:hover{ transform: none; }
}



/* =========================
   Drawer 内 検索フォーム
========================= */

.header-drawer__search .search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(15,23,42,0.9);
  border-radius: 999px;
  padding: 0.2rem 0.25rem 0.2rem 0.85rem;
  border: 1px solid rgba(148,163,184,0.9);
}

/* WordPress デフォルト構造 */
.header-drawer__search .search-form label {
  flex: 1 1 auto;
  margin: 0;
}

.header-drawer__search .search-field {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.32rem 0.25rem;
}

.header-drawer__search .search-field::placeholder {
  color: rgba(148,163,184,0.9);
}

/* =========================
   Drawer 検索ボタン（統一版）
========================= */

.header-drawer__search .search-submit {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: 0.35rem;

  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background-color: #1d4ed8;
  background-image: url("/wp-content/themes/jpnmedical-theme/assets/images/images/search-logo.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;

  box-shadow: 0 4px 12px rgba(15,23,42,0.9);

  /* value="検索" を完全に無効化 */
  font-size: 0;
  color: transparent;
  text-indent: -9999px;

  transition:
    background-color 0.18s ease-out,
    transform 0.12s ease-out,
    box-shadow 0.18s ease-out;
}

.header-drawer__search .search-submit:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15,23,42,1);
}

/* フォーカス時 */
.header-drawer__search .search-form:focus-within {
  border-color: rgba(56,189,248,1);
  box-shadow:
    0 0 0 1px rgba(15,23,42,0.9),
    0 0 0 3px rgba(56,189,248,0.85);
}

/* ドロワー内メインメニュー */
.header-drawer-nav {
  margin-top: 0.45rem;
}

.drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.drawer-menu > li {
  margin: 0;
}

/* 行をカードっぽく */
.drawer-menu > li > a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #e5e7eb;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(30, 64, 175, 0.65);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.6);
  transition:
    background-color 0.16s ease-out,
    border-color 0.16s ease-out,
    transform 0.12s ease-out,
    box-shadow 0.16s ease-out;
}

/* 左に小さな丸インジケータ */
.drawer-menu > li > a::before {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* 右に矢印 */
.drawer-menu > li > a::after {
  content: "›";
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ホバー時：少し浮き上がる */
.drawer-menu > li > a:hover {
  background: rgba(37, 99, 235, 0.95);
  border-color: rgba(191, 219, 254, 1);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.85);
}

/* 現在ページっぽい見せ方（aria-current 対応） */
.drawer-menu > li > a[aria-current="page"] {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.95);
}

/* ドロワー内ウィジェット（使う場合） */
.header-drawer__widgets {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.header-drawer__widgets .widget {
  margin-bottom: 1rem;
}

.header-drawer__widgets .widget-title {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  margin: 0 0 0.35rem;
}

/* ドロワーを開いている間は背景スクロールを止める */
html.drawer-open,
html.drawer-open body {
  overflow: hidden;
}

/* =========================
   Responsive
========================= */

/* モバイルではグローバルメニューとヘッダー検索を隠し、
   ハンバーガー＋ドロワーのみ */
@media (max-width: 959px) {
  .header-inner {
    padding: 0.55rem 1rem;
    gap: 1rem;
  }

  .global-nav {
    display: none;
  }

  .header-actions {
    display: none;
  }
}

/* もう少し広い画面では余白を少し増やす */
@media (min-width: 960px) {
  .header-inner {
    padding: 0.75rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
  }
}

/* ============================================
   FOOTER 強制調整 — 完全安定版（共通設定）
============================================ */

/* フッター本体：全デバイス共通で中央寄せレイアウト */
.site-footer {
  padding: 2rem 1.2rem 1.8rem;
  background: #020617;
  color: #e2e8f0;
  border-radius: 16px 16px 0 0;
  margin-top: 1.6rem;
  font-size: 0.85rem;
}

/* ★ 常に1カラム中央寄せ（PC/モバイル共通） */
.site-footer-inner {
  max-width: 720px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 1.4rem !important;
}

/* ロゴ＋タイトル全体 */
.footer-brand-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.8rem !important;
  width: 100%;
}

/* ロゴとタイトル横並び */
.footer-brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.8rem !important;
  text-decoration: none;
  color: inherit;
}

/* ロゴ（HTML側サイズを無効化） */
.footer-logo {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover !important;
  border-radius: 14% !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.30);
  display: block !important;
}

/* サイトタイトル（グラデ文字） */
.footer-brand-title {
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff, #dbeafe 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

/* フッターメニュー（中央寄せ） */
.footer-nav {
  margin-top: 0.75rem;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0 auto !important;
  display: flex !important;
  flex-wrap: wrap;              /* スマホで折り返し OK */
  justify-content: center;
  gap: 1.2rem !important;
  text-align: center;
}

/* コピーライト */
.footer-copy {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 0.8rem;
  width: 100%;
  text-align: center !important;
}

/* ============================================
   PC 調整（768px 以上）
============================================ */
@media (min-width: 768px) {
  .site-footer {
    padding: 2.4rem 1.2rem 2rem;
    font-size: 0.9rem;
  }

  .site-footer-inner {
    max-width: 720px !important;
    gap: 1.4rem !important;
  }

  .footer-logo {
    width: 48px !important;
    height: 48px !important;
  }

  .footer-brand-title {
    font-size: 1rem !important;
  }
}

/* ============================================
   モバイル最適化（767px 以下）
============================================ */
@media (max-width: 767px) {

  .site-footer {
    padding: 1.8rem 1rem 1.6rem;
    font-size: 0.8rem;
  }

  .site-footer-inner {
    max-width: 90% !important;
    gap: 1.6rem !important;
  }

  .footer-logo {
    width: 42px !important;
    height: 42px !important;
  }

  .footer-brand-title {
    font-size: 0.9rem !important;
  }

  /* メニューは少し間隔を詰める */
  .footer-menu {
    gap: 0.9rem !important;
  }
}

/* フッターメニュー：liの癖を消す */
.footer-menu > li {
  margin: 0 !important;
  padding: 0 !important;
}

/* フッターメニュー：リンクの見た目 */
.footer-menu a {
  color: #e2e8f0;
  text-decoration: none;
  opacity: 0.9;
  display: inline-block;
  padding: 0.15rem 0.1rem;
  border-radius: 10px;
}

/* hover */
.footer-menu a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* キーボード操作時（アクセシビリティ） */
.footer-menu a:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 3px;
  opacity: 1;
}

/* 現在ページ */
.footer-menu .current-menu-item > a,
.footer-menu .current_page_item > a {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
