/* 
 * ATXC 优化补丁 v3.0
 * 添加到 assets/css/components.css 末尾
 */

/* ========================================
   英雄区优化
   ======================================== */

/* 动态网格背景 */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* 浮动装饰元素 */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  font-size: 48px;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* 数据统计卡片化 */
.hero-stats-cards {
  display: flex;
  gap: var(--space-6);
  justify-content: center;
  margin-top: var(--space-16);
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  min-width: 140px;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: var(--space-2);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: var(--font-black);
  color: var(--accent-gold-400);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--gray-300);
}

/* 滚动提示动画 */
@keyframes scrollHint {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(10px); }
}

/* ========================================
   课程卡片优化
   ======================================== */

.course-type-card {
  position: relative;
  overflow: hidden;
}

/* 渐变边框效果 */
.course-type-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(102,126,234,0.5) 0%, rgba(118,75,162,0.5) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.course-type-card:hover::before {
  opacity: 1;
}

/* 热门标签 */
.badge-hot {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--gradient-gold);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========================================
   导航栏优化
   ======================================== */

.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ========================================
   浮动客服按钮
   ======================================== */

.floating-chat {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 1000;
}

.chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-gold);
  border: none;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(212,175,55,0.4);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
}

/* ========================================
   表格状态标签
   ======================================== */

.status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  display: inline-block;
}

.status-upcoming {
  background: #dcfce7;
  color: #166534;
}

.status-full {
  background: #fee2e2;
  color: #991b1b;
}

.status-enrolling {
  background: #dbeafe;
  color: #1e40af;
}

/* ========================================
   移动端表格卡片化
   ======================================== */

@media (max-width: 768px) {
  .schedule-table thead {
    display: none;
  }
  
  .schedule-table tbody tr {
    display: block;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: none;
  }
  
  .schedule-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--gray-100);
  }
  
  .schedule-table tbody td:last-child {
    border-bottom: none;
  }
  
  .schedule-table tbody td::before {
    content: attr(data-label);
    font-weight: var(--font-semibold);
    color: var(--gray-600);
  }
}

/* ========================================
   FAQ 手风琴
   ======================================== */

.faq-item {
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--primary-600);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-base);
}

.faq-question:hover {
  background: var(--gray-50);
}

.faq-icon {
  font-size: var(--text-2xl);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 var(--space-6);
  color: var(--gray-700);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 var(--space-6) var(--space-4);
}

/* ========================================
   客户案例卡片
   ======================================== */

.story-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

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

.story-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-4);
}

.story-card blockquote {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--gray-700);
  margin: var(--space-4) 0;
  font-style: italic;
}

.story-author strong {
  display: block;
  font-size: var(--text-lg);
  color: var(--primary-600);
  margin-bottom: var(--space-1);
}

.story-author span {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* ========================================
   合作伙伴 Logo
   ======================================== */

.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  padding: var(--space-8) 0;
}

.partner-logos img {
  height: 60px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all var(--transition-base);
}

.partner-logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* ========================================
   响应式优化
   ======================================== */

@media (max-width: 768px) {
  .hero-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    min-width: auto;
  }
  
  .float-icon {
    font-size: 32px;
  }
  
  .floating-chat {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .chat-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
