/* ===================================================
   モバイルメニュー（ハンバーガー）スタイル
   スマートフォン表示時のみ有効（max-width: 640px）
   =================================================== */

@media (max-width: 640px) {
  /* ハンバーガーボタン */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #fff;
    font-size: 24px;
    transition: opacity 0.2s;
  }

  .mobile-menu-btn:hover {
    opacity: 0.8;
  }

  .mobile-menu-btn.active {
    color: #ffc107;
  }

  /* モバイルメニューオーバーレイ */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  /* モバイルメニューパネル */
  .mobile-menu-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 280px;
    height: 100%;
    background: #fff;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    animation: slideInLeft 0.3s ease-out;
  }

  .mobile-menu-panel.active {
    display: block;
  }

  @keyframes slideInLeft {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translateX(0);
    }
  }

  /* メニューヘッダー（閉じるボタン）*/
  .mobile-menu-header {
    background: #1a56a0;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #0d3d7a;
  }

  .mobile-menu-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0;
  }

  .mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
  }

  .mobile-menu-close:hover {
    opacity: 0.8;
  }

  /* メニューリスト */
  .mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
  }

  .mobile-menu-list li {
    border-bottom: 1px solid #f0f0f0;
  }

  .mobile-menu-list li:last-child {
    border-bottom: none;
  }

  .mobile-menu-list a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
  }

  .mobile-menu-list a:active {
    background: #f5f5f5;
    color: #1a56a0;
  }

  .mobile-menu-list a:hover {
    background: #f5f5f5;
    color: #1a56a0;
  }

  /* トップに戻るボタン */
  .mobile-menu-back-link {
    display: block;
    padding: 12px 16px;
    background: #f5f7fa;
    color: #1a56a0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-top: 2px solid #1a56a0;
    margin-top: 8px;
    text-align: center;
  }

  .mobile-menu-back-link:active {
    background: #e8f0f8;
  }
}

/* PCではメニューボタンを非表示 */
@media (min-width: 641px) {
  .mobile-menu-btn,
  .mobile-menu-overlay,
  .mobile-menu-panel {
    display: none !important;
  }
}
