/* ===== 登山徒步 - 指南文档风格 ===== */
/* 主色调: #009688 青绿色 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #009688;
  --accent-dark: #00796b;
  --accent-light: #e0f2f1;
  --text-primary: #212121;
  --text-secondary: #757575;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --border-color: #e0e0e0;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --max-width: 1200px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ===== 页头 ===== */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 0.875rem;
}

.search-box::before {
  content: "🔍";
  margin-right: 8px;
  opacity: 0.5;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--bg-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  color: var(--text-secondary);
  margin: 0 8px;
}

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== 卡片组件 ===== */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== 步骤编号组件 ===== */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.875rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-color);
}

.step-content h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ===== 提示框组件 ===== */
.tip-box {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tip-box.info {
  background: var(--accent-light);
  border-left: 4px solid var(--accent-color);
}

.tip-box.warning {
  background: #fff3e0;
  border-left: 4px solid var(--warning);
}

.tip-box.success {
  background: #e8f5e9;
  border-left: 4px solid var(--success);
}

.tip-box::before {
  font-size: 1.25rem;
}

.tip-box.info::before { content: "💡"; }
.tip-box.warning::before { content: "⚠️"; }
.tip-box.success::before { content: "✅"; }

/* ===== 检查清单组件 ===== */
.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.checklist li::before {
  content: "☐";
  color: var(--accent-color);
  font-size: 1.25rem;
}

.checklist li.checked::before {
  content: "☑️";
}

/* ===== 难度标识 ===== */
.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
}

.difficulty-easy { color: var(--success); }
.difficulty-medium { color: var(--warning); }
.difficulty-hard { color: var(--error); }

/* ===== 区块标题 ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ===== 网格布局 ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ===== 分类标签 ===== */
.category-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-light);
  color: var(--accent-color);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
}

.category-tag:hover {
  background: var(--accent-color);
  color: white;
}

/* ===== 文章列表 ===== */
.article-list {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
}

.article-list h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.article-list ul {
  list-style: none;
}

.article-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-list a:hover {
  color: var(--accent-color);
}

.article-list .date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s;
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
}

.pagination .current {
  background: var(--accent-color);
  color: white;
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand p {
  opacity: 0.8;
  margin-top: 12px;
  font-size: 0.875rem;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: white;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 10px;
}

.footer a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer a:hover {
  color: white;
}

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

/* ===== 主内容区 ===== */
.main {
  padding: 40px 0;
}

/* ===== 文章详情页 ===== */
.article-header {
  background: var(--bg-primary);
  padding: 40px 0;
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.article-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 40px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: var(--accent-dark);
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

/* ===== 404 页面 ===== */
.error-page {
  text-align: center;
  padding: 100px 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 24px;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.error-text {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--accent-dark);
  color: white;
}

/* ===== 步骤概览 ===== */
.steps-overview {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.steps-overview h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
  }

  .search-box {
    width: 150px;
  }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-content {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .step-item {
    flex-direction: column;
    gap: 12px;
  }

  .error-code {
    font-size: 5rem;
  }
}
