
/* 全局变量定义 */
:root {
  --primary-color: #2D3436; /* 主色调，深灰色，象征稳重与专业 */
  --secondary-color: #F5F5F5; /* 辅助色，浅灰色，用于模块分隔 */
  --background-color: #FFFFFF; /* 背景色，白色，确保内容清晰呈现 */
  --accent-color: #2ECC71; /* 点缀色，绿色，突出互动元素 */
}

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

body {
  font-family: 'Open Sans', sans-serif; /* 采用Open Sans字体，现代且易读 */
  background-color: var(--secondary-color);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* 避免出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 添加阴影提升层次感 */
}

.navbar a {
  color: var(--background-color);
  text-decoration: none;
  margin: 0 15px;
  font-size: 18px;
  transition: color 0.3s;
}

.navbar a:hover {
  color: var(--accent-color); /* 悬停时变为点缀色 */
}

/* 英雄区样式 */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  padding: 150px 30px 100px 30px; /* 顶部留足导航栏空间 */
  color: var(--background-color);
}

.hero .content {
  max-width: 50%;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 20px;
  animation: fadeIn 2s ease-in-out;
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
}

.hero .cta-button {
  background-color: var(--accent-color);
  color: var(--background-color);
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s;
}

.hero .cta-button:hover {
  background: #28a745; /* 悬停时颜色加深 */
}

/* 英雄区动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 服务模块样式 */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 50px 30px;
  background-color: var(--background-color);
}

.service-card {
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.service-card img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.service-card img:hover {
  transform: scale(1.05);
}

.service-card h3 {
  margin: 15px 0 10px 0;
  font-size: 22px;
  color: var(--primary-color);
}

.service-card p {
  font-size: 16px;
  color: #666;
}

/* 文章内容样式 */
article {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 30px;
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2 {
  font-size: 28px;
  margin: 20px 0;
  color: var(--primary-color);
}

article p {
  font-size: 17px;
  margin-bottom: 20px;
  color: #555;
}

article pre {
  background-color: #f0f0f0;
  padding: 15px;
  border-radius: 6px;
  overflow: auto;
  margin-bottom: 20px;
}

article code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
}

/* 底部样式 */
.footer {
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 40px 30px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer .footer-section {
  flex: 1 1 200px;
  margin: 10px;
}

.footer .footer-section h4 {
  margin-bottom: 15px;
  font-size: 20px;
}

.footer .footer-section a {
  color: var(--accent-color);
  text-decoration: none;
  display: block;
  margin: 5px 0;
}

.footer .footer-section a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  
  .hero .content {
    max-width: 100%;
  }
  
  .navbar {
    flex-direction: column;
  }
}

