/* sginhome.com - 新知立教育品牌站 */
:root {
  --primary: #a01a20;
  --primary-dark: #7a1418;
  --primary-light: #fde8e8;
  --accent: #a01a20;
  --accent-dark: #7a1418;
  --accent-light: #fde8e8;
  --gold: #c8a020;
  --gold-light: #fff8e0;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --success: #2e7d32;
  --radius: 8px;
  --max-width: 1100px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif; color: var(--text); line-height: 1.7; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Header */
.header { background: white; border-bottom: 2px solid var(--accent); padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 70px; }
.header .logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.header .logo img { height: 50px; width: auto; }
.header .logo:hover { text-decoration: none; }
.nav { display: flex; gap: 5px; }
.nav a { color: var(--text); padding: 8px 14px; border-radius: var(--radius); font-size: 14px; transition: all 0.2s; white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.nav .nav-diagnosis { background: var(--accent); color: white !important; font-weight: 700; }
.nav .nav-diagnosis:hover { background: var(--accent-dark); color: white !important; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--accent) 0%, #c62828 100%); color: white; padding: 60px 20px; text-align: center; }
.hero h1 { font-size: 36px; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 18px; max-width: 700px; margin: 0 auto 24px; opacity: 0.9; }
.hero .btn { display: inline-block; background: white; color: var(--accent); padding: 12px 32px; border-radius: var(--radius); font-size: 16px; font-weight: 600; transition: all 0.2s; }
.hero .btn:hover { background: var(--accent-light); transform: translateY(-2px); text-decoration: none; }

/* Sections */
.section { padding: 50px 20px; max-width: var(--max-width); margin: 0 auto; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: 28px; margin-bottom: 24px; text-align: center; color: var(--accent); position: relative; padding-bottom: 12px; }
.section h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent); margin: 12px auto 0; border-radius: 2px; }
.section h3 { font-size: 20px; margin-bottom: 12px; color: var(--accent); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 20px 0; }
.card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: all 0.2s; border-top: 3px solid var(--accent); }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card h3 { margin-top: 0; color: var(--accent); }
.card .icon { font-size: 32px; margin-bottom: 12px; }

/* Stats */
.stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin: 30px 0; text-align: center; }
.stat-num { font-size: 36px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 14px; color: var(--text-light); }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.testimonial { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; border-left: 3px solid var(--accent); }
.testimonial::before { content: '"'; font-size: 48px; color: var(--accent-light); position: absolute; top: 8px; left: 16px; }
.testimonial p { margin-top: 8px; font-size: 14px; line-height: 1.6; }
.testimonial .author { font-weight: 600; margin-top: 12px; font-size: 13px; color: var(--text-light); }

/* Footer */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 40px 20px 20px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.footer h4 { color: white; margin-bottom: 12px; font-size: 16px; }
.footer a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 6px; font-size: 14px; }
.footer a:hover { color: white; }
.footer .copyright { text-align: center; padding-top: 20px; margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; }

/* Page content */
.page-content { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px; }
.page-content h1 { font-size: 32px; color: var(--accent); margin-bottom: 20px; border-bottom: 2px solid var(--accent-light); padding-bottom: 10px; }
.page-content h2 { font-size: 24px; color: var(--accent); margin: 30px 0 15px; }
.page-content h3 { font-size: 18px; color: var(--accent); margin: 20px 0 10px; }
.page-content p { margin-bottom: 14px; }
.page-content ul, .page-content ol { margin: 10px 0 14px 20px; }
.page-content li { margin-bottom: 6px; }

/* Service page specific */
.service-detail { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px; }
.service-detail h1 { font-size: 32px; color: var(--accent); margin-bottom: 20px; }
.service-detail .meta { color: var(--text-light); margin-bottom: 20px; font-size: 14px; }
.service-detail .content { line-height: 1.8; }
.service-detail .content h2 { font-size: 24px; color: var(--accent); margin: 30px 0 15px; }
.service-detail .content h3 { font-size: 18px; color: var(--accent); margin: 20px 0 10px; }
.service-detail .content p { margin-bottom: 14px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 24px; border-radius: var(--radius); font-weight: 600; font-size: 15px; transition: all 0.2s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; }

