/* ============================================================
   Homepage — 首页专属样式 V2
   ============================================================ */

/* ===== HERO 区域 ===== */
.v2-hero {
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}

/* 浮动几何装饰 */
.v2-hero__geo {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.v2-hero__geo--1 {
  width: 400px;
  height: 400px;
  background: #fff;
  top: -100px;
  right: -80px;
  animation: v2-float-geo-1 8s ease-in-out infinite;
}

.v2-hero__geo--2 {
  width: 250px;
  height: 250px;
  background: #fff;
  bottom: -60px;
  left: 10%;
  animation: v2-float-geo-2 10s ease-in-out infinite;
}

.v2-hero__geo--3 {
  width: 120px;
  height: 120px;
  background: #fff;
  top: 30%;
  right: 40%;
  animation: v2-float-geo-3 7s ease-in-out infinite;
}

.v2-hero__geo--4 {
  width: 80px;
  height: 80px;
  background: var(--color-secondary);
  opacity: 0.06;
  bottom: 20%;
  right: 25%;
  animation: v2-float-geo-2 6s ease-in-out infinite reverse;
}

/* Hero 内容 */
.v2-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  position: relative;
  z-index: 2;
  padding: var(--space-4xl) 0;
}

.v2-hero__text {
  flex: 1;
  color: #fff;
}

.v2-hero__title {
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  letter-spacing: 2px;
}

.v2-hero__subtitle {
  font-size: var(--text-xl);
  font-weight: 300;
  opacity: 0.85;
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.v2-hero__stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  font-size: var(--text-base);
  opacity: 0.8;
}

.v2-hero__stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hero CTA 按钮组 */
.v2-hero__cta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

/* Hero 右侧表单 */
.v2-hero__form-wrap {
  width: 380px;
  flex-shrink: 0;
}

.v2-hero-form {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.v2-hero-form__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
}

.v2-hero-form__subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.v2-hero-form .v2-input,
.v2-hero-form .v2-select {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.v2-hero-form .v2-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.v2-hero-form .v2-input:focus,
.v2-hero-form .v2-select:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.v2-hero-form .v2-select {
  color: rgba(255, 255, 255, 0.7);
}

.v2-hero-form .v2-select option {
  color: var(--color-heading);
  background: #fff;
}

.v2-hero-form .v2-btn {
  width: 100%;
  margin-top: var(--space-sm);
}

.v2-hero-form__result {
  margin-top: var(--space-sm);
  text-align: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  display: none;
}

/* Hero 响应式 */
@media (max-width: 1024px) {
  .v2-hero__inner {
    flex-direction: column;
    text-align: center;
  }

  .v2-hero__stats {
    justify-content: center;
  }

  .v2-hero__cta {
    justify-content: center;
  }

  .v2-hero__form-wrap {
    width: 100%;
    max-width: 420px;
  }

  .v2-hero__title {
    font-size: var(--text-5xl);
  }
}

/* ===== Hero 底部波浪过渡 ===== */
.v2-hero {
  padding-bottom: 80px; /* 给波浪腾空间 */
}

.v2-hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 3;
  pointer-events: none;
}

.v2-hero-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== 增强 section-two：为什么学编程 ===== */
.v2-benefits {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
  background-image: url(../images/section2-bg.jpg);
  background-position: center bottom;
  background-repeat: no-repeat;
}

.v2-benefits__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.v2-benefits__grid {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.v2-benefit-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(180deg, #86adfa, #578dfa);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.v2-benefit-circle:hover {
  background: var(--gradient-success);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.v2-benefit-circle:nth-child(1) { animation: v2-float 3.5s ease-in-out infinite; }
.v2-benefit-circle:nth-child(2) { animation: v2-float 3.5s ease-in-out 0.3s infinite; }
.v2-benefit-circle:nth-child(3) { animation: v2-float 3.5s ease-in-out 0.6s infinite; }
.v2-benefit-circle:nth-child(4) { animation: v2-float 3.5s ease-in-out 0.9s infinite; }

.v2-benefit-circle__label1 {
  font-size: var(--text-xl);
  margin-bottom: 4px;
}

.v2-benefit-circle__label2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: 4px;
}

.v2-benefit-circle__label3 {
  font-size: var(--text-xl);
}

/* ===== 增强 section-four：教师展示 ===== */
.v2-teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.v2-teacher-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.v2-teacher-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.v2-teacher-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gradient-hero);
  margin: 0 auto var(--space-md);
  overflow: hidden;
}

