/* ============================================================
   慧苗早教 官网样式  styles.css
   设计基调：温暖、活泼、童趣，同时保持专业可信
   ============================================================ */

:root {
  --c-primary: #ff8a3d;      /* 暖橙 主色 */
  --c-primary-d: #f56f1e;
  --c-secondary: #4dabf7;    /* 天蓝 */
  --c-accent: #ffd43b;       /* 阳光黄 */
  --c-pink: #ff6b9d;
  --c-green: #51cf66;
  --c-purple: #9775fa;

  --c-ink: #2b2b3a;          /* 主文字 */
  --c-gray: #6b6b7b;         /* 次文字 */
  --c-bg: #fffaf4;           /* 暖白背景 */
  --c-bg-alt: #fff3e6;
  --c-white: #ffffff;
  --c-line: #ffe6d0;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 6px 20px rgba(255, 138, 61, 0.12);
  --shadow-md: 0 14px 40px rgba(255, 138, 61, 0.18);
  --shadow-lg: 0 24px 60px rgba(43, 43, 58, 0.14);
  --max: 1160px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }

.eyebrow {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-primary-d);
  background: var(--c-bg-alt);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow-light { color: #fff; background: rgba(255, 255, 255, 0.22); }

.grad-text {
  background: linear-gradient(120deg, var(--c-primary), var(--c-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-weight: 700; font-size: 1rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: none; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(120deg, var(--c-primary), var(--c-primary-d));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: var(--c-white); color: var(--c-primary-d);
  border: 2px solid var(--c-line);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--c-primary); }
.btn-sm { padding: 10px 22px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ============ 顶部导航 ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 250, 244, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(43, 43, 58, 0.08); background: rgba(255, 250, 244, 0.95); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.35rem; }
.brand-mark { font-size: 1.6rem; }
.brand-text em { color: var(--c-primary-d); font-style: normal; }

.nav { display: flex; gap: 6px; }
.nav-link {
  position: relative; padding: 8px 16px; font-weight: 600; color: var(--c-gray);
  border-radius: 999px; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--c-ink); }
.nav-link.active { color: var(--c-primary-d); background: var(--c-bg-alt); }

.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  background: none; border: none; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { width: 24px; height: 3px; background: var(--c-ink); border-radius: 3px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ Hero 首页 ============ */
.hero {
  position: relative; padding: 140px 0 90px;
  background: linear-gradient(160deg, #fff7ee 0%, #ffeede 60%, #ffe7f0 100%);
  overflow: hidden;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; z-index: 0; }
.hero-blob-1 { width: 340px; height: 340px; background: radial-gradient(circle, #ffd9a8, transparent 70%); top: -60px; right: -40px; }
.hero-blob-2 { width: 300px; height: 300px; background: radial-gradient(circle, #c5e4ff, transparent 70%); bottom: -80px; left: -60px; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.hero-content h1 { margin: 6px 0 18px; }
.hero-sub { font-size: 1.12rem; color: var(--c-gray); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 42px; }

.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 2.1rem; color: var(--c-primary-d); line-height: 1.1; }
.hero-stats span { font-size: .9rem; color: var(--c-gray); }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 320px; height: 320px; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: linear-gradient(140deg, var(--c-primary), var(--c-pink));
  box-shadow: var(--shadow-md); animation: morph 9s ease-in-out infinite;
}
.hero-visual::after { content: "🧒"; position: absolute; font-size: 9rem; z-index: 1; animation: float 4s ease-in-out infinite; }
@keyframes morph {
  0%,100% { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; }
  50% { border-radius: 58% 42% 44% 56% / 48% 56% 44% 52%; }
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.hero-card {
  position: absolute; bottom: 14px; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-md);
}
.hero-emoji { font-size: 1.8rem; }
.hero-card-text { font-size: .9rem; color: var(--c-gray); }
.hero-card-text b { color: var(--c-primary-d); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-green); margin-right: 4px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(81,207,102,.5);} 70% { box-shadow: 0 0 0 8px rgba(81,207,102,0);} }

/* ============ 优势条 ============ */
.features { padding: 60px 0; background: var(--c-white); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { text-align: center; padding: 28px 18px; border-radius: var(--radius); background: var(--c-bg); transition: transform .3s, box-shadow .3s; }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }
.feature-icon { font-size: 2.6rem; margin-bottom: 10px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { font-size: .92rem; color: var(--c-gray); }

/* ============ 通用区块 ============ */
.section { padding: 90px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-desc { color: var(--c-gray); font-size: 1.05rem; margin-top: 10px; }

/* ============ 关于我们 ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.about-media { position: relative; min-height: 380px; }
.about-photo {
  position: absolute; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
  font-size: 6rem; box-shadow: var(--shadow-md);
}
.about-photo-1 { width: 70%; height: 300px; top: 0; left: 0; background: linear-gradient(140deg,#ffe0c2,#ffc9d9); }
.about-photo-2 { width: 55%; height: 220px; bottom: 0; right: 0; background: linear-gradient(140deg,#c5e4ff,#d9c9ff); }
.about-badge {
  position: absolute; top: 50%; left: 58%; transform: translate(-50%,-50%); z-index: 3;
  background: #fff; border-radius: 18px; padding: 14px 20px; text-align: center; box-shadow: var(--shadow-lg);
}
.about-badge strong { display: block; font-size: 1.8rem; color: var(--c-primary-d); }
.about-badge span { font-size: .82rem; color: var(--c-gray); }

.about-content h2 { margin: 6px 0 18px; }
.about-content p { color: var(--c-gray); margin-bottom: 14px; }
.check-list { margin: 18px 0 26px; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--c-ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; background: var(--c-green); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 900;
}

/* ============ 课程体系 ============ */
.program-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.program-card {
  position: relative; background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column;
}
.program-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.program-card.featured { outline: 3px solid var(--c-primary); }
.program-tag {
  position: absolute; top: 14px; right: -34px; z-index: 2;
  background: var(--c-pink); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 5px 40px; transform: rotate(45deg); box-shadow: var(--shadow-sm);
}
.program-head {
  height: 120px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  color: #fff;
}
.program-head-a { background: linear-gradient(135deg,#ffb37a,#ff8a3d); }
.program-head-b { background: linear-gradient(135deg,#74c0fc,#4dabf7); }
.program-head-c { background: linear-gradient(135deg,#ff9bb8,#ff6b9d); }
.program-head-d { background: linear-gradient(135deg,#b197fc,#9775fa); }
.program-age { font-weight: 800; font-size: 1.05rem; background: rgba(255,255,255,.25); padding: 4px 12px; border-radius: 999px; }
.program-emoji { font-size: 2.6rem; }
.program-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.program-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.program-body > p { font-size: .92rem; color: var(--c-gray); margin-bottom: 14px; }
.program-body ul { margin-bottom: 18px; }
.program-body ul li { position: relative; padding-left: 20px; font-size: .9rem; color: var(--c-ink); margin-bottom: 7px; }
.program-body ul li::before { content: "•"; position: absolute; left: 4px; color: var(--c-primary); font-weight: 900; }
.program-link { margin-top: auto; font-weight: 700; color: var(--c-primary-d); transition: gap .2s; }
.program-link:hover { color: var(--c-primary); }

/* ============ 环境与成果 ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 18px; margin-bottom: 70px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: #fff; cursor: pointer; transition: transform .35s;
}
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-size: .95rem; font-weight: 700;
  text-align: left; opacity: 0; transform: translateY(10px); transition: .3s;
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }
.g-1 { background: linear-gradient(135deg,#ffb37a,#ff8a3d); }
.g-2 { background: linear-gradient(135deg,#74c0fc,#4dabf7); }
.g-3 { background: linear-gradient(135deg,#ff9bb8,#ff6b9d); }
.g-4 { background: linear-gradient(135deg,#b197fc,#9775fa); }
.g-5 { background: linear-gradient(135deg,#69db7c,#51cf66); }
.g-6 { background: linear-gradient(135deg,#ffd43b,#fab005); }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testimonial { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); position: relative; }
.testimonial::before { content: "\201C"; font-size: 4rem; color: var(--c-line); position: absolute; top: 0; left: 16px; line-height: 1; }
.testimonial p { position: relative; color: var(--c-ink); margin-bottom: 16px; font-size: .98rem; }
.testimonial-by { font-size: .9rem; font-weight: 700; color: var(--c-gray); display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; background: var(--c-bg-alt); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* ============ 预约 / 联系 ============ */
.section-cta { background: linear-gradient(140deg, var(--c-primary), var(--c-primary-d)); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.contact-info h2 { margin: 6px 0 16px; }
.contact-info > p { opacity: .92; margin-bottom: 24px; max-width: 440px; }
.contact-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 1rem; }
.contact-list b { font-weight: 800; }
.ci { width: 38px; height: 38px; background: rgba(255,255,255,.18); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }

.contact-form { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-lg); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 700; color: var(--c-ink); margin-bottom: 6px; font-size: .92rem; }
.form-row label i { color: var(--c-pink); font-style: normal; }
.form-row input, .form-row select {
  width: 100%; padding: 13px 16px; border: 2px solid var(--c-line); border-radius: 12px;
  font-size: 1rem; font-family: inherit; color: var(--c-ink); background: var(--c-bg); transition: border .2s, box-shadow .2s;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(255,138,61,.15); }
.form-row input.invalid, .form-row select.invalid { border-color: var(--c-pink); }
.form-note { font-size: .82rem; color: var(--c-gray); text-align: center; margin-top: 14px; }
.form-success { background: #e7f9ea; color: #2b8a3e; padding: 12px; border-radius: 12px; text-align: center; font-weight: 700; margin-top: 14px; }

/* ============ 页脚 ============ */
.site-footer { background: #2b2b3a; color: #cfcfdb; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 300px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col a { display: block; font-size: .92rem; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 22px; font-size: .85rem; color: #9a9aab; flex-wrap: wrap; gap: 8px; }

/* ============ 浮动 CTA ============ */
.float-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  background: linear-gradient(120deg, var(--c-pink), var(--c-primary));
  color: #fff; font-weight: 800; padding: 14px 22px; border-radius: 999px;
  box-shadow: var(--shadow-md); animation: bob 2.6s ease-in-out infinite;
}
.float-cta:hover { transform: scale(1.05); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ============ 滚动出现动画 ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; order: -1; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav, .nav-cta {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 0 24px;
    max-height: 0; overflow: hidden; box-shadow: var(--shadow-md);
    transition: max-height .35s ease, padding .35s ease; gap: 0;
  }
  .nav.open { max-height: 360px; padding: 16px 24px; }
  .nav-cta.open { max-height: 80px; padding: 0 24px 18px; }
  .nav-link { padding: 14px 12px; border-radius: 12px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid, .program-grid, .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-stats { gap: 24px; }
  .section { padding: 64px 0; }
  .contact-form { padding: 24px; }
  .float-cta { right: 14px; bottom: 14px; padding: 12px 18px; font-size: .9rem; }
}