/* Mobile */
/* ===== Age Diagnosis Cards ===== */
.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.age-card { background: white; border-radius: 12px; padding: 20px; text-align: center; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.2); color: var(--accent) !important; text-decoration: none !important; display: block; }
.age-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-color: white; }
.age-card .age-icon { font-size: 28px; margin-bottom: 6px; }
.age-card .age-range { font-size: 20px; font-weight: 800; color: var(--accent); display: block; }
.age-card .age-name { font-size: 13px; color: #666; margin-top: 2px; display: block; }
.age-card .age-tag { display: inline-block; background: var(--accent-light); color: var(--accent); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-top: 6px; }
.hero-diagnosis { background: linear-gradient(135deg, var(--accent) 0%, #c62828 100%); color: white; padding: 50px 20px 40px; text-align: center; }
.hero-diagnosis h1 { font-size: 30px; margin-bottom: 6px; font-weight: 800; }
.hero-diagnosis p { font-size: 16px; max-width: 650px; margin: 0 auto 24px; opacity: 0.85; }
.hero-diagnosis .btn { display: inline-block; background: white; color: var(--accent); padding: 12px 32px; border-radius: var(--radius); font-size: 16px; font-weight: 600; transition: all 0.2s; }
.hero-diagnosis .btn:hover { background: var(--accent-light); transform: translateY(-2px); text-decoration: none; }
@media (max-width: 640px) {
  .age-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .age-card { padding: 14px; }
  .age-card .age-range { font-size: 17px; }
  .hero-diagnosis h1 { font-size: 22px; }
  .hero-diagnosis p { font-size: 14px; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 16px; }
  .nav { display: none; }
  .section { padding: 30px 16px; }
  .stats { gap: 20px; }
  .stat-num { font-size: 28px; }
  .grid { grid-template-columns: 1fr; }
}
.hamburger { display: none; cursor: pointer; padding: 8px; color: var(--text); font-size: 24px; background: none; border: none; }
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: white; padding: 10px; border-bottom: 1px solid var(--border); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
}

/* ===== Floating Conversion Bar ===== */
.float-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.float-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: all 0.2s;
  color: white !important;
  font-size: 28px;
  text-decoration: none !important;
}
.float-bar a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.float-bar .wa-btn { background: #25D366; }
.float-bar .wx-btn { background: #07C160; position: relative; }
.float-bar .wx-tooltip {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  color: #333;
  padding: 8px 14px;
  border-radius: 8px;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}
.float-bar .wx-btn:hover .wx-tooltip { display: block; }
.float-bar .wx-tooltip .wx-label {
  font-size: 12px;
  color: #666;
  display: block;
}
.float-bar .wx-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
@media (max-width: 768px) {
  .float-bar { bottom: 16px; right: 16px; }
  .float-bar a { width: 48px; height: 48px; font-size: 22px; }
}

/* ===== CTA Block (used on all pages) ===== */
.cta-block {
  background: linear-gradient(135deg, var(--accent) 0%, #c62828 100%);
  color: white;
  text-align: center;
  padding: 50px 20px;
  margin: 40px 0 0;
}
.cta-block h2 {
  color: white !important;
  font-size: 28px;
  margin-bottom: 12px;
}
.cta-block h2::after { background: white !important; }
.cta-block p {
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 24px;
  opacity: 0.9;
}
.cta-block .cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.cta-block .btn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta-block .btn-white { background: white; color: var(--accent); }
.cta-block .btn-white:hover { background: var(--accent-light); text-decoration: none; }
.cta-block .btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); }
.cta-block .btn-outline:hover { border-color: white; text-decoration: none; }
.cta-block .wx-text { font-size: 15px; margin-top: 12px; opacity: 0.85; }
.cta-block .wx-text strong { color: #FFD700; }

/* ===== Lead Form ===== */
.lead-form {
  max-width: 460px;
  width: 100%;
  margin: 24px auto 0;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.lead-form .form-row {
  margin-bottom: 14px;
  text-align: left;
}
.lead-form label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
  font-weight: 500;
}
.lead-form input,
.lead-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  background: white;
  color: #333;
  box-sizing: border-box;
}
.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(160,26,32,0.1);
}
.lead-form .btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}
.lead-form .btn-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.lead-form .form-note {
  font-size: 12px;
  color: #999;
  margin-top: 10px;
  text-align: center;
}
@media (max-width: 768px) {
  .lead-form { padding: 18px; }
}

/* ===== Lead Magnet (blog article footer) ===== */
.lead-magnet {
  background: var(--gold-light);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 28px 24px;
  margin: 30px 0;
  text-align: center;
}
.lead-magnet h3 { color: var(--accent); font-size: 20px; margin-bottom: 8px; }
.lead-magnet p { font-size: 15px; color: var(--text); max-width: 500px; margin: 0 auto 16px; }
.lead-magnet .btn { background: var(--accent); color: white; padding: 12px 28px; font-size: 15px; }
.lead-magnet .btn:hover { background: var(--accent-dark); text-decoration: none; }
.lead-magnet .wx-guide { font-size: 14px; color: var(--text-light); margin-top: 10px; }
.lead-magnet .wx-guide strong { color: var(--accent); }
