/* 小葱技能站 - 全站响应式 & 手机版
 * 引入顺序：置于各页面内联 <style> 与 style.css 之后，确保覆盖。
 * 断点：≤1024 平板 / ≤768 手机横竖 / ≤480 小屏手机
 */

/* ===== 汉堡菜单按钮（默认隐藏，手机显示） ===== */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 2px solid var(--border, #f5f0e8);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: .15s;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--accent, #ff6b35);
  border-radius: 2px;
  transition: .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 手机菜单打开时锁定背景滚动 */
body.nav-open { overflow: hidden; }

/* 遮罩 */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(31,31,31,.4);
  z-index: 48;
  opacity: 0;
  transition: opacity .25s;
}
.nav-overlay.show { display: block; opacity: 1; }

/* ===== 平板 ≤1024 ===== */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .hero-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .hero-visual { display: none !important; }        /* 悬浮卡片区平板/手机隐藏，避免溢出 */
  .hero h1 { font-size: 42px !important; }
  .hero p { max-width: none !important; }
  .detail-layout { grid-template-columns: 1fr !important; gap: 28px !important; }
  .download-box { position: static !important; }
  .search-layout { grid-template-columns: 1fr !important; }
  .filter-panel { position: static !important; }
}

/* ===== 手机 ≤768 ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* --- 导航：汉堡抽屉 --- */
  .nav-inner { gap: 12px !important; height: 58px !important; }
  .logo { font-size: 17px !important; }
  .logo img { width: 30px !important; height: 30px !important; }
  .nav-search { display: none !important; }         /* top.php 版搜索框手机隐藏 */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 78%; max-width: 320px;
    height: 100vh;
    background: #fff;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    padding: 76px 20px 24px !important;
    box-shadow: -8px 0 32px rgba(0,0,0,.12);
    z-index: 49;
    transition: right .28s ease;
    margin-left: 0 !important;
    overflow-y: auto;
  }
  .nav-links.open { right: 0; }
  .nav-links a {
    padding: 14px 16px !important;
    font-size: 16px !important;
    border-radius: 12px;
    width: 100%;
  }
  .nav-links .btn-primary { text-align: center; margin-top: 8px; }

  /* 语言切换器（手机版） */
  .lang-switcher { width: 100%; }
  .lang-btn { width: 100%; text-align: left; padding: 14px 16px !important; font-size: 16px !important; border-radius: 12px; }
  .lang-dropdown { position: static; box-shadow: none; border: none; margin-top: 0; padding: 0 0 0 16px; min-width: auto; }
  .lang-dropdown a { padding: 12px 16px; font-size: 15px; }

  /* --- 标题字号收敛 --- */
  .hero { padding: 40px 0 36px !important; }
  .hero h1 { font-size: 32px !important; }
  .hero p { font-size: 16px !important; }
  .hero-stats { gap: 20px !important; flex-wrap: wrap; }
  .hero-stats strong { font-size: 20px !important; }
  .hero-search input { height: 52px !important; padding-right: 100px !important; font-size: 15px !important; }

  .job-section h2, .money-section h2, .scene-section h2,
  .hot-section h2, .cta h2 { font-size: 26px !important; }
  .job-section .sub, .money-section .sub, .scene-section .sub,
  .hot-section .sub { font-size: 15px !important; margin-bottom: 28px !important; }
  .page-head h1 { font-size: 26px !important; }
  .page-head .ph-icon { width: 46px !important; height: 46px !important; font-size: 24px !important; }
  .money-hero h1 { font-size: 30px !important; }
  .money-hero .tagline { font-size: 17px !important; }

  /* --- 所有卡片网格 → 单列 --- */
  .job-grid, .money-grid, .scene-grid, .hot-list,
  .skill-grid, .related-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .job-card, .money-card { padding: 22px 20px !important; }
  .scene-card { padding: 22px 18px !important; }

  /* --- 工具栏/排序 --- */
  .toolbar { flex-direction: column; align-items: stretch !important; gap: 12px !important; }
  .sort-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* --- 详情页 --- */
  .detail-header { flex-direction: column; gap: 14px !important; }
  .detail-icon { width: 68px !important; height: 68px !important; font-size: 34px !important; }
  .detail-title h1 { font-size: 24px !important; }
  .detail-section { padding: 20px !important; }
  .radar-wrap { flex-direction: column; align-items: stretch !important; gap: 20px !important; }

  /* --- CTA / Footer --- */
  .cta { padding: 44px 0 !important; }
  .cta-btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; gap: 16px !important; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 16px !important; }

  /* --- 分页 --- */
  .pagination { flex-wrap: wrap; gap: 6px !important; }
  .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: 13px; }
}

/* ===== 小屏手机 ≤480 ===== */
@media (max-width: 480px) {
  .hero h1 { font-size: 27px !important; }
  .job-section h2, .money-section h2, .scene-section h2,
  .hot-section h2, .cta h2 { font-size: 22px !important; }
  .money-hero h1 { font-size: 25px !important; }
  .hero-search button { padding: 0 16px !important; font-size: 13px !important; }
  .nav-links { width: 86%; }
}
