/* ========== グローバルナビゲーション ========== */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  border-bottom: 1px solid rgba(201,162,39,.2);
  box-shadow: 0 2px 12px rgba(7,15,31,.3);
}
.nav-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 68px;
  position: relative;
  z-index: 1;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.nav-logo-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.nav-logo-title em {
  font-style: normal;
  color: var(--gold-300);
}
.nav-logo-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,.45);
  display: block;
  margin-top: 1px;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: auto;
  padding: 0;
  flex-wrap: nowrap;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.18s;
  white-space: nowrap;
  position: relative;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-link.active {
  color: var(--gold-300);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
}
.nav-link-icon {
  font-size: 0.85rem;
}
.nav-link-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-badge-soon {
  font-size: 0.6rem;
  padding: 2px 5px;
  background: rgba(201,162,39,.25);
  color: var(--gold-300);
  border-radius: 4px;
  margin-left: 2px;
}
.nav-gold-bar {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), var(--gold-300), var(--gold-500), transparent);
}

/* ========== ドロップダウン（基礎知識） ========== */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 3px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-800);
  border: 1px solid rgba(201,162,39,.25);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(7,15,31,.45);
  list-style: none;
  padding: 6px;
  min-width: 168px;
  z-index: 200;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--navy-800);
  border-left: 1px solid rgba(201,162,39,.25);
  border-top: 1px solid rgba(201,162,39,.25);
}
.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: all 0.18s;
}
.nav-dropdown-link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-dropdown-link.active {
  color: var(--gold-300);
  background: rgba(201,162,39,.1);
}

/* PC: ホバーでドロップダウン展開 */
@media (min-width: 1151px) {
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    animation: dropdownFadeIn 0.15s ease;
  }
  .nav-dropdown:hover .nav-dropdown-arrow,
  .nav-dropdown:focus-within .nav-dropdown-arrow {
    transform: rotate(180deg);
  }
  @keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
}

/* ========== モバイル（ハンバーガー） ========== */
@media (max-width: 1150px) {
  .nav-hamburger { display: flex; }
  .nav-logo-sub  { display: none; }
  .nav-logo-title { font-size: 0.95rem; }
  .nav-logo-box  { width: 38px; height: 38px; font-size: 1.2rem; }
  .nav-inner     { height: 60px; padding: 0 16px; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border-top: 1px solid rgba(201,162,39,.2);
    box-shadow: 0 8px 24px rgba(7,15,31,.4);
    padding: 8px 16px 16px;
    z-index: 999;
    animation: navSlideDown 0.2s ease;
  }
  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .nav-menu.open { display: flex; }

  .nav-link {
    padding: 13px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-link.active::after { display: none; }
  .nav-link.active {
    background: rgba(201,162,39,.15);
    border-left: 3px solid var(--gold-500);
    padding-left: 13px;
  }
  .nav-link-disabled { pointer-events: none; }

  /* モバイル：ドロップダウントリガーボタン */
  .nav-dropdown-trigger {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }
  .nav-dropdown-trigger.active {
    background: rgba(201,162,39,.15);
    border-left: 3px solid var(--gold-500);
    padding-left: 13px;
  }

  /* モバイル：アコーディオン形式 */
  .nav-dropdown-menu {
    display: none;
    position: static;
    transform: none;
    background: rgba(0,0,0,.2);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 4px 16px;
    min-width: 0;
    flex-direction: column;
    animation: none;
  }
  .nav-dropdown-menu::before {
    display: none;
  }
  .nav-dropdown-menu.open {
    display: flex;
  }
  .nav-dropdown-link {
    padding: 11px 16px;
    font-size: 0.88rem;
    border-radius: var(--radius-xs);
    border-bottom: 1px solid rgba(255,255,255,.04);
  }
  .nav-dropdown-link:last-child { border-bottom: none; }
  .nav-dropdown-link.active {
    background: rgba(201,162,39,.12);
    border-left: 3px solid var(--gold-500);
    padding-left: 13px;
  }
  .nav-dropdown-link.nav-link-disabled { pointer-events: none; }
  /* モバイルでaria-expanded=trueのとき矢印を回転 */
  .nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-arrow {
    transform: rotate(180deg);
  }
}
