/* ============================================================
   新职途 — 用户端主样式
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --green-deep:   #1a3c2a;
  --green:        #2e7d5b;
  --green-light:  #4a9e75;
  --mint:         #d4f0d4;
  --mint-light:   #eaf9ea;
  --pale:         #f3f9f2;
  --paper:        #fdfcf8;
  --white:        #ffffff;
  --ink:          #1a2320;
  --ink-light:    #4a5a52;
  --muted:        #6b7d73;
  --line:         #dce5de;
  --line-light:   #edf2ee;
  --amber:        #d4892a;
  --red:          #c0392b;
  --shadow-sm:    0 1px 3px rgba(26,60,42,0.06);
  --shadow-md:    0 6px 20px rgba(26,60,42,0.10);
  --shadow-lg:    0 16px 48px rgba(26,60,42,0.14);
  --shadow-xl:    0 28px 80px rgba(10,30,20,0.22);
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-xl:    32px;
  --radius-full:  999px;
  --font:         "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --transition:   0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 850; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 750; }
p { color: var(--ink-light); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(165deg, #e5f3e3 0%, #d2ebd0 30%, #bfdfbb 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 620px 620px at 82% 48%, rgba(46,125,91,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 340px 340px at 88% 20%, rgba(74,158,117,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero .nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 80px);
}
.hero .nav .brand {
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.hero .nav .brand span { color: var(--green); }
.hero .nav-links { display: flex; align-items: center; gap: 24px; }
.hero .nav-links a {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
  transition: color var(--transition);
}
.hero .nav-links a:hover { color: var(--green); }
.hero .nav-links .nav-cta {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--green);
  color: #fff;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.hero .nav-links .nav-cta:hover { background: var(--green-deep); transform: translateY(-1px); }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 100px clamp(24px, 5vw, 80px) 80px;
}
.hero-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(46,125,91,0.12);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-content h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  line-height: 1.08;
}
.hero-content h1 em { color: var(--green); font-style: normal; }
.hero-content > p {
  max-width: 480px;
  margin-bottom: 32px;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-light);
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 850;
  color: var(--green);
  line-height: 1;
}
.hero-stats .stat span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
}

/* ── Buttons ───────────────────────────────────────────── */
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.primary-button:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.primary-button .arrow {
  font-size: 1.2rem;
  transition: transform var(--transition);
}
.primary-button:hover .arrow { transform: translateX(3px); }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
}
.secondary-button:hover { border-color: var(--green); background: var(--mint-light); }
.secondary-button:disabled { opacity: 0.6; cursor: wait; }

/* ── Main Content Area ─────────────────────────────────── */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 40px);
}

/* ── Section Heading ───────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading .eyebrow {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.section-heading h2 { color: var(--ink); }
.count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
}

/* ── Search ────────────────────────────────────────────── */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin: 28px 0 16px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(46,125,91,0.08);
}
.search-box span { color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }
.search-box input {
  width: 100%;
  border: none;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 0.95rem;
}
.search-box input::placeholder { color: var(--muted); }

/* ── Tag Filters ───────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tag {
  padding: 7px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink-light);
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  transition: all var(--transition);
}
.tag:hover { border-color: var(--green-light); color: var(--green); background: var(--mint-light); }
.tag.active { border-color: var(--green); color: #fff; background: var(--green); }

.filter-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.filter-label {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  min-width: 2.5em;
}

/* ── Job Cards Grid ────────────────────────────────────── */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.job-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.job-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.job-category {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--mint-light);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}
.job-card h3 {
  margin: 12px 0 8px;
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--ink);
}
.job-card > p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}
.card-tags span {
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--pale);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 650;
}
.details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
}
.details-link:hover { background: var(--green-deep); }
.details-link::after { content: "→"; font-size: 1.1rem; }

/* ── Salary Band ───────────────────────────────────────── */
.salary-band {
  margin: 8px 0 14px;
  padding: 14px 16px;
  border: 1px solid #c8e4ce;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e8f7e6, #f8fdf6);
}
.salary-band small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.salary-band strong {
  color: #156f3c;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.salary-band span {
  margin-left: 3px;
  color: #4a8565;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px 0 16px;
}
.pagination button {
  padding: 9px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  transition: all var(--transition);
}
.pagination button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination span { font-size: 0.9rem; color: var(--muted); font-weight: 650; }

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { font-size: 0.95rem; }

