/* 数字森林科技官网 - 核心布局系统 */
/* 实现每个板块一屏高度的响应式布局 */

/* 基础HTML和Body设置 */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* 主容器 */
.main-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}

/* 导航栏布局 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-medium);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
}

.navbar-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: var(--font-xl);
  font-weight: var(--font-bold);
  color: var(--primary-green);
}

.navbar-nav {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--font-base);
  color: var(--text-dark);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: width var(--transition-normal);
}

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

/* 核心板块布局 */
.section {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-xl) 0;
  overflow: visible;
}

.section-container {
  max-width: 1600px;
  width: 100%;
  padding: 0 var(--space-lg);
  margin: 0 auto;
}

/* 板块内容布局 */
.section-content {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  width: 100%;
  min-height: auto;
  padding: var(--space-lg) 0;
}

/* 两列布局 */
.section-content.two-columns {
  grid-template-columns: 1fr 1fr;
}

/* 三列布局 */
.section-content.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

/* 居中布局 */
.section-content.centered {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}

/* 标题样式 */
.section-title {
  font-size: var(--font-2xl);
  font-weight: var(--font-bold);
  color: var(--dark-green);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.section-subtitle {
  font-size: var(--font-lg);
  color: var(--medium-green);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-normal);
}

.section-description {
  font-size: var(--font-base);
  color: var(--text-medium);
  line-height: var(--line-height-normal);
  max-width: 600px;
}

/* 卡片网格布局 */
.card-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.card-grid.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.four-columns {
  grid-template-columns: repeat(4, 1fr);
}

/* 特色区域布局 */
.feature-section {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.feature-content {
  flex: 1;
}

.feature-image {
  flex: 1;
  text-align: center;
}

.feature-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* 统计数据布局 */
.stats-container {
  display: flex;
  justify-content: space-around;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--font-4xl);
  font-weight: var(--font-bold);
  color: var(--primary-green);
  display: block;
}

.stat-label {
  font-size: var(--font-base);
  color: var(--text-medium);
  margin-top: var(--space-xs);
}

/* 按钮布局 */
.button-group {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* 页脚布局 - 在强制高度控制系统中处理 */

.footer-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== 自然流式布局系统 ===== */
/* 所有板块采用自然高度，支持内容自适应 */

/* Hero区域 - 允许全宽显示 */
.hero-section {
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

/* Hero区域容器 - 不限制最大宽度 */
.hero-section .section-container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* 其他板块统一处理 - 移除高度限制，根据内容自适应 */
.product-section,
.jarvis-section,
.team-section,
.about-section,
.contact-section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

/* Footer自然高度 */
.footer {
  padding: var(--space-xl) 0;
  background: var(--dark-green);
  color: var(--white);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 50px; /* 移动端导航栏高度 */
  }
  
  .product-section,
  .jarvis-section,
  .team-section,
  .about-section,
  .contact-section {
    padding-top: var(--space-md);
  }
  
  .footer {
    padding: var(--space-lg) 0;
  }
}