/* ================================================
   首页（home） 深蓝科技风版式
   ================================================ */

/* ===== Hero ===== */
.hm-hero {
  position: relative;
  background: linear-gradient(135deg, #241a52 0%, #5b4fe8 60%, #7c72f0 100%);
  color: #fff;
  overflow: hidden;
}

.hm-hero::before,
.hm-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hm-hero::before {
  width: 480px;
  height: 480px;
  right: -140px;
  top: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
}

.hm-hero::after {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.hm-hero-inner {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 4rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hm-hero-left {
  flex: 1;
  min-width: 0;
}

.hm-hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 1.25rem;
}

.hm-hero-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.hm-hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hm-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #5b4fe8;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #fff;
}

.hm-btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  color: #4438c8;
}

.hm-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: all 0.2s;
}

.hm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero 统计 */
.hm-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
}

.hm-hero-stat {
  padding-right: 2.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.hm-hero-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.hm-hero-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hm-hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Hero 右侧课程卡片 */
.hm-hero-right {
  width: 400px;
  flex-shrink: 0;
}

.hm-hero-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(36, 26, 82, 0.35);
  overflow: hidden;
}

.hm-hero-card-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.hm-hero-chip {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff7a3d, #ffc93c);
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.hm-hero-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hm-hero-course {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.hm-hero-course:hover {
  background: #f5f3ff;
}

.hm-hero-course-img {
  width: 72px;
  height: 46px;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.hm-hero-course-info {
  flex: 1;
  min-width: 0;
}

.hm-hero-course-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-hero-course-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.hm-hero-course-meta .hm-star {
  color: #ffc93c;
  margin-right: 0.125rem;
}

.hm-free-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffc93c;
  background: #fff4d1;
  border: 1px solid #ffd9bf;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.hm-hero-card-foot {
  display: block;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5b4fe8;
  text-decoration: none;
  padding: 0.875rem;
  border-top: 1px solid var(--border-color);
  background: #f5f3ff;
  transition: background-color 0.15s;
}

.hm-hero-card-foot:hover {
  background: #f5f3ff;
  color: #4438c8;
}

/* ===== 通用区块 ===== */
.hm-section {
  padding: 3.75rem 0;
}

.hm-section-gray {
  background: #faf9ff;
}

.hm-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hm-sec-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.hm-sec-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0.375rem 0 0;
}

.hm-sec-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b4fe8;
  text-decoration: none;
  white-space: nowrap;
}

.hm-sec-link:hover {
  color: #4438c8;
}

.hm-sec-head-center {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== 课程分类 ===== */
.hm-cat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 1.375rem;
  text-decoration: none;
  transition: all 0.2s;
  height: 100%;
}

.hm-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(36, 26, 82, 0.08);
  border-color: rgba(91, 79, 232, 0.35);
}

