/* frontend/module.css —— 首页门户 · 电脑端 v1.0.0
   与家教模块同一套色板：主色 #165dff，价格 #ff5c1c，正文 #1f2329，次要 #4e5969 */

.hp-page { background: #f5f7fa; padding-bottom: 24px; }

.hp-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── 公告条 ── */
.hp-notice {
  display: flex; align-items: center; gap: 8px;
  background: #fff7e8; border: 1px solid #ffe0ac; color: #8a5200;
  border-radius: 10px; padding: 9px 14px; font-size: 13px; line-height: 1.5;
}
.hp-notice i { color: #ff8f1f; font-size: 16px; }
.hp-notice span { flex: 1; min-width: 0; }

/* ── 首屏 ── */
.hp-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(900px 320px at 88% -20%, rgba(22, 93, 255, .28), transparent 70%),
    linear-gradient(120deg, #0e2a54, #164a8a 55%, #1b5fb0);
  color: #fff;
  box-shadow: 0 12px 30px rgba(14, 42, 84, .18);
  background-size: cover;
  background-position: center;
}
.hp-hero-in { padding: 44px 44px 40px; max-width: 700px; }
.hp-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0 0 14px; padding: 4px 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  font-size: 12px; letter-spacing: .02em; color: #dce9ff;
}
.hp-title {
  margin: 0 0 12px;
  font-size: 30px; line-height: 1.35; font-weight: 800; letter-spacing: -.01em;
  color: #fff;
}
.hp-sub { margin: 0 0 20px; font-size: 14px; line-height: 1.7; color: #cfe0f7; }

.hp-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 6px 6px 6px 14px;
  box-shadow: 0 6px 18px rgba(6, 24, 52, .18);
  max-width: 520px;
}
.hp-search i { color: #86909c; font-size: 18px; }
.hp-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: #1f2329; height: 34px;
}
.hp-search input::placeholder { color: #a8b0bd; }
.hp-search button {
  border: 0; cursor: pointer; height: 38px; padding: 0 20px;
  border-radius: 9px; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3d7bff, #165dff);
  transition: filter .15s ease;
}
.hp-search button:hover { filter: brightness(1.06); }

.hp-hero-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px; border-radius: 10px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: all .15s ease;
}
.hp-btn-main { background: #fff; color: #14559c; }
.hp-btn-main:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.hp-btn-ghost { background: rgba(255, 255, 255, .12); color: #eaf2ff; border: 1px solid rgba(255, 255, 255, .3); }
.hp-btn-ghost:hover { background: rgba(255, 255, 255, .2); }

/* ── 信任数据条 ── */
.hp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: #fff; border-radius: 14px; padding: 18px 8px;
  box-shadow: 0 2px 10px rgba(31, 35, 41, .05);
}
.hp-stat { text-align: center; position: relative; }
.hp-stat + .hp-stat::before {
  content: ''; position: absolute; left: 0; top: 12%; height: 76%; width: 1px; background: #eef0f4;
}
.hp-stat b { display: block; font-size: 24px; font-weight: 800; color: #165dff; letter-spacing: -.02em; }
.hp-stat span { display: block; margin-top: 4px; font-size: 12px; color: #86909c; }

/* ── 区块外壳 ── */
.hp-sec { background: #fff; border-radius: 14px; padding: 18px 20px 20px; box-shadow: 0 2px 10px rgba(31, 35, 41, .05); }
.hp-sec-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hp-sec-h h2 { margin: 0; font-size: 18px; font-weight: 800; color: #1f2329; }
.hp-sec-h p { margin: 4px 0 0; font-size: 12.5px; color: #86909c; line-height: 1.5; }
.hp-more {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
  font-size: 13px; color: #4e5969; text-decoration: none; padding-top: 3px;
  transition: color .15s ease;
}
.hp-more:hover { color: #165dff; }

/* ── 推荐教员 ── */
.hp-tutors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hp-tutor {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid #eef0f4; border-radius: 12px; padding: 14px;
  text-decoration: none; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hp-tutor:hover { border-color: #b9d0ff; box-shadow: 0 8px 20px rgba(22, 93, 255, .12); transform: translateY(-2px); }
.hp-tutor-top { display: flex; align-items: center; gap: 10px; }
.hp-ava {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8f0ff, #d3e2ff); color: #165dff;
  font-size: 16px; font-weight: 800;
}
.hp-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-ava-sm { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.hp-tutor-id { min-width: 0; flex: 1; }
.hp-name {
  margin: 0; display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 15px; font-weight: 700; color: #1f2329;
  overflow: hidden; text-overflow: ellipsis;
}
.hp-tag { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; line-height: 1.6; }
.hp-tag-top { color: #b25b00; background: linear-gradient(135deg, #fff1d6, #ffe0ac); border: 1px solid #ffd08a; }
.hp-tag-cert { color: #11734b; background: #e6f8ef; border: 1px solid #b7ebd2; }
.hp-lv { margin: 5px 0 0; font-size: 11px; font-weight: 700; color: #4e5969; }
.hp-lv0 { color: #86909c; }
.hp-lv1 { color: #1d7fd6; }
.hp-lv2 { color: #7a4dbf; }
.hp-lv3 { color: #b26a00; }

/* v1.0.5 等级 / 教龄 / 徽章：一行 chips，等级用分色胶囊，徽章描边取后台配色 */
.hp-tutor-badges { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hp-lv-tag, .hp-chip, .hp-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-style: normal; font-size: 11px; line-height: 1.6;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.hp-lv-tag { font-weight: 700; border: 1px solid transparent; }
.hp-lv-tag .remix-icon { font-size: 12px; }
.hp-lv-t0 { color: #6b7280; background: #f2f3f5; border-color: #e5e6eb; }
.hp-lv-t1 { color: #165dff; background: #eef3ff; border-color: #d2e0ff; }
.hp-lv-t2 { color: #7a4dbf; background: #f5eeff; border-color: #e2d3f7; }
.hp-lv-t3 { color: #b26a00; background: linear-gradient(135deg, #fff6e2, #ffe9c2); border-color: #f5d69b; }
.hp-chip { color: #4e5969; background: #f5f7fa; border: 1px solid #e9ecf2; }
.hp-chip .remix-icon { font-size: 12px; color: #86909c; }
.hp-badge { font-weight: 600; background: #fff; border: 1px solid currentColor; }
.hp-badge .remix-icon { font-size: 12px; }

.hp-tutor-meta { margin: 0; font-size: 12px; color: #86909c; line-height: 1.5; min-height: 18px; }
/* v1.0.3 卡片信息面补齐：科目标签 / 年级行 / 简介 */
.hp-tag-warn { color: #a85a1e; background: #fdf0e5; border: 1px solid #f2d8bd; }
.hp-tutor-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
/* v1.0.6 科目标签升级：实色渐变胶囊 + 白字，和彩色徽章同排也能一眼认出来 */
.hp-tag-subj {
  display: inline-flex; align-items: center; gap: 4px;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.7;
  color: #fff; background: linear-gradient(135deg, #4a7dff, #165dff);
  border: none; border-radius: 999px; padding: 2px 10px;
  box-shadow: 0 2px 6px rgba(22, 93, 255, .25);
}
.hp-tag-subj .remix-icon { font-size: 11px; color: rgba(255, 255, 255, .92); }
.hp-tutor-line { margin: 0; font-size: 12.5px; color: #4e5969; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-tutor-intro {
  margin: 0; font-size: 12px; color: #86909c; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-score em.hp-orders { margin-left: 6px; padding-left: 8px; border-left: 1px solid #eef0f4; }
.hp-tutor-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed #eef0f4;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hp-fee { font-size: 15px; font-weight: 800; color: #ff5c1c; }
.hp-fee i { font-style: normal; font-size: 11px; font-weight: 500; color: #86909c; margin-left: 1px; }
.hp-score { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: #1f2329; font-weight: 700; }
.hp-score i { color: #f7ba1e; font-size: 13px; }
.hp-score em { font-style: normal; font-size: 11px; font-weight: 500; color: #86909c; }

/* ── 最新需求 ── */
.hp-demands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hp-demand {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid #eef0f4; border-radius: 12px; padding: 14px;
  text-decoration: none; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hp-demand:hover { border-color: #ffd0ad; box-shadow: 0 8px 20px rgba(255, 92, 28, .1); }
.hp-demand-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hp-demand-h h3 {
  margin: 0; font-size: 14.5px; font-weight: 700; color: #1f2329; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-days {
  flex: 0 0 auto; font-size: 11px; color: #c2410c; background: #fff2e8;
  border-radius: 4px; padding: 2px 6px; white-space: nowrap;
}
.hp-days-long { color: #11734b; background: #e6f8ef; }
.hp-demand-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
/* v1.0.6 需求卡标签分色：区域绿 / 科目蓝实色 / 年级紫 / 方式灰，关键信息一眼扫到 */
.hp-dtag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; line-height: 1.7;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.hp-dtag .remix-icon { font-size: 11px; }
.hp-dtag.is-city { color: #11734b; background: #e6f8ef; border: 1px solid #b7ebd2; }
.hp-dtag.is-subj {
  color: #fff; background: linear-gradient(135deg, #4a7dff, #165dff); border: none;
  font-weight: 700; box-shadow: 0 2px 6px rgba(22, 93, 255, .22);
}
.hp-dtag.is-subj .remix-icon { color: rgba(255, 255, 255, .92); }
.hp-dtag.is-grade { color: #7a4dbf; background: #f5eeff; border: 1px solid #e2d3f7; }
.hp-dtag.is-mode { color: #4e5969; background: #f4f6fa; border: 1px solid #e9ecf2; }
.hp-demand-desc {
  margin: 0; font-size: 12px; color: #86909c; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-demand-f {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed #eef0f4;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hp-budget { font-size: 15px; font-weight: 800; color: #ff5c1c; }
.hp-budget i { font-style: normal; font-size: 11px; font-weight: 500; color: #86909c; margin-left: 1px; }
.hp-apply { font-size: 11.5px; color: #86909c; }

/* ── 双列：成单榜 + 社区精选 ── */
.hp-cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: start; }
.hp-sec-panel { height: 100%; }

.hp-ranks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hp-ranks a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 9px; text-decoration: none;
  transition: background .15s ease;
}
.hp-ranks a:hover { background: #f2f6ff; }
.hp-rk { flex: 0 0 20px; text-align: center; font-style: italic; font-weight: 800; font-size: 15px; color: #a8b0bd; }
.hp-rk1 { color: #ff5c1c; }
.hp-rk2 { color: #f7871f; }
.hp-rk3 { color: #d4a017; }
.hp-ranks b {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #1f2329;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hp-rk-meta { font-size: 11.5px; color: #86909c; white-space: nowrap; }

.hp-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-posts a { display: block; padding: 9px 8px; border-radius: 9px; text-decoration: none; transition: background .15s ease; }
.hp-posts a:hover { background: #f2f6ff; }
.hp-posts b {
  display: block; font-size: 14px; font-weight: 600; color: #1f2329; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-posts p {
  margin: 4px 0 0; font-size: 12.5px; color: #86909c; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-post-meta { display: block; margin-top: 5px; font-size: 11.5px; color: #a8b0bd; }

/* ── 服务流程 ── */
.hp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hp-step { position: relative; padding: 14px; border-radius: 12px; background: #f7f9fc; }
.hp-step em {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px; font-style: normal;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #3d7bff, #165dff);
  margin-bottom: 8px;
}
.hp-step b { display: block; font-size: 14px; color: #1f2329; }
.hp-step p { margin: 5px 0 0; font-size: 12.5px; color: #86909c; line-height: 1.6; }

/* ── 底部 CTA ── */
.hp-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, #0e2a54, #164a8a);
  border-radius: 14px; padding: 20px 24px; color: #fff;
}
.hp-cta b { font-size: 17px; }
.hp-cta p { margin: 5px 0 0; font-size: 13px; color: #cfe0f7; }
.hp-cta .hp-btn { flex: 0 0 auto; }

/* ── 骨架屏 / 空态 ── */
.hp-skel { display: flex; flex-direction: column; gap: 16px; }
.hp-skel-hero { height: 230px; border-radius: 18px; }
.hp-skel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hp-skel-row i, .hp-skel-grid i { display: block; height: 64px; border-radius: 12px; }
.hp-skel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hp-skel-grid i { height: 186px; }
.hp-skel-hero, .hp-skel-row i, .hp-skel-grid i {
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%);
  background-size: 400% 100%;
  animation: hpShimmer 1.3s ease-in-out infinite;
}
@keyframes hpShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.hp-empty { text-align: center; padding: 60px 20px; }
.hp-empty i { font-size: 40px; color: #c9d0da; }
.hp-empty p { margin: 12px 0 16px; color: #86909c; font-size: 14px; }
.hp-empty button {
  border: 1px solid #d6dbe4; background: #fff; color: #1f2329;
  border-radius: 9px; padding: 8px 18px; font-size: 14px; cursor: pointer;
}
.hp-empty button:hover { border-color: #165dff; color: #165dff; }

/* ── 响应式：中等屏 ── */
@media (max-width: 1080px) {
  .hp-tutors { grid-template-columns: repeat(3, 1fr); }
  .hp-demands { grid-template-columns: repeat(2, 1fr); }
  .hp-cols { grid-template-columns: 1fr; }
  .hp-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hp-hero-in { padding: 32px 24px 30px; }
  .hp-title { font-size: 24px; }
  .hp-tutors { grid-template-columns: repeat(2, 1fr); }
  .hp-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .hp-stat + .hp-stat::before { display: none; }
}

/* ── v1.0.9 首页身份条：教员等级 / 学员等级 / 家长信用分 ───────────────── */
.hp-me {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e6edff; border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 6px 18px rgba(22, 93, 255, .06);
}
.hp-me-ava {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf0ff; color: #165dff; font-size: 16px; font-weight: 700;
}
.hp-me-ava img { width: 100%; height: 100%; object-fit: cover; }
.hp-me-who { min-width: 120px; }
.hp-me-name { margin: 0; font-size: 14.5px; font-weight: 600; color: #1f2329; }
.hp-me-sub { margin: 2px 0 0; font-size: 12px; color: #86909c; }
.hp-me-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 320px; }
.hp-me-tags .hp-lv-tag { font-size: 12px; padding: 3px 9px; text-decoration: none; }
.hp-me-go { margin-left: auto; font-size: 13px; color: #165dff; text-decoration: none; white-space: nowrap; }
.hp-me-go:hover { text-decoration: underline; }
/* 第 5 档（金牌）——v1.23 起积分制 5 档，原样式只到 t3 */
.hp-lv-t4 { color: #a15c00; background: linear-gradient(135deg, #fff1cf, #ffdfa6); border-color: #eec26d; }
/* 学员等级：同形状换青蓝色系，和教员等级一眼区分 */
.hp-slv-s0 { color: #6b7280; background: #f2f3f5; border-color: #e5e6eb; }
.hp-slv-s1 { color: #0e7490; background: #eefbff; border-color: #cbebf7; }
.hp-slv-s2 { color: #0f766e; background: #eafaf7; border-color: #c6eee6; }
.hp-slv-s3 { color: #1d4ed8; background: #eef7ff; border-color: #cfe6ff; }
.hp-slv-s4 { color: #0a5fa8; background: linear-gradient(135deg, #e9f7ff, #d6eefe); border-color: #b6dcf7; }
.hp-lv-empty { color: #165dff; background: #f4f8ff; border: 1px dashed #bcd0f8; }
.hp-me-cr { color: #2f7d32; background: #f2fbf1; border-color: #d8e9d5; }
.hp-me-cr.is-bad { color: #c2410c; background: #fff4ef; border-color: #f7c7b6; }

/* v1.24.2 身份条积分可点开明细 / 距下一级提示 */
.hp-me-sub .hp-me-sign { color: #165dff; font-weight: 600; text-decoration: none; }
.hp-me-sub .hp-me-sign:hover { text-decoration: underline; }
.hp-me-sub .hp-me-next { margin-left: 8px; color: #86909c; }
.hp-me-sub .hp-me-next::before { content: '·'; margin-right: 8px; }
