/* 户外摄影 - 全局样式 */
:root {
  --primary-color: #2e7d32;
  --accent-color: #c62828;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #1a1a1a;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 4px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

a:hover {
  text-decoration: underline;
}

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

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

/* 头部 */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

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

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

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

.nav a:hover,
.nav a.active {
  border-bottom-color: var(--primary-color);
  text-decoration: none;
}

.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: 14px;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, #1a3a1a 0%, #2e7d32 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

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

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

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-search input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  outline: none;
}

.hero-search button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 16px 32px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
}

/* 分类区域 */
.categories {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.section-title {
  font-size: 28px;
  margin-bottom: 24px;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

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

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.category-card .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* 文章列表 */
.articles-section {
  padding: 48px 0;
}

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

.article-item {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

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

.article-thumb {
  width: 200px;
  height: 140px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 48px;
}

.article-content {
  flex: 1;
}

.article-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-category {
  color: var(--primary-color);
  font-weight: 500;
}

.article-content h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.article-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 三栏布局 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
  background: var(--bg-secondary);
}

.column h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

.column ul {
  list-style: none;
}

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

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

.column a {
  color: var(--text-primary);
  display: block;
}

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

/* 页脚 */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 48px 0 24px;
}

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

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

.footer-links a {
  color: #aaa;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  background: var(--bg-secondary);
  font-size: 14px;
}

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

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

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

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

/* 分类页头部 */
.category-header {
  padding: 48px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.category-header h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

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

/* 文章详情页 */
.article-page {
  padding: 32px 0 48px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
}

.article-main {
  background: var(--bg-primary);
}

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

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

.article-info {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  font-size: 24px;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 20px;
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 16px;
}

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

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

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

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

.tip-box strong {
  color: var(--primary-color);
}

.warning-box {
  background: #ffebee;
  border-left: 4px solid var(--accent-color);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.warning-box strong {
  color: var(--accent-color);
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius);
}

.sidebar-widget h4 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget li:last-child {
  border-bottom: none;
}

.sidebar-widget a {
  color: var(--text-primary);
  font-size: 14px;
}

/* 404页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.error-content h1 {
  font-size: 120px;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-content h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary-color);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: #1b5e20;
  text-decoration: none;
}

.btn-secondary {
  background: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }

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

  .search-box {
    width: 100%;
    order: 2;
  }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

  .article-thumb {
    width: 100%;
    height: 200px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

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

  .error-content h1 {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }
}
