.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed; /* ← 追加 */
  top: 0;          /* ← 追加 */
  left: 0;         /* ← 追加 */
  right: 0;        /* ← 追加 */
  background: #fff; /* 背景を白にして下のコンテンツと分離 */
  z-index: 999;    /* 最前面に表示 */
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 下に薄い影を追加して立体感 */
}

.nav-left {
  flex: 1;
  text-align: left;
}

.nav-left img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-center {
  flex: 2;
  text-align: center;
}

.nav-right {
  flex: 1.5;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.pc-nav {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap; /* 改行防止 */
}

.pc-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  display: inline-block;
}

.highlight-nav {
  background: #e3f2fd;
  color: #1565c0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-right: 2rem; /* 右側ボタン群との間隔調整 */
}

.highlight-nav:hover {
  background: #bbdefb;
}

.contact-btn {
  padding: 0.5rem 1rem;
  background: #4a8ca4;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.contact-btn:hover {
  background: #347188;
}

/* スマホ用職業訓練ボタン中央表示 */
.mobile-highlight-nav {
  text-align: center;
  margin: 10px 0;
}

.mobile-highlight-nav a {
  display: inline-block;
  white-space: nowrap; /* 改行防止 */
  font-size: 0.9rem; /* 必要に応じて文字サイズ調整 */
}

/* ハンバーガーメニュー */
.mobile-only {
  display: none;
}

.menu-toggle {
  font-size: 1.8rem !important;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  width: 2em; /* 幅固定で文字切替時もブレない */
  text-align: center; /* 中央寄せ */
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #f0f0f0;
  padding: 1rem;
}

.mobile-nav a {
  text-decoration: none;
  color: #1565c0;
  font-weight: bold;
  padding: 0.75rem 1rem;
  background: #ffffff; /* 背景を真っ白に変更 */
  border-bottom: 1px solid #ccc; /* 区切り線（薄いグレー） */
  display: block;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* 表示切り替え用のactiveクラス（JSで追加） */
.mobile-nav.active {
  display: flex;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .pc-nav,
  .nav-right {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .nav-container {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
  }

  .mobile-highlight-nav {
    flex: 1;
    text-align: center;
  }

  .header-right {
    text-align: right;
  }

  .mobile-nav {
    position: absolute;
    top: 70px; /* ヘッダー高さに合わせて調整 */
    left: 0;
    right: 0;
    background: #f0f0f0;
    display: none;
    flex-direction: column;
    padding: 1rem;
    z-index: 999; /* ヒーローの上に被せる */
  }

  .mobile-nav.active {
    display: flex;
  }

  .nav-right .course-btn {
    margin-left: auto;
    margin-right: 10px; /* ハンバーガーメニューとの余白調整 */
    max-width: 120px; /* 必要に応じて調整 */
    font-size: 0.8rem; /* スマホ用に文字サイズ調整 */
    padding: 0.3rem 0.5rem;
  }

  .nav-left img {
    max-width: 120px; /* ロゴサイズをスマホで抑える */
    height: auto;
  }
}
