/* ========================================
   水族宠物 - 访谈问答风格样式表
   www.yugangzhijia.cn
   ======================================== */

/* CSS 变量定义 */
:root {
  --accent-color: #795548;
  --primary-color: #4a7c59;
  --secondary-color: #87ceeb;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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-color: var(--bg-color);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

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

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

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

.nav-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 20px;
  padding: 6px 16px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 140px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* ========================================
   面包屑 Breadcrumb
   ======================================== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

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

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

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

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

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

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
}

.card-body {
  padding: 20px;
}

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

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

/* ========================================
   访谈问答组件 qa-pair
   ======================================== */
.qa-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

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

.q-label {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.q-text {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  padding-top: 4px;
}

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

.a-label {
  width: 32px;
  height: 32px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.a-text {
  flex: 1;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

.person-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--secondary-color), #e0f7fa);
  flex-shrink: 0;
}

.person-info {
  flex: 1;
}

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

.person-title {
  font-size: 0.95rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 12px;
}

.person-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   时间标注 timestamp
   ======================================== */
.timestamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-color);
  padding: 4px 10px;
  border-radius: 12px;
}

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

.topic-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--primary-color);
  background: rgba(74, 124, 89, 0.1);
  padding: 4px 12px;
  border-radius: 16px;
  font-weight: 500;
}

.topic-tag:hover {
  background: rgba(74, 124, 89, 0.2);
}

/* ========================================
   网格布局
   ======================================== */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

/* ========================================
   页面区块
   ======================================== */
.section {
  padding: 48px 0;
}

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

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

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

.section-more:hover {
  text-decoration: underline;
}

/* ========================================
   特色访谈区域
   ======================================== */
.featured-interview {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 32px 0;
  box-shadow: var(--shadow);
}

.featured-header {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
}

.featured-image {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  background: linear-gradient(135deg, var(--secondary-color), #e0f7fa);
  flex-shrink: 0;
}

.featured-content {
  flex: 1;
}

.featured-label {
  display: inline-block;
  font-size: 0.8rem;
  color: white;
  background: var(--primary-color);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.featured-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.featured-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ========================================
   分类浏览
   ======================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.category-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: white;
  font-size: 1.5rem;
}

.category-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

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

.article-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-item:first-child {
  padding-top: 0;
}

.article-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.article-thumb {
  width: 120px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
  flex-shrink: 0;
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

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

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

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

.sidebar-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sidebar-item-number {
  width: 24px;
  height: 24px;
  background: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sidebar-item-number.top {
  background: var(--primary-color);
  color: white;
}

.sidebar-item-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar-item:hover .sidebar-item-text {
  color: var(--primary-color);
}

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

.page-item {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.page-item:hover,
.page-item.active {
  background: var(--primary-color);
  color: white;
}

/* ========================================
   页脚 Footer
   ======================================== */
.footer {
  background: #2c3e50;
  color: white;
  padding: 48px 0 24px;
  margin-top: 48px;
}

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

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-link:hover {
  color: white;
}

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

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

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

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

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

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

.error-btn:hover {
  background: #3d6b4a;
}

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

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

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

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

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

  .search-box {
    display: none;
  }

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

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

  .person-intro {
    flex-direction: column;
    text-align: center;
  }

  .person-avatar {
    margin: 0 auto;
  }

  .qa-section {
    padding: 20px;
  }

  .answer {
    margin-left: 0;
  }

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

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

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

  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

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

  .hero {
    padding: 40px 0;
  }

  .section {
    padding: 32px 0;
  }

  .featured-interview {
    padding: 24px;
  }

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