/* 植物园 - 访谈风格样式表 */
/* 主色调: #795548 (棕色) */

/* ========== CSS 变量 ========== */
:root {
  --accent-color: #795548;
  --accent-light: #8d6e63;
  --accent-dark: #5d4037;
  --bg-color: #faf8f5;
  --card-bg: #ffffff;
  --text-primary: #3e2723;
  --text-secondary: #6d4c41;
  --text-muted: #8d6e63;
  --border-color: #d7ccc8;
  --shadow: 0 2px 8px rgba(121, 85, 72, 0.1);
  --shadow-hover: 0 4px 16px rgba(121, 85, 72, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --gap: 24px;
}

/* ========== 重置样式 ========== */
* {
  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-color: var(--bg-color);
}

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

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

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

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

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

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "🌿";
}

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

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

.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-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--text-primary);
}

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

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

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

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

/* ========== 面包屑 ========== */
.breadcrumb {
  background: var(--card-bg);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

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

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--border-color) 0%, #efebe9 100%);
}

.card-body {
  padding: 20px;
}

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

.card-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

/* ========== 特色访谈卡片 ========== */
.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
  margin: 32px 0;
}

.featured-card .card-image {
  width: 40%;
  height: auto;
  min-height: 280px;
}

.featured-card .card-body {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card .topic-tag {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 16px;
  width: fit-content;
}

.featured-card .card-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.featured-card .card-text {
  font-size: 16px;
  margin-bottom: 20px;
}

/* ========== 区块标题 ========== */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ========== 网格布局 ========== */
.grid {
  display: grid;
  gap: var(--gap);
}

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

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

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

/* ========== 分类标签 ========== */
.category-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.category-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s;
}

.category-tag:hover {
  border-color: var(--accent-color);
  background: #fff8e1;
}

.category-tag .icon {
  font-size: 24px;
}

/* ========== 文章列表 ========== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

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

.article-item .article-image {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--border-color) 0%, #efebe9 100%);
  flex-shrink: 0;
}

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

.article-item .article-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-item .article-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-item .article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== 侧边栏列表 ========== */
.sidebar-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

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

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

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

.sidebar-list a {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
  transition: color 0.2s;
}

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

/* ========== 问答组件 ========== */
.qa-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.qa-pair {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.qa-pair:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.question {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.question .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.question .content {
  flex: 1;
  background: #f5f5f5;
  padding: 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-color);
}

.question .content p {
  font-weight: 600;
  color: var(--text-primary);
}

.answer {
  display: flex;
  gap: 12px;
  margin-left: 52px;
}

.answer .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.answer .content {
  flex: 1;
  background: #fff8e1;
  padding: 16px;
  border-radius: var(--radius);
}

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

/* ========== 人物介绍 ========== */
.person-intro {
  text-align: center;
  padding: 32px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.person-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 4px solid var(--accent-color);
  background: linear-gradient(135deg, var(--border-color) 0%, #efebe9 100%);
}

.person-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.person-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.person-bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== 时间戳 ========== */
.timestamp {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timestamp::before {
  content: "📅";
}

/* ========== 主题标签 ========== */
.topic-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.topic-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #efebe9;
  color: var(--accent-color);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

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

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

.pagination a {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

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

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

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

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

.footer-brand p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
}

/* ========== 404 页面 ========== */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 0;
}

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

.error-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.error-desc {
  font-size: 16px;
  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: background 0.2s;
}

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

/* ========== 两栏布局 ========== */
.two-column {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .two-column {
    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 .container {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
  }

  .search-box {
    width: auto;
    flex: 1;
  }

  .hero {
    padding: 40px 0;
  }

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

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

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

  .featured-card {
    flex-direction: column;
  }

  .featured-card .card-image {
    width: 100%;
    height: 200px;
  }

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

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

  .answer {
    margin-left: 0;
  }

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

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

  .error-code {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 16px;
  }

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

  .category-tags {
    flex-direction: column;
  }

  .category-tag {
    width: 100%;
  }

  .qa-section {
    padding: 20px;
  }

  .question,
  .answer {
    flex-direction: column;
  }

  .answer {
    margin-left: 0;
  }
}
