/* 香皂 - 案例展示风格 CSS */
/* 主色调: #00bcd4 (青色) */

/* ========== CSS 变量 ========== */
:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --accent-light: #b2ebf2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #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: 4px;
  --max-width: 1200px;
}

/* ========== 重置样式 ========== */
* {
  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-light);
}

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

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

ul {
  list-style: none;
}

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

/* ========== 通用组件 ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.btn:hover {
  background: var(--accent-dark);
  color: var(--bg-white);
  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);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
}

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

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

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

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

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

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

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

/* ========== 分屏布局 ========== */
.split-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 500px;
}

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

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

.split-right {
  background: var(--accent-color);
  color: var(--bg-white);
}

.split-right h2,
.split-right p {
  color: var(--bg-white);
}

.split-right .btn-outline {
  border-color: var(--bg-white);
  color: var(--bg-white);
}

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

.split-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

/* ========== 三栏内容区 ========== */
.three-columns {
  padding: 60px 0;
  background: var(--bg-light);
}

.three-columns .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.column-box {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

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

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

.column-box a {
  color: var(--text-primary);
  display: block;
  transition: all 0.3s;
}

.column-box a:hover {
  color: var(--accent-color);
  padding-left: 8px;
}

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

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin-left: 8px;
  color: var(--text-muted);
}

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

/* ========== 分类页内容 ========== */
.category-section {
  padding: 40px 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.category-header {
  background: var(--accent-color);
  color: var(--bg-white);
  padding: 20px 30px;
}

.category-header h2 {
  font-size: 22px;
  font-weight: 600;
}

.category-body {
  padding: 24px 30px;
}

.category-body ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.category-body a {
  color: var(--text-primary);
  flex: 1;
}

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

.category-footer {
  padding: 0 30px 24px;
}

/* ========== 文章页内容 ========== */
.article-section {
  padding: 40px 0;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.article-panel {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

.article-panel h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.article-panel h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 30px 0 16px;
  color: var(--accent-color);
}

.article-panel p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-meta {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 推荐文章区 ========== */
.recommended-section {
  background: var(--bg-white);
  padding: 40px 0;
  margin-bottom: 30px;
}

.recommended-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.recommended-list a {
  padding: 10px 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s;
}

.recommended-list a:hover {
  background: var(--accent-color);
  color: var(--bg-white);
}

/* ========== 两栏内容区 ========== */
.two-columns {
  padding-bottom: 60px;
}

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

/* ========== Footer ========== */
.footer {
  background: var(--text-primary);
  color: var(--bg-white);
  padding: 50px 0 20px;
}

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

.footer-brand h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-color);
}

.footer-brand p {
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--bg-white);
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column a {
  color: var(--text-muted);
  font-size: 14px;
}

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

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

/* ========== 404 页面 ========== */
.error-section {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

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

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

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

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

  .split-left,
  .split-right {
    padding: 40px;
    min-height: 300px;
  }

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

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

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

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    height: auto;
    padding: 16px;
  }

  .nav ul {
    gap: 20px;
    margin-top: 16px;
  }

  .split-section h2 {
    font-size: 28px;
  }

  .split-left,
  .split-right {
    padding: 30px 20px;
  }

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

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

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

  .error-content h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .column-box,
  .article-panel {
    padding: 20px;
  }

  .recommended-list {
    flex-direction: column;
  }

  .recommended-list a {
    text-align: center;
  }
}
