/* 思码乐极客战队 - 青少年科创教育风格 */
:root {
  --primary: #4f6ef7;
  --primary-dark: #3a56d4;
  --secondary: #ff8c42;
  --accent: #2dd4bf;
  --accent-pink: #f472b6;
  --purple: #8b5cf6;
  --bg: #f0f4ff;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 30px rgba(79, 110, 247, 0.12);
  --shadow-hover: 0 12px 40px rgba(79, 110, 247, 0.2);
  --font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== 顶部导航 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(79, 110, 247, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(79, 110, 247, 0.25);
}

.site-name {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-tabs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.nav-tab-icon,
.nav-tab-label {
  position: relative;
  z-index: 1;
}

.nav-tab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(79, 110, 247, 0.25);
  color: #fff;
  border-color: transparent;
}

.nav-tab:hover::before {
  opacity: 1;
}

.nav-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 24px rgba(79, 110, 247, 0.4);
  transform: translateY(-2px);
}

.nav-tab.is-active::before {
  opacity: 0;
}

.header-cta {
  flex-shrink: 0;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--secondary), #ff6b35);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}

.header-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(255, 140, 66, 0.5);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== 页脚 ========== */
.site-footer {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #cbd5e1;
  padding: 48px 24px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-brand .site-name {
  -webkit-text-fill-color: #fff;
  color: #fff;
  font-size: 1.2rem;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-links h4,
.footer-contact h4 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  display: block;
  padding: 4px 0;
  opacity: 0.85;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-bottom a {
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.footer-bottom .footer-sep {
  opacity: 0.85;
}

/* ========== 通用区块 ========== */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.section {
  padding: 56px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 1.05rem;
}

.section-title .title-badge {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.15), rgba(139, 92, 246, 0.15));
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ========== 轮播图 ========== */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 24px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 21 / 8;
  min-height: 280px;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
  color: #fff;
}

.carousel-caption h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-caption p {
  font-size: 1.1rem;
  opacity: 0.95;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: 0.25s;
  z-index: 10;
}

.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 16px;
}

.carousel-btn.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: 0.3s;
}

.carousel-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: 0.35s;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(79, 110, 247, 0.2);
  box-shadow: var(--shadow-hover);
}

.feature-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 图文卡片 */
.media-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 32px;
  transition: 0.35s;
}

.media-card:hover {
  box-shadow: var(--shadow-hover);
}

.media-card.reverse {
  direction: rtl;
}

.media-card.reverse > * {
  direction: ltr;
}

.media-card-img {
  min-height: 240px;
  overflow: hidden;
}

.media-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.media-card:hover .media-card-img img {
  transform: scale(1.05);
}

.media-card-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.media-card-body h3 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.media-card-body p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.12), rgba(45, 212, 191, 0.12));
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========== 数据条 ========== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: var(--radius-lg);
  padding: 36px;
  color: #fff;
  margin: 40px 0;
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.stat-item span {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ========== 课程路径时间线 ========== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 28px;
  width: 16px;
  height: 16px;
  background: var(--secondary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--primary);
}

/* ========== 联系表单 ========== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info-card {
  background: linear-gradient(160deg, var(--primary) 0%, var(--purple) 100%);
  color: #fff;
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}

.contact-info-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-info-item .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.contact-campus-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
}

.contact-qr {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  display: block;
}

.contact-wechat-block p {
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.form-card {
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.form-card .form-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group label .required {
  color: #ef4444;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.15);
}

.course-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.course-option {
  position: relative;
}

.course-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.course-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: 0.25s;
  text-align: center;
  font-weight: 600;
}

.course-option label .course-icon {
  font-size: 2rem;
}

.course-option input:checked + label {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.08), rgba(139, 92, 246, 0.08));
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(79, 110, 247, 0.2);
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
  margin-top: 8px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 110, 247, 0.4);
}

.form-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

.form-success {
  display: none;
  padding: 20px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(79, 110, 247, 0.1));
  border-radius: var(--radius);
  text-align: center;
  color: var(--primary-dark);
  font-weight: 600;
}

.form-success.is-show {
  display: block;
}

/* ========== 页面横幅 ========== */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 50%, var(--accent-pink) 100%);
  padding: 48px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
}

.page-banner h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-banner p {
  opacity: 0.95;
  font-size: 1.1rem;
}

/* ========== 小班特色 ========== */
.class-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-box {
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}

.compare-box.bad {
  background: #fef2f2;
  border: 2px dashed #fca5a5;
}

.compare-box.good {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(79, 110, 247, 0.1));
  border: 2px solid var(--accent);
}

.compare-box h4 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.compare-box ul {
  list-style: none;
  text-align: left;
}

.compare-box li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.compare-box.bad li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #ef4444;
}

.compare-box.good li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

/* ========== 竞赛徽章 ========== */
.competition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.competition-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border-top: 4px solid var(--secondary);
  box-shadow: var(--shadow);
  transition: 0.3s;
}

.competition-card:hover {
  transform: translateY(-6px);
}

.competition-card .badge {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.competition-card h4 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.competition-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== CTA 条 ========== */
.cta-strip {
  background: linear-gradient(90deg, var(--secondary), #ff6b35);
  color: #fff;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0;
}

.cta-strip h3 {
  font-size: 1.4rem;
}

.cta-strip a {
  padding: 12px 28px;
  background: #fff;
  color: var(--secondary);
  font-weight: 700;
  border-radius: 50px;
  transition: 0.25s;
}

.cta-strip a:hover {
  transform: scale(1.05);
}

/* ========== 图片占位说明 ========== */
.img-replace-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
  .media-card {
    grid-template-columns: 1fr;
  }

  .media-card.reverse {
    direction: ltr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    transition: 0.35s;
    pointer-events: none;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-tabs {
    flex-direction: column;
  }

  .header-cta {
    display: none;
  }

  .site-name {
    font-size: 0.95rem;
  }

  .carousel-caption h1 {
    font-size: 1.4rem;
  }

  .course-options {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }
}
