/* ============================================
   茶旅文化 - 茶叶产地旅游平台样式
   www.chalyu.cn
   ============================================ */

/* CSS 变量定义 */
:root {
  --primary-color: #2d5a27;
  --accent-color: #00bcd4;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #f0f7f0;
  --border-color: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --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: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

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

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

ul, ol {
  list-style: none;
}

/* ============================================
   布局组件
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

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

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

.nav ul {
  display: flex;
  gap: 2rem;
}

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

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

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

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

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

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

/* ============================================
   分屏布局 (Split Screen)
   ============================================ */

.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.split-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem;
}

.split-panel-left {
  background: var(--bg-accent);
}

.split-panel-right {
  background: var(--bg-primary);
}

.split-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.split-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.split-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.split-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* ============================================
   按钮组件
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #1e3d1a;
  color: white;
}

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

.btn-accent:hover {
  background: #00a5bb;
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

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

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-primary);
}

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

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   文章列表组件
   ============================================ */

.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-more {
  font-size: 0.875rem;
  color: var(--primary-color);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  transition: background 0.2s;
}

.article-item:hover {
  background: var(--bg-accent);
}

.article-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.article-info {
  flex: 1;
  min-width: 0;
}

.article-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-info h4 a {
  color: var(--text-primary);
}

.article-info h4 a:hover {
  color: var(--primary-color);
}

.article-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   分类页面组件
   ============================================ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.category-block {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.category-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

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

.category-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.category-item-info {
  flex: 1;
}

.category-item-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.category-item-info h4 a {
  color: var(--text-primary);
}

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

.category-view-all {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color);
}

/* ============================================
   文章详情页组件
   ============================================ */

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-category {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

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

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body img {
  width: 100%;
  border-radius: 8px;
  margin: 2rem 0;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* ============================================
   404 页面
   ============================================ */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 300px);
  text-align: center;
  padding: 4rem 1rem;
}

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

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
}

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

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

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

  .split-screen {
    min-height: auto;
  }

  .split-panel {
    padding: 3rem 2rem;
  }

  .split-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .split-screen {
    grid-template-columns: 1fr;
  }

  .split-panel {
    padding: 2rem 1.5rem;
  }

  .split-panel-right {
    order: -1;
    min-height: 300px;
  }

  .split-title {
    font-size: 1.75rem;
  }

  .split-desc {
    font-size: 1rem;
  }

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

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 1rem;
  }

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

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

  .logo {
    font-size: 1.25rem;
  }

  .split-title {
    font-size: 1.5rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .category-block {
    padding: 1.5rem;
  }
}
