/* ============================================
   云佳创想科技官网 - 主样式文件
   ============================================ */

/* CSS变量定义 */
:root {
  /* 颜色方案 - 基于logo的蓝色渐变和橙黄色星星 */
  --primary-blue: #1e88e5;
  --primary-blue-dark: #1565c0;
  --primary-blue-light: #42a5f5;
  --accent-orange: #ff9800;
  --accent-yellow: #ffc107;
  
  /* 中性色 */
  --text-dark: #212121;
  --text-gray: #757575;
  --text-light: #9e9e9e;
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-gray: #e0e0e0;
  
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  
  /* 间距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* 断点 */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;
  
  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
  
  /* 过渡 */
  --transition: all 0.3s ease;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* 通用容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: var(--text-gray);
  margin-bottom: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Header导航栏 */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

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

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img {
  height: 50px;
  width: auto;
  margin-right: var(--spacing-sm);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-menu a:hover {
  color: var(--primary-blue);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-blue);
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

.contact-phone {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: var(--transition);
}

.contact-phone:hover {
  background-color: var(--bg-light);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: white;
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 152, 0, 0.2) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease, textGlow 3s ease-in-out infinite;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3), 0 0 80px rgba(255, 255, 255, 0.2);
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  animation: fadeInUp 1s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1.2s ease;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.6);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background-color: white;
  color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

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

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4);
}

/* 服务卡片 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.service-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: var(--spacing-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

.service-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto var(--spacing-md);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  transition: all 0.4s ease;
  position: relative;
}

.service-card:hover .service-icon {
  transform: rotateY(360deg) scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.service-icon::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover .service-icon::after {
  opacity: 0.3;
  animation: pulse 1.5s infinite;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
  font-weight: 700;
}

.service-card p {
  color: var(--text-gray);
  line-height: 1.8;
}

/* 优势展示 */
.advantages {
  background: linear-gradient(180deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
}

.advantages::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.advantage-item {
  text-align: center;
  padding: var(--spacing-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.advantage-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.advantage-item h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.advantage-item p {
  color: var(--text-gray);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary-blue-light);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: 1.8;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.footer-section a:hover {
  color: var(--primary-blue-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* 联系页面 */
.contact-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-details,
.wechat-consultation {
  flex: 1;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: 12px;
}

.wechat-consultation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wechat-contact-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 888 / 1131;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0 auto;
  border-radius: 12px;
}

.wechat-contact-tip {
  margin-top: var(--spacing-md);
  color: var(--text-dark);
  font-weight: 600;
}

.wechat-contact-note {
  margin-top: var(--spacing-xs);
  color: var(--text-gray);
  font-size: 0.875rem;
}

/* 案例展示 */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.case-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.case-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.case-content {
  padding: var(--spacing-md);
}

.case-content h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
}

.case-content p {
  color: var(--text-gray);
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  background-color: var(--bg-light);
  color: var(--text-gray);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3), 0 0 80px rgba(255, 255, 255, 0.2);
  }
  50% {
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.5), 0 0 100px rgba(255, 255, 255, 0.3);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease;
}

.slide-in-right {
  animation: slideInRight 0.8s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-white);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  
  .nav-menu a {
    display: block;
    padding: var(--spacing-sm);
    font-size: 1.125rem;
  }
  
  .contact-phone {
    margin-top: var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .services-grid,
  .advantages-grid,
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  /* 联系页面响应式 */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-menu {
    gap: var(--spacing-sm);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 商城开发服务内容 */
.mall-intro { max-width: 860px; margin: 0 auto; color: var(--text-gray); font-size: 1.125rem; line-height: 1.9; }
.mall-intro p + p { margin-top: 1rem; }
.mall-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.mall-card { text-align: left; }
.mall-card h3 { margin-bottom: 1rem; }
.mall-card p { line-height: 1.8; }
.mall-faq { max-width: 860px; margin: 0 auto; }
.mall-faq details { border-bottom: 1px solid var(--bg-gray); padding: 1.25rem 0; }
.mall-faq summary { cursor: pointer; font-weight: 600; color: var(--text-dark); font-size: 1.125rem; }
.mall-faq details p { margin-top: 1rem; color: var(--text-gray); line-height: 1.9; }
.mall-breadcrumb { margin-bottom: 1.5rem; }
.mall-breadcrumb a { color: var(--primary-blue); }
.mall-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.mall-hero .hero-content { max-width: 900px; padding: 0 1.25rem; }
.mall-hero p { line-height: 1.8; }
.mall-step-list { padding-left: 1.5rem; }
.mall-step-list li { padding: .65rem 0; }
