/* =========================================
   金田学苑 · base.css
   设计基调：海阔天空，竹节分明
   ========================================= */

/* CSS Variables */
:root {
  /* 色调：海蓝 + 竹绿 + 米白 */
  --color-bg: #faf9f7;
  --color-bg-alt: #f0ede8;
  --color-surface: #ffffff;
  --color-primary: #1a5f7a;       /* 深海蓝 */
  --color-primary-light: #2a7da0;
  --color-accent: #5a8a6b;        /* 竹绿 */
  --color-accent-light: #7aaa8b;
  --color-text: #2c3e50;
  --color-text-light: #5a6c7d;
  --color-text-muted: #8898a8;
  --color-border: #e2ddd6;
  --color-divider: #ddd8cf;

  /* 四维精力色（保留，用于诊断） */
  --color-physical: #1a5f7a;
  --color-emotional: #6b9e5a;
  --color-mental: #4a7fc1;
  --color-will: #c17a4a;

  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "SimSun", serif;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);

  /* 容器 */
  --container-max: 960px;
  --container-padding: 1.5rem;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 图片 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 链接 */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-light);
}

/* 标题 */
h1, h2, h3, h4, h5 {
  line-height: 1.3;
  color: var(--color-text);
  font-weight: 600;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

/* 容器 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* 工具类 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* 分隔线 */
hr {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin: var(--space-xl) 0;
}

/* 列表 */
ul, ol {
  list-style: none;
}

/* 按钮 */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* =========================================
   顶部导航
   ========================================= */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.top-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  letter-spacing: 0.05em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.top-nav a {
  font-size: 0.9rem;
  color: var(--color-text-light);
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.2s;
}

.top-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--color-primary);
}

.top-nav a.active::after,
.top-nav a:hover::after {
  transform: scaleX(1);
}

/* 汉堡菜单 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}
