/* ==========================================
   page-guide.css — 就业指南专属样式
   时间轴 / 陷阱卡片 / 热线目录 / 锚点导航
   ========================================== */

/* 自定义颜色变量（本页专用） */
:root {
  --gd-danger: #EF4444;
  --gd-danger-light: #FEF2F2;
  --gd-safe: #10B981;
  --gd-safe-light: #ECFDF5;
  --gd-warn: #FF9F5A;
  --gd-warn-light: #FFF3E8;
  --gd-info: #3B82F6;
  --gd-info-light: #EFF6FF;
}

/* ── 粘性锚点导航 ── */
.guide-nav {
  display: flex;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  position: sticky;
  top: var(--header-height);
  background: var(--bg);
  z-index: 40;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}
.guide-nav::-webkit-scrollbar { display: none; }
.guide-nav a {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  transition: all 0.2s;
}
.guide-nav a:hover, .guide-nav a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── 章节通用 ── */
.guide-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
}
.guide-section:last-child { border-bottom: none; }
.guide-section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-section-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.guide-section-title .icon {
  font-size: 1.3rem;
}

/* ── 求职流程时间轴 ── */
.flow-section {
  padding: 16px 0 0;
}
.flow-timeline {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.flow-stage {
  flex: 1;
  min-width: 185px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 18px 16px;
}
.flow-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}
.flow-stage-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.flow-stage:nth-child(1) .flow-stage-num { background: var(--brand); }
.flow-stage:nth-child(2) .flow-stage-num { background: var(--gd-info); }
.flow-stage:nth-child(3) .flow-stage-num { background: var(--accent); }
.flow-stage:nth-child(4) .flow-stage-num { background: var(--gd-warn); }
.flow-stage:nth-child(5) .flow-stage-num { background: var(--gd-safe); }

.flow-stage-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.flow-step {
  padding: 10px 0 10px 12px;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}
.flow-stage:nth-child(1) .flow-step { border-left-color: var(--brand); }
.flow-stage:nth-child(2) .flow-step { border-left-color: var(--gd-info); }
.flow-stage:nth-child(3) .flow-step { border-left-color: var(--accent); }
.flow-stage:nth-child(4) .flow-step { border-left-color: var(--gd-warn); }
.flow-stage:nth-child(5) .flow-step { border-left-color: var(--gd-safe); }

.flow-step:last-child { border-bottom: none; padding-bottom: 0; }
.flow-step-num {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.flow-stage:nth-child(1) .flow-step-num { background: var(--brand); }
.flow-stage:nth-child(2) .flow-step-num { background: var(--gd-info); }
.flow-stage:nth-child(3) .flow-step-num { background: var(--accent); }
.flow-stage:nth-child(4) .flow-step-num { background: var(--gd-warn); }
.flow-stage:nth-child(5) .flow-step-num { background: var(--gd-safe); }
.flow-step-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 4px;
}
.flow-step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── 困难卡片 ── */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.difficulty-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.difficulty-card .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.difficulty-card .title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 6px;
}
.difficulty-card .desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── 陷阱卡片 ── */
.trap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.trap-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--gd-danger);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.trap-card:hover { box-shadow: var(--shadow-md); }
.trap-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
}
.trap-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gd-danger);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trap-info { flex: 1; min-width: 0; }
.trap-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}
.trap-trick {
  font-size: 0.82rem;
  color: var(--gd-danger);
  line-height: 1.5;
}
.trap-icon {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}
.trap-card.expanded .trap-icon { transform: rotate(180deg); }
.trap-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.trap-card.expanded .trap-card-body { max-height: 400px; }
.trap-card-body-inner {
  padding: 0 18px 18px 62px;
}
.trap-identify-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gd-safe);
  margin-bottom: 6px;
}
.trap-identify-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 12px;
  border-left: 2px solid var(--gd-safe-light);
}

/* ── 预防工具 ── */
.prevention-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.prevention-card {
  background: var(--gd-safe-light);
  border: 1px solid #D1FAE5;
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.prevention-card .name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 4px;
}
.prevention-card .desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
}
.prevention-card .link {
  font-size: 0.82rem;
  color: var(--gd-safe);
  font-weight: 600;
  text-decoration: none;
  align-self: flex-end;
}
.prevention-card .link:hover { text-decoration: underline; }
.habits-box {
  background: var(--gd-info-light);
  border: 1px solid #DBEAFE;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.habits-box h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gd-info);
  margin-bottom: 12px;
}
.habits-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.habits-box li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}
.habits-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gd-info);
  font-weight: 700;
}

/* ── 事后止损场景 ── */
.recovery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.recovery-scenario {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}
.recovery-scenario-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--gd-warn-light);
}
.recovery-scenario-header .emoji { font-size: 1.3rem; flex-shrink: 0; }
.recovery-scenario-header .title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.recovery-scenario-header .arrow {
  color: var(--text-tertiary);
  transition: transform 0.2s;
}
.recovery-scenario.expanded .arrow { transform: rotate(180deg); }
.recovery-scenario-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.recovery-scenario.expanded .recovery-scenario-body { max-height: 500px; }
.recovery-steps {
  padding: 16px 18px 18px;
}
.recovery-steps .step {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: baseline;
}
.recovery-steps .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gd-warn);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.recovery-steps .step-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── 热线速查表 ── */
.hotline-directory {
  background: var(--gd-warn-light);
  border: 2px solid var(--gd-warn);
  border-radius: var(--radius-md);
  padding: 24px;
}
.hotline-directory h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hotline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.hotline-item {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hotline-phone {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}
.hotline-info { flex: 1; min-width: 0; }
.hotline-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.hotline-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── 跨链接提示 ── */
.guide-crosslink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.2s;
}
.guide-crosslink:hover { text-decoration: underline; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .difficulty-grid { grid-template-columns: 1fr; }
  .trap-grid { grid-template-columns: 1fr; }
  .prevention-grid { grid-template-columns: 1fr; }
  .hotline-grid { grid-template-columns: 1fr; }
  .flow-section { padding: 8px 0 0; }
  .flow-timeline { flex-direction: column; gap: 16px; overflow-x: visible; }
  .flow-stage { min-width: 0; }
  .guide-section { padding: 24px 0; }
}
