/* 矿物 - 访谈风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #795548;
  --accent-light: #a1887f;
  --accent-dark: #5d4037;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-card: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 32px;
}

/* 重置样式 */
* {
  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 {
  text-decoration: none;
  color: var(--accent-color);
  transition: color 0.2s;
}

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

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

ul {
  list-style: none;
}

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

/* 页头 */
.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;
  padding: var(--gap-sm) var(--gap-md);
}

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

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

.nav {
  display: flex;
  gap: var(--gap-lg);
}

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

.search-box input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  width: 200px;
}

.search-box button {
  padding: 8px 16px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.search-box button:hover {
  background: var(--accent-dark);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #efebe9 100%);
  padding: 60px 0;
  text-align: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 区块标题 */
.section-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--gap-md);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

/* 特色展示 */
.featured {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.featured-header {
  display: flex;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-md);
}

.featured-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.featured-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

.featured-meta {
  display: flex;
  gap: var(--gap-md);
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

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

.category-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--accent-color);
}

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

/* 产品列表 */
.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.product-item {
  display: flex;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s;
}

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

.product-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.product-info h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.product-info p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  gap: var(--gap-md);
  font-size: 14px;
  color: var(--text-muted);
}

.product-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 三栏布局 */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.col-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
}

.col-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: var(--gap-sm);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.col-section ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.col-section ul li:last-child {
  border-bottom: none;
}

.col-section ul li a {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
}

.col-section ul li a:hover {
  color: var(--accent-color);
}

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

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* 分类页标题 */
.category-header {
  padding: 32px 0;
  text-align: center;
}

.category-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--gap-lg);
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
}

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

.pagination .current {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* 文章详情页 */
.article-header {
  text-align: center;
  padding: 32px 0;
}

.article-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--gap-md);
}

.article-title {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.article-intro {
  background: var(--bg-card);
  padding: var(--gap-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--gap-lg);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Q&A 样式 */
.qa-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.qa-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qa-question {
  background: var(--accent-color);
  color: #fff;
  padding: 16px var(--gap-md);
  font-weight: 600;
}

.qa-answer {
  padding: var(--gap-md);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 相关产品 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.related-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-sm);
  text-align: center;
}

.related-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.related-item h5 {
  font-size: 14px;
  color: var(--text-primary);
}

/* 推荐文章横向 */
.recommended-horizontal {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.recommended-horizontal h4 {
  font-size: 16px;
  color: var(--accent-color);
  margin-bottom: var(--gap-sm);
}

.recommended-horizontal ul {
  display: flex;
  gap: var(--gap-lg);
  flex-wrap: wrap;
}

.recommended-horizontal li a {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 80px 0;
}

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

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

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

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: none;
}

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

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: #fff;
}

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.footer-brand h3 {
  font-size: 20px;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.footer-col h4 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-col ul li a:hover {
  color: var(--accent-color);
}

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

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

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

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: var(--gap-sm);
    padding-top: var(--gap-sm);
    border-top: 1px solid var(--border-color);
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 12px 0;
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
  }

  .search-box {
    order: 3;
    width: 100%;
    margin-top: var(--gap-sm);
  }

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

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

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

  .featured-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .featured-image {
    width: 150px;
    height: 150px;
  }

  .product-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-image {
    width: 100%;
    height: 180px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

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

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

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

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

  .section {
    padding: 32px 0;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 24px;
  }
}
