/* ========================================
   登山装备 - 指南文档风格样式
   主色调: #009688 (Teal)
   ======================================== */

/* CSS 变量定义 */
:root {
  --accent-color: #009688;
  --accent-light: #4db6ac;
  --accent-dark: #00796b;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f7fa;
  --bg-card: #fff;
  --border-color: #e8e8e8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

/* 重置样式 */
*, *::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;
  transition: color 0.2s;
}

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 */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

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

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

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

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

.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-md);
  padding: 8px 16px;
  gap: 8px;
}

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

.search-box button {
  border: none;
  background: var(--accent-color);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 48px 0 24px;
  margin-top: 64px;
}

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

.footer-brand p {
  color: #aaa;
  margin-top: 12px;
  font-size: 0.875rem;
}

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

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #aaa;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 24px;
  text-align: center;
  color: #888;
  font-size: 0.875rem;
}

/* ========================================
   面包屑导航
   ======================================== */

.breadcrumb {
  background: var(--bg-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  gap: 8px;
  font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--text-muted);
}

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

.breadcrumb li:last-child {
  color: var(--text-muted);
}

/* ========================================
   Hero 区域
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 64px 0;
  text-align: center;
}

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

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

/* ========================================
   卡片组件
   ======================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.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.6;
}

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

/* ========================================
   步骤编号组件
   ======================================== */

.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 {
  list-style: none;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border-left: 4px solid var(--accent-color);
}

.step-content h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

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

/* ========================================
   提示框组件
   ======================================== */

.tip-box {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.tip-box.warning {
  background: #fff3e0;
  border-left-color: #ff9800;
}

.tip-box.info {
  background: #e3f2fd;
  border-left-color: #2196f3;
}

.tip-box h4 {
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tip-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   检查清单组件
   ======================================== */

.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:last-child {
  border-bottom: none;
}

.checklist .check-icon {
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
}

/* ========================================
   难度标识
   ======================================== */

.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.difficulty .star {
  color: #ffc107;
}

.difficulty .star.empty {
  color: #ddd;
}

/* ========================================
   分页组件
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

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

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

/* ========================================
   文章列表
   ======================================== */

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

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

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

.article-list a {
  color: var(--text-primary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-list a::before {
  content: "•";
  color: var(--accent-color);
}

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

/* ========================================
   页面特定样式
   ======================================== */

/* 首页 */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.category-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.category-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

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

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

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.column h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* 分类页 */
.page-header {
  background: var(--bg-primary);
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 0;
}

.guide-item {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.guide-item-image {
  width: 200px;
  height: 140px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.guide-item-content {
  flex: 1;
}

.guide-item-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.guide-item-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.guide-item-meta {
  display: flex;
  gap: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 文章页 */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}

.article-header {
  margin-bottom: 32px;
}

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

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

.article-featured-image {
  width: 100%;
  height: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.article-content {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

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

.article-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

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

.article-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* 步骤概览 */
.steps-overview {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

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

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

.step-overview-item:last-child {
  border-bottom: none;
}

.step-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.step-status.done {
  background: #4caf50;
  color: white;
}

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

.step-status.pending {
  background: #ddd;
  color: #999;
}

/* 404页面 */
.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: background 0.2s;
}

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

/* 推荐文章区域 */
.recommended-section {
  background: var(--bg-primary);
  padding: 48px 0;
  margin-top: 48px;
}

.related-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.tag {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .three-columns {
    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 {
    display: none;
  }

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

  .hero p {
    font-size: 1rem;
  }

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

  .category-grid,
  .guide-grid,
  .three-columns {
    grid-template-columns: 1fr;
  }

  .guide-item {
    flex-direction: column;
  }

  .guide-item-image {
    width: 100%;
  }

  .article-content {
    padding: 24px;
  }

  .article-featured-image {
    height: 200px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 32px 0;
  }

  .card-body {
    padding: 16px;
  }

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