/* ============================================
   共用样式表 - 智联科技官网
   包含所有页面通用的CSS规则
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 简约科技风格配色（默认） */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-tertiary: #eef1f8;
  --text-primary: #0a0e27;
  --text-secondary: #4a5568;
  --text-tertiary: #8892a8;
  --accent-primary: #4f46e5;
  --accent-secondary: #6366f1;
  --accent-light: #e0e7ff;
  --border-color: #d4d9e5;
  --border-light: #e8ecf1;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 16px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.12);
}

/* 深色主题 */
body.dark-mode {
  --bg-primary: #0a0e27;
  --bg-secondary: #121829;
  --bg-tertiary: #1a1f3a;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-light: #312e81;
  --border-color: #334155;
  --border-light: #1e293b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  letter-spacing: -0.3px;
}

/* ============ 页头导航 ============ */
header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* ============ Logo配置说明 ============
   支持两种方式：
   1. 自定义图片 Logo（推荐）：
      <img src="logo.png" alt="公司Logo" class="logo-img">
   
   2. 保持现有的Icon Logo（默认）：
      <span class="logo-icon">⚙️</span>
   
   Logo 容器已设置 flex-shrink: 0 确保大小固定
   公司标题 (.company-name) 可单独控制大小和显示
   ============================================ */

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logo-container:hover {
  opacity: 0.8;
}

/* 支持图片 Logo - 宽高自定义 */
.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  /* 移除所有背景颜色设置，保持完全透明 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* 公司名称 - 保持文本独立，不受 Logo 影响 */
.company-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

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

/* 主题切换按钮 */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============ 主内容 ============ */
.main-content {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin: 4rem 0 2rem;
  color: var(--text-primary);
  font-weight: 700;
}

/* ============ 页脚 ============ */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  margin-top: 4rem;
  padding: 3rem 2rem 1rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

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

.footer-section h4 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.8;
  transition: color 0.3s ease;
}

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

/* 优化备案区域 - 增加上下padding平衡视觉 */
.beian-section {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.beian-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.beian-item a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.3s ease;
}

.beian-item a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: 1rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* ============ 平板响应式 (1024px) ============ */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2.2rem;
  }

  nav {
    padding: 0.875rem 1.5rem;
  }

  .main-content {
    padding: 0 1.5rem;
  }
}

/* ============ 平板响应式 (768px) ============ */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }

  .logo-container {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .logo-img {
    width: 28px;
    height: 28px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 1.3rem;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .section-title {
    font-size: 1.75rem;
    margin: 2rem 0 1.5rem;
  }

  .main-content {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  footer {
    padding: 2rem 1rem 0.75rem;
    margin-top: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .beian-section {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 0;
  }

  .beian-item {
    justify-content: center;
    font-size: 0.7rem;
  }

  .footer-section p {
    font-size: 0.8rem;
  }

  .footer-bottom {
    padding-top: 1rem;
    font-size: 0.75rem;
  }
}

/* ============ 手机响应式 (480px) ============ */
@media (max-width: 480px) {
  .section-title {
    font-size: 1.5rem;
  }

  nav {
    padding: 0.5rem 0.75rem;
  }

  .logo-container {
    font-size: 1rem;
  }

  .logo-img {
    width: 24px;
    height: 24px;
  }

  .logo-icon {
    width: 24px;
    height: 24px;
    font-size: 1.1rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .main-content {
    padding: 0 0.75rem;
  }

  footer {
    padding: 1.5rem 0.75rem 0.5rem;
  }

  .footer-grid {
    gap: 1rem;
  }

  .footer-section p {
    font-size: 0.75rem;
    line-height: 1.6;
  }

  .beian-section {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
  }

  .beian-item {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .footer-bottom {
    padding-top: 0.5rem;
    font-size: 0.7rem;
  }
}
