/* ========================================
   天然香皂 - 样式表
   风格: 案例展示风格 (portfolio-case)
   主色调: #00bcd4 (青色)
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --accent-light: #b2ebf2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --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;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.nav a {
  color: var(--text-secondary);
  font-size: 15px;
  transition: color 0.3s;
}

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

/* ========================================
   分屏布局
   ======================================== */
.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.split-left,
.split-right {
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

.split-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.3;
}

.split-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent-color);
  color: var(--bg-white);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

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

/* ========================================
   面包屑
   ======================================== */
.breadcrumb {
  background: var(--bg-light);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 14px;
  color: var(--text-light);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* ========================================
   三栏内容区
   ======================================== */
.three-columns {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.column h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

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

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

.column ul li a {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
  transition: color 0.3s;
}

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

/* ========================================
   分类页样式
   ======================================== */
.category-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.category-block {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border-color);
}

.category-block h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--accent-color);
}

.category-items {
  margin-bottom: 24px;
}

.category-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.category-item:last-child {
  border-bottom: none;
}

.category-item h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

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

/* ========================================
   文章页样式
   ======================================== */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

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

.article-body h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 20px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

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

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

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

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

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

/* ========================================
   推荐文章区
   ======================================== */
.recommended {
  background: var(--bg-light);
  padding: 48px 0;
}

.recommended-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.recommended h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.related-links a {
  padding: 10px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

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

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.column-block h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

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

.column-block ul li a:hover {
  color: var(--accent-color);
}

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

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

.error-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

/* ========================================
   页脚
   ======================================== */
.footer {
  background: var(--text-primary);
  color: var(--bg-white);
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

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

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

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

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid #444;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
  .split-screen {
    grid-template-columns: 1fr;
  }

  .split-left,
  .split-right {
    padding: 48px 32px;
  }

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

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

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

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 14px;
  }

  .split-left,
  .split-right {
    padding: 40px 24px;
  }

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

  .three-columns,
  .category-grid {
    padding: 32px 16px;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

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

  .article-content h1 {
    font-size: 24px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}
