/* ─── ヘッダー本体 ───
   クラス名は site-top-* に統一し、フォント図鑑など独自に .header / .nav 等を
   持つページに重ねて挿入しても衝突しないようにしている */
.site-top-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1100;
  background: var(--color-black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 60px;
}

.site-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.site-top-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.site-top-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-top-logo-image {
  height: 32px;
  width: auto;
}

@media (max-width: 460px) {
  .site-top-logo-image {
    /* CSSファイル自身からの相対パス（配置場所に依存しないため $base_path 不要） */
    content: url('../../images/title-omf_mini.png');
    /* 高さは切り替え前と同じ32pxのまま（ヘッダーの実高さが変わらないようにするため） */
    height: 32px;
  }
}

/* ─── ヘッダーナビ ─── */
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-button {
  flex-shrink: 0;
  color: var(--color-white);
  font-size: 14px;
  /*font-weight: 600;*/
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-button:hover {
  color: var(--color-yellow);
  text-decoration: underline;
  text-decoration-color: var(--color-yellow);
  text-underline-offset: 4px;
}

.nav-button-primary {
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--color-yellow);
  color: var(--color-black);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-button-primary:hover {
  background: var(--color-yellow-hover);
  color: var(--color-black);
  transform: translateY(-3px);
}

/* ─── ハンバーガーアイコン（1260px以下でのみ表示） ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

.nav-hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@keyframes navButtonsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── 1260px以下：ヘッダー内の横並びをやめ、ハンバーガー＋フローティングメニューに切替 ─── */
@media (max-width: 1260px) {
  .nav-hamburger {
    display: flex;
    position: fixed;
    top: 24px;
    right: 60px;
    z-index: 1101;
  }

  .nav-buttons {
    display: none;
    position: fixed;
    top: 80px;
    right: 60px;
    z-index: 1101;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 240px;
    padding: 20px 16px;
    background: var(--color-black);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    overflow: visible;
  }

  .nav-buttons.is-open {
    display: flex;
    animation: navButtonsFadeIn 0.25s ease;
  }

  .nav-button {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    text-align: center;
    transition: font-weight 0.15s ease;
  }

  .nav-button:hover {
    color: var(--color-yellow);
    font-weight: 700;
  }

  .nav-button-primary {
    margin-top: 6px;
  }

  .nav-button-primary:hover {
    color: var(--color-black);
  }
}

@media (max-width: 768px) {
  .nav-hamburger {
    top: 16px;
    right: 24px;
  }

  .nav-buttons {
    top: 72px;
    right: 24px;
  }
}