/* ── Dialog / Modal ────────────────────────────────────── */
.job-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: 90vh;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0 32px 32px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}
.job-dialog::backdrop { background: rgba(10,30,20,0.5); backdrop-filter: blur(4px); }
.job-dialog .dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -32px;
  padding: 20px 32px 16px;
  background: linear-gradient(180deg, #fff 60%, transparent);
}
.job-dialog .dialog-header::before {
  content: "";
  display: block;
  height: 5px;
  margin: -20px -32px 18px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--green-deep), var(--green-light));
}
.job-dialog .close {
  position: absolute;
  top: 28px;
  right: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.2rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.job-dialog .close:hover { background: var(--mint-light); transform: rotate(90deg); }
.job-dialog h2 { margin: 8px 0 12px; font-size: 2rem; }
.job-dialog .dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.job-dialog .dialog-meta span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--pale);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--green);
}
.job-dialog h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 10px;
  font-size: 1.05rem;
  color: var(--green-deep);
}
.job-dialog h3::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--green);
}
.job-dialog p, .job-dialog li { color: var(--ink-light); line-height: 1.75; font-size: 0.93rem; }
.job-dialog ul { padding-left: 20px; list-style: disc; }
.job-dialog ul li { margin-bottom: 4px; }

/* ── Favorites ─────────────────────────────────────────── */
.favorite-button {
  margin-top: 28px;
  padding: 12px 24px;
  border: 2px solid var(--green);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--green);
  font-weight: 700;
  transition: all var(--transition);
}
.favorite-button:hover { background: var(--green); color: #fff; }
.favorite-button.is-favorite { background: var(--green); color: #fff; }
.favorite-button.is-favorite:hover { background: var(--red); border-color: var(--red); }
.favorite-button:disabled { opacity: 0.6; cursor: wait; }
.favorite-message { min-height: 24px; margin-top: 10px; font-size: 0.88rem; color: var(--green); font-weight: 650; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { min-height: auto; }
  .hero-content { padding: 90px 24px 50px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content > p { font-size: 1rem; max-width: 100%; }
  .hero-stats { gap: 16px; }
  .hero-stats .stat strong { font-size: 1.4rem; }
  .hero-stats .stat span { font-size: 0.72rem; }

  main { padding: 40px 16px; }

  .section-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-heading h2 { font-size: 1.5rem; }

  .search-box { height: 46px; margin: 20px 0 12px; padding: 0 14px; }

  .tags { gap: 6px; margin-bottom: 18px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .tag { flex-shrink: 0; white-space: nowrap; }

  .job-grid { grid-template-columns: 1fr; gap: 12px; }
  .job-card { padding: 20px; }

  .pagination { gap: 12px; margin: 28px 0 8px; }

  .job-dialog { width: calc(100% - 16px); padding: 0 18px 22px; border-radius: 18px; }
  .job-dialog .dialog-header { margin: 0 -18px; padding: 14px 18px 10px; }
  .job-dialog .dialog-header::before { margin: -14px -18px 12px; border-radius: 18px 18px 0 0; }
  .job-dialog h2 { font-size: 1.3rem; }
  .job-dialog .close { top: 22px; right: 12px; width: 28px; height: 28px; }
}

@media (max-width: 480px) {
  .hero-content { padding: 80px 18px 40px; }
  .hero-content h1 { font-size: 1.7rem; }
  .hero-content > p { font-size: 0.93rem; }

  .hero-stats { gap: 12px; }
  .hero-stats .stat strong { font-size: 1.2rem; }

  .primary-button { padding: 12px 22px; font-size: 0.88rem; width: 100%; justify-content: center; }

  .section-heading h2 { font-size: 1.3rem; }
  .search-box { height: 42px; font-size: 0.9rem; }

  .tag { padding: 5px 10px; font-size: 0.76rem; }

  .job-card { padding: 16px; }
  .job-card h3 { font-size: 1.05rem; }
  .salary-band { padding: 10px 12px; }
  .salary-band strong { font-size: 1.25rem; }

  .pagination { gap: 8px; }
  .pagination button { padding: 7px 12px; font-size: 0.8rem; }
  .pagination span { font-size: 0.8rem; }

  .favorite-button { width: 100%; text-align: center; }
}
