/* ================================================
   青梧教育 - Global CSS (Design System)
   Primary: #04a39b (青绿色)
   Secondary: #4A90D9 (蓝色)
   Style: 童话感 · 绘本风 · 高级感 · 儿童教育
   ================================================ */

/* CSS Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Nunito', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2D3748;
  background: #FFFFFF;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select, button {
  font-size: inherit;
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

/* Design Tokens - 青梧教育 */
:root {
  --primary: #04A39B;
  --primary-light: #06C9BE;
  --primary-dark: #037F77;
  --primary-bg: #E6F9F7;
  --primary-deco: rgba(4, 163, 155, 0.08);
  
  --secondary: #4A90D9;
  --secondary-light: #6BB1F0;
  --secondary-dark: #2E70B0;
  --secondary-bg: #EBF3FC;
  
  --accent-warm: #FFB74D;
  --accent-warm-light: #FFF3E0;
  --accent-pink: #F48FB1;
  --accent-purple: #9C27B0;
  
  --text-primary: #2D3748;
  --text-secondary: #4A5568;
  --text-tertiary: #718096;
  --text-light: #A0AEC0;
  --text-on-primary: #FFFFFF;
  
  --surface: #FFFFFF;
  --surface-secondary: #F7FAFC;
  --surface-warm: #FFFDF8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 24px rgba(4, 163, 155, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 40px;
  --radius-full: 9999px;
  
  --font-heading: 'Nunito', 'Comic Neue', sans-serif;
  --font-body: 'Nunito', 'PingFang SC', sans-serif;
  
  --container: 1400px;
  --header-height: 100px;
  --section-padding: 100px;
  --gutter: 5%;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
.heading-xl {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.heading-lg {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.heading-md {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
}

.heading-sm {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.text-base {
  font-size: 1rem;
  line-height: 1.6;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.6;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1.5;
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-primary-color { color: var(--primary); }
.text-secondary-color { color: var(--secondary); }

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  transition: var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  padding: 0;
  cursor: pointer;
  transition: var(--transition-fast);
  height: 100%;
  min-width: 0;
}

.logo:hover {
  color: var(--primary-light);
}

.logo img {
  width: 210px !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}

.logo-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: var(--radius-md);
  color: white;
  box-shadow: 0 2px 8px rgba(4, 163, 155, 0.2);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition-fast);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transition: var(--transition-normal);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--primary);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  transform: scaleX(1);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-toggle:hover {
  background: var(--primary-bg);
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  position: absolute;
  left: 50%;
  top: 50%;
  transition: var(--transition-normal);
}

.mobile-toggle span:nth-child(1) {
  transform: translate(-50%, -50%) translateY(-6px);
}

.mobile-toggle span:nth-child(2) {
  transform: translate(-50%, -50%);
}

.mobile-toggle span:nth-child(3) {
  transform: translate(-50%, -50%) translateY(6px);
}

.mobile-toggle.open span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 85vw !important;
  max-width: 320px;
  height: calc(100vh - var(--header-height));
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem 1.5rem;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-mobile.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.nav-mobile a {
  display: block;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: var(--transition-fast);
  text-align: left;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  padding-left: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  min-height: 48px;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(4, 163, 155, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-on-primary);
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.25);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding-left: 1rem;
  padding-right: 1rem;
}

.btn-ghost:hover {
  background: var(--primary-bg);
  transform: translateX(4px);
}

.btn-ghost::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: var(--transition-fast);
}

.btn-ghost:hover::before {
  transform: rotate(-45deg) translateX(4px);
}

.btn-sm {
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  min-height: 40px;
}

.btn-lg {
  padding: 1.1rem 2.5rem;
  font-size: 1.1rem;
  min-height: 52px;
}

/* Section Styles */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Decorative Elements */
.decor {
  pointer-events: none;
}

.decor-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-deco), transparent 70%);
}

.decor-stars {
  position: absolute;
  opacity: 0.5;
}

/* Card Styles */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

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

.media-appear {
  animation: mediaFade 0.6s ease-out;
}

@keyframes mediaFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-warm {
  background: var(--accent-warm-light);
  color: #F59E0B;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* CMS Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--surface-secondary) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  padding: 0.25rem 0;
}

/* Animations */
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 769px) {
  :root {
    --section-padding: 60px;
    --header-height: 70px;
  }
  
  .header-inner {
    padding: 0 1.5rem;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .nav-desktop {
    display: none !important;
  }

  .logo img {
    width: 132px !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    min-width: 44px;
    height: 44px;
    padding: 0 0.5rem;
  }
  
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-inner {
    padding: 0 1rem !important;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

/* 联系老师圆形气泡 */
.fixed-qq-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  top: auto;
  transform: none;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100px;
  height: 100px;
  padding: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  backdrop-filter: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  writing-mode: horizontal-tb;
  text-decoration: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.05em;
}
.fixed-qq-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), #047857);
}
.fixed-qq-btn svg {
  width: 36px;
  height: 36px;
  fill: #fff;
  transition: fill 0.3s ease;
}
.fixed-qq-btn:hover svg {
  fill: #fff;
}

@media (max-width: 768px) {
  .fixed-qq-btn {
    width: 70px;
    height: 70px;
    right: 16px;
    bottom: 16px;
    font-size: 0.75rem;
  }
  
  .fixed-qq-btn svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .fixed-qq-btn {
    width: 60px;
    height: 60px;
    right: 12px;
    bottom: 12px;
    font-size: 0.7rem;
  }
  
  .fixed-qq-btn svg {
    width: 24px;
    height: 24px;
  }
}
