/* ============================================================
   马上讲 (SpeakNow) 官网 - 全局样式
   主色调：蓝色 #2563EB（教育/科技）
   辅助色：白色 #FFFFFF、浅灰 #F8FAFC
   设计风格：简约高端、现代扁平化、教育风
   最后更新：2026-06
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-50: #EFF6FF;
  --accent: #3B82F6;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --text: #1E293B;
  --text-secondary: #475569;
  --text-light: #64748B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* 导航链接 */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-50);
}

/* 汉堡菜单按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(2) {
  margin: 5px 0;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu a {
  display: block;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary);
  background: var(--primary-50);
}

/* ---------- 页面标题区 ---------- */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Hero 横幅 ---------- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 30%, #F0F9FF 60%, #F8FAFC 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.3;
}

.hero h1 .highlight {
  color: var(--primary);
  position: relative;
}

.hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-50);
  transform: translateY(-1px);
}

/* ---------- 区块通用 ---------- */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

.section-gray {
  background: var(--gray-50);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.card-icon.blue {
  background: var(--primary-50);
  color: var(--primary);
}

.card-icon.green {
  background: #ECFDF5;
  color: #10B981;
}

.card-icon.orange {
  background: #FFF7ED;
  color: #F97316;
}

.card-icon.purple {
  background: #F5F3FF;
  color: #8B5CF6;
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

/* 三列网格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 两列网格 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* ---------- 优势列表 ---------- */
.advantages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.advantage-item {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.advantage-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.advantage-item .adv-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.advantage-item h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.advantage-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---------- 功能介绍详情（features.html） ---------- */
.feature-detail {
  padding: 60px 0;
  border-bottom: 1px solid var(--gray-100);
}

.feature-detail:last-child {
  border-bottom: none;
}

.feature-detail .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.feature-detail.reverse .container {
  direction: ltr; /* reset */
}

.feature-detail.reverse .feature-text {
  order: 2;
}

.feature-detail.reverse .feature-image {
  order: 1;
}

.feature-text h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.feature-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-tags span {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 20px;
}

.feature-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  background: var(--gray-50);
  border: 2px dashed var(--gray-200);
  color: var(--gray-300);
}

.feature-img-placeholder.blue-grad {
  background: linear-gradient(135deg, var(--primary-50), #E0F2FE);
  border: none;
  color: var(--primary);
}

.feature-img-placeholder.green-grad {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: none;
  color: #10B981;
}

.feature-img-placeholder.orange-grad {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  border: none;
  color: #F97316;
}

/* ---------- 关于我们 ---------- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0;
}

.about-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  margin-top: 40px;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.value-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.value-card .val-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.value-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.value-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* ---------- 师资力量 ---------- */
.teacher-standards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.standard-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
}

.standard-item .std-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius);
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.standard-item h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.standard-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.teacher-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ---------- 隐私政策 & 用户协议 ---------- */
.policy-content {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 0 60px;
}

.policy-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 36px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

.policy-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.policy-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 24px 0 10px;
}

.policy-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 14px;
}

.policy-content ul {
  margin: 12px 0 20px 20px;
  list-style: disc;
}

.policy-content ul li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.policy-content .update-date {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

/* ---------- 目标用户区域 ---------- */
.target-users {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.target-card {
  text-align: center;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.target-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.target-card .target-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.target-card h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.target-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---------- 底部 ---------- */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 16px;
  color: var(--gray-400);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--gray-400);
  padding: 5px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-500);
}

.icp-placeholder {
  color: var(--gray-500);
  font-style: italic;
  border-bottom: 1px dashed var(--gray-600);
  padding-bottom: 2px;
}

/* ---------- 滚动动画 ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式设计 ---------- */

/* 平板（≤1024px） */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .advantages {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .feature-detail .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .feature-detail .feature-image {
    order: -1 !important;
  }

  .feature-detail .feature-text {
    order: 0 !important;
  }

  .feature-tags {
    justify-content: center;
  }

  .teacher-standards {
    grid-template-columns: 1fr;
  }

  .about-values {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 手机（≤768px） */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  /* 导航 */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  /* 网格 */
  .grid-3,
  .grid-2,
  .advantages,
  .target-users,
  .about-values {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 区块 */
  .section {
    padding: 50px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .page-header {
    padding: 90px 0 40px;
  }

  /* 功能详情 */
  .feature-detail {
    padding: 40px 0;
  }

  .feature-detail .container {
    gap: 30px;
  }

  .feature-tags span {
    font-size: 12px;
    padding: 5px 12px;
  }

  /* 底部 */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* 按钮 */
  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* 卡片 */
  .card {
    padding: 28px 24px;
  }

  /* 政策页 */
  .policy-content {
    padding: 20px 0 40px;
  }

  .policy-content h2 {
    font-size: 19px;
  }

  .policy-content h3 {
    font-size: 16px;
  }
}

/* 小手机（≤480px） */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .card h3 {
    font-size: 18px;
  }
}