.hm-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.hm-cat-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hm-cat-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* 分类图标配色（循 8 色） */
.hm-cat-row > div:nth-child(8n+1) .hm-cat-icon { background: linear-gradient(135deg, #ff6a5e, #e5484d); }
.hm-cat-row > div:nth-child(8n+2) .hm-cat-icon { background: linear-gradient(135deg, #ffe484, #f97316); }
.hm-cat-row > div:nth-child(8n+3) .hm-cat-icon { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.hm-cat-row > div:nth-child(8n+4) .hm-cat-icon { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.hm-cat-row > div:nth-child(8n+5) .hm-cat-icon { background: linear-gradient(135deg, #34d399, #16a34a); }
.hm-cat-row > div:nth-child(8n+6) .hm-cat-icon { background: linear-gradient(135deg, #f472b6, #db2777); }
.hm-cat-row > div:nth-child(8n+7) .hm-cat-icon { background: linear-gradient(135deg, #ffe484, #d97706); }
.hm-cat-row > div:nth-child(8n+8) .hm-cat-icon { background: linear-gradient(135deg, #60a5fa, #5b4fe8); }

/* ===== 精选课 ===== */
.hm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hm-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s;
}

.hm-pill:hover {
  border-color: rgba(91, 79, 232, 0.4);
  color: #5b4fe8;
}

.hm-pill.active {
  background: #5b4fe8;
  border-color: #5b4fe8;
  color: #fff;
}

.hm-course-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: all 0.2s;
  height: 100%;
}

.hm-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(36, 26, 82, 0.1);
}

.hm-course-cover {
  position: relative;
  height: 168px;
  background: var(--bg-muted);
  overflow: hidden;
}

.hm-course-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hm-course-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(91, 79, 232, 0.92);
  padding: 0.2rem 0.625rem;
  border-radius: 0.375rem;
}

.hm-course-body {
  padding: 1rem 1.125rem 1.125rem;
}

.hm-course-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0;
}

.hm-course-teacher {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.hm-course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px dashed var(--border-color);
}

.hm-course-score {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffc93c;
}

.hm-course-extra {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hm-more-wrap {
  text-align: center;
  margin-top: 2.25rem;
}

.hm-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b4fe8;
  border: 1px solid rgba(91, 79, 232, 0.45);
  background: #fff;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.15s;
}

.hm-btn-outline:hover {
  background: #5b4fe8;
  color: #fff;
}

/* ===== 双色 Banner ===== */
.hm-banner {
  border-radius: 1rem;
  padding: 2.5rem;
  color: #fff;
  min-height: 216px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hm-banner-orange {
  background: linear-gradient(135deg, #ffe484 0%, #ffc93c 100%);
}

.hm-banner-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #241a52 100%);
}

.hm-banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hm-banner-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.875rem;
}

.hm-banner-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.hm-banner-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 420px;
}

.hm-banner .hm-btn-white {
  align-self: flex-start;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.hm-banner .btn-outline-light {
  align-self: flex-start;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ===== 热门文章（三组排行卡，样式同管理员 Top5）===== */
.hm-rank-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem 1rem;
  height: 100%;
}

.hm-rank-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
}

.hm-rank-bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #5b4fe8;
}

.hm-rank-sub {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hm-rank-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5625rem 0;
  text-decoration: none;
}

a.hm-rank-item:hover .hm-rank-title {
  color: #5b4fe8;
}

/* 序号：浅橙底 + 橙色数字 */
.hm-rank-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #fff4d1;
  color: #ffc93c;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-rank-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.hm-rank-count {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #8a83a8;
  white-space: nowrap;
}

.hm-rank-empty {
  padding: 1.75rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===== 平台优势 ===== */
.hm-feat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  height: 100%;
  transition: all 0.2s;
}

.hm-feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(36, 26, 82, 0.08);
}

.hm-feat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1.125rem;
}

.hm-feat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hm-feat-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ===== 热门职业方向 ===== */
.hm-career-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.125rem 1.375rem;
  transition: all 0.2s;
  height: 100%;
}

.hm-career-row:hover {
  border-color: rgba(91, 79, 232, 0.35);
  box-shadow: 0 8px 22px rgba(36, 26, 82, 0.07);
}

.hm-career-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.hm-career-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hm-career-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.hm-career-salary {
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #5b4fe8;
  white-space: nowrap;
}

/* ===== 学员故事 ===== */
.hm-story-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.hm-story-card:hover {
  box-shadow: 0 10px 26px rgba(36, 26, 82, 0.07);
}

.hm-story-stars {
  color: #ffc93c;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.hm-story-text {
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.7;
  flex-grow: 1;
  margin: 0;
}

.hm-story-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.125rem;
}

.hm-story-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.hm-story-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hm-story-role {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ===== 常见问题 ===== */
.hm-faq .accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.hm-faq .accordion-button {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 1.125rem 1.25rem;
}

.hm-faq .accordion-button:not(.collapsed) {
  color: #5b4fe8;
  background: #f6f9ff;
}

.hm-faq .accordion-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 1.25rem;
}

/* ===== 底部 CTA ===== */
.hm-cta {
  background: linear-gradient(135deg, #5b4fe8 0%, #241a52 100%);
  border-radius: 1.25rem;
  padding: 3.5rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hm-cta::before,
.hm-cta::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hm-cta::before {
  width: 260px;
  height: 260px;
  left: -80px;
  top: -80px;
}

.hm-cta::after {
  width: 200px;
  height: 200px;
  right: -60px;
  bottom: -80px;
}

.hm-cta-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.125rem;
  font-weight: 700;
  margin: 0 0 0.875rem;
  position: relative;
  z-index: 1;
}

.hm-cta-sub {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin: 0 auto 1.75rem;
  position: relative;
  z-index: 1;
}

.hm-cta .hm-btn-white {
  position: relative;
  z-index: 1;
}

/* ===== 响应 ===== */
@media (max-width: 1199.98px) {
  .hm-hero-right {
    width: 360px;
  }
}

@media (max-width: 991.98px) {
  .hm-hero-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 3.5rem 0 3rem;
    gap: 2.5rem;
  }

  .hm-hero-title {
    font-size: 2.25rem;
  }

  .hm-hero-right {
    width: 100%;
    max-width: 440px;
  }

  .hm-hero-stats {
    gap: 1.5rem;
  }

  .hm-hero-stat {
    padding-right: 1.5rem;
  }

  .hm-sec-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .hm-hero-title {
    font-size: 1.875rem;
  }

  .hm-hero-stat {
    border-right: none;
    padding-right: 0;
    width: 50%;
  }

  .hm-banner {
    padding: 1.75rem;
  }

  .hm-career-salary {
    margin-left: 0;
  }

  .hm-career-row {
    flex-wrap: wrap;
  }
}