.v2-teacher-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-teacher-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 8px;
}

.v2-teacher-card__title {
  font-size: var(--text-sm);
  color: var(--color-heading);
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.v2-teacher-card__highlights {
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--color-caption);
  line-height: 2;
}

/* 教师区域响应式 */
@media (max-width: 1024px) {
  .v2-teachers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .v2-teachers-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 增强 section-five：课程语言 + 年龄筛选 ===== */
.v2-age-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.v2-age-filter__btn {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-bg-white);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.v2-age-filter__btn:hover,
.v2-age-filter__btn--active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

/* ===== 学生作品展示 ===== */
.v2-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .v2-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .v2-projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 学员作品轮播 ===== */
.v2-works-swiper {
  max-width: 900px;
  margin: 0 auto;
}

.v2-works-slide__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: var(--text-sm);
  text-align: center;
}

/* ===== 竞赛荣誉 ===== */
.v2-awards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .v2-awards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .v2-awards-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 大事记时间轴 ===== */
.v2-timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

.v2-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-hero);
  border-radius: 2px;
  transform: translateX(-50%);
}

.v2-timeline__item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
  position: relative;
}

.v2-timeline__item:nth-child(odd) {
  flex-direction: row;
}

.v2-timeline__item:nth-child(even) {
  flex-direction: row-reverse;
}

.v2-timeline__content {
  width: 45%;
  background: var(--color-bg-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.v2-timeline__dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 4px solid var(--color-bg);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.v2-timeline__year {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.v2-timeline__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
}

/* 时间轴响应式 */
@media (max-width: 768px) {
  .v2-timeline::before {
    left: 20px;
  }

  .v2-timeline__item,
  .v2-timeline__item:nth-child(even) {
    flex-direction: row;
  }

  .v2-timeline__content {
    width: calc(100% - 50px);
    margin-left: 50px;
  }

  .v2-timeline__dot {
    left: 20px;
  }
}

/* ===== 校区地图增强 ===== */
.v2-campus__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.v2-campus__count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

/* ===== 合作伙伴 Logo 墙 ===== */
.v2-partners {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-white);
}

.v2-partners__title {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--color-caption);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-2xl);
}

/* ===== 课程进阶体系 Pathway ===== */
.v2-pathway {
  position: relative;
  padding: 8px 0 24px;
}

.v2-pathway__track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
}

/* 阶段卡片容器 */
.v2-pathway-step {
  flex: 0 0 230px;
  position: relative;
  /* 阶梯上升效果：每个阶段比前一个高 24px */
  transform: translateY(calc(var(--step-index) * -24px));
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  z-index: 1;
}

.v2-pathway-step:hover {
  transform: translateY(calc(var(--step-index) * -24px - 8px));
  z-index: 5;
}

.v2-pathway-step__card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.v2-pathway-step:hover .v2-pathway-step__card {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 顶部色条 */
.v2-pathway-step__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--step-color);
  border-radius: 20px 20px 0 0;
}

/* 图标圆形容器 */
.v2-pathway-step__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--step-color);
  position: relative;
  transition: all var(--transition-base);
}

.v2-pathway-step__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--step-color);
  opacity: 0.07;
  transition: all var(--transition-base);
}

.v2-pathway-step:hover .v2-pathway-step__icon {
  color: #fff;
  transform: scale(1.08);
}

.v2-pathway-step:hover .v2-pathway-step__icon::after {
  opacity: 1;
  background: var(--step-color);
}

.v2-pathway-step__age {
  display: inline-block;
  padding: 4px 14px;
  background: #f5f6fa;
  color: var(--step-color);
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 10px;
}

.v2-pathway-step__name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 10px;
}

.v2-pathway-step__desc {
  font-size: var(--text-sm);
  color: var(--color-caption);
  line-height: 1.8;
  margin-bottom: 14px;
}

.v2-pathway-step__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--step-color);
  border: 1px solid rgba(128, 128, 128, 0.2);
  text-transform: uppercase;
}

/* 连接器 */
.v2-pathway-connector {
  flex: 0 0 40px;
  height: 3px;
  align-self: center;
  margin: 0 -6px;
  position: relative;
  z-index: 0;
  /* 渐变从左侧颜色到右侧颜色 */
  background: linear-gradient(90deg, var(--from), var(--to));
  border-radius: 2px;
  transform: translateY(-12px);
}

