/* 全局变量 */
:root {
  --primary-color: #2563EB;
  --secondary-color: #7C3AED;
  --accent-color: #F97316;
  --text-color: #1E293B;
  --light-text: #64748B;
  --background-color: #FFFFFF;
  --light-background: #F8FAFC;
  --border-color: #E2E8F0;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease-in-out;
}

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

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

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

/* 通用容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color);
  box-shadow: var(--box-shadow);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.5rem 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

.navbar-logo img {
  height: 2.5rem;
  margin-right: 0.5rem;
}

.navbar-menu {
  display: flex;
  list-style: none;
}

.navbar-item {
  margin-left: 2rem;
}

.navbar-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-link:hover {
  color: var(--primary-color);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

/* 英雄区域 */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 8rem 0 6rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 服务区块 */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  font-weight: 700;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--light-background);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  fill: var(--primary-color);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-description {
  color: var(--light-text);
}

/* 关于我们 */
.about {
  background-color: var(--light-background);
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.about-content {
  flex: 1;
}

.about-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.about-description {
  margin-bottom: 1.5rem;
}

.about-features {
  list-style: none;
}

.about-feature {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.about-feature svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--accent-color);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* 联系表单 */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* 页脚 */
.footer {
  background-color: #1E293B;
  color: white;
  padding: 3rem 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-column {
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 2rem;
  margin-right: 0.5rem;
}

/* 媒体查询 - 移动端适配 */
@media screen and (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    flex-direction: column;
    align-items: center;
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-item {
    margin: 0.5rem 0;
  }
  
  .navbar-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .about-container {
    flex-direction: column;
  }
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 滚动到顶部按钮 */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: white;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: var(--light-background);
}

::-webkit-scrollbar-thumb {
  background-color: var(--light-text);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-color);
}