/* 连接器上的小圆点 */
.v2-pathway-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--to);
  box-shadow: 0 0 0 3px rgba(128,128,128,0.15);
}

/* 连接器上的起始点 */
.v2-pathway-connector::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--from);
  box-shadow: 0 0 0 3px rgba(128,128,128,0.15);
}

/* 响应式：平板 */
@media (max-width: 1200px) {
  .v2-pathway-step {
    flex: 0 0 200px;
  }
  .v2-pathway-connector {
    flex: 0 0 24px;
  }
}

/* 响应式：移动端纵向排列 */
@media (max-width: 768px) {
  .v2-pathway__track {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .v2-pathway-step {
    transform: none !important;
    flex: 0 0 auto;
    width: 100%;
    max-width: 340px;
  }

  .v2-pathway-step:hover {
    transform: translateY(-4px) !important;
  }

  /* 连接器改为纵向 */
  .v2-pathway-connector {
    width: 3px;
    height: 40px;
    flex: 0 0 40px;
    background: linear-gradient(180deg, var(--from), var(--to));
    transform: none;
  }
}

/* ===== 学员口碑卡片 ===== */
.v2-testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.v2-testimonial-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.v2-testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.v2-testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.v2-testimonial-card__stars {
  color: #F5A623;
  font-size: var(--text-lg);
  letter-spacing: 4px;
  margin-bottom: var(--space-md);
}

.v2-testimonial-card__quote {
  flex: 1;
  font-size: var(--text-base);
  color: var(--color-body);
  line-height: 2;
  position: relative;
  padding-left: 28px;
  margin-bottom: var(--space-lg);
}

/* 引号装饰 */
.v2-testimonial-card__quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -6px;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.v2-testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.v2-testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.v2-testimonial-card__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
}

.v2-testimonial-card__name span {
  font-weight: 400;
  color: var(--color-caption);
  font-size: var(--text-sm);
  margin-left: 2px;
}

.v2-testimonial-card__meta {
  font-size: var(--text-sm);
  color: var(--color-caption);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .v2-testimonials {
    grid-template-columns: 1fr;
  }
}

/* ===== 旧区域覆盖（保留原 HTML class，覆盖旧 CSS 固定尺寸） ===== */

/* section-one：旧 CSS height:700px 导致 swiper 区域过高 */
.section-one .section-container {
  height: auto;
  background-image: none;
}

/* section-four：旧 CSS height:1060px + 教师面板绝对定位覆盖 */
.section-four {
  height: auto !important;
}

.section-four .section-container {
  height: auto !important;
}

.section-four .section-info {
  position: relative;
  top: auto;
  right: auto;
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* 旧教师面板兼容新版 V2 布局 — 内联 style 已有覆盖，此处兜底 */
.teacher-panel {
  position: relative !important;
  width: 100% !important;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
  height: auto !important;
}

.teacher-male,
.teacher-female {
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-bottom: var(--space-lg);
}

.teacher-male .teacher-info,
.teacher-female .teacher-info {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  padding: 24px !important;
}

.teacher-male .teacher-avatar,
.teacher-female .teacher-avatar {
  position: relative;
  left: auto !important;
  right: auto !important;
  margin: 0 auto 16px;
  display: block;
}

.teacher-name {
  position: relative;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  text-align: center;
  margin-bottom: var(--space-md);
}

/* section-seven：学员口碑区域 */
.section-seven {
  padding-bottom: 0;
}

.student {
  height: auto !important;
  margin-top: var(--space-lg) !important;
}

.student-info {
  position: relative;
  height: auto;
  text-align: center;
  margin-bottom: var(--space-md);
}

.student:nth-of-type(1) .student-letter,
.student:nth-of-type(2) .student-letter {
  width: 100% !important;
  float: none !important;
}

.student:nth-of-type(1) .student-video,
.student:nth-of-type(2) .student-video {
  width: 100% !important;
  float: none !important;
  margin-top: var(--space-md);
}

/* section-eight：大事记覆盖旧样式 */
.section-eight {
  height: auto !important;
}

/* section-nine：校区地图约束 */
.section-nine .schoolList_map {
  max-width: 100%;
  background-size: contain;
}

@media (max-width: 768px) {
  .course-list .course-item {
    width: 100%;
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin-bottom: var(--space-md);
  }
}
