/* 职业素养工坊 - 全局样式 */
:root {
  --accent-color: #2196f3;
  --accent-dark: #1976d2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f5f7fa;
  --bg-gray: #e8ecf1;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --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;
  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.2s;
}

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

ul {
  list-style: none;
}

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

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

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

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

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

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

.nav a {
  color: var(--text-primary);
  font-weight: 500;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  background: white;
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.hero-search input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-size: 16px;
  outline: none;
}

.hero-search select {
  padding: 12px 16px;
  border: none;
  border-left: 1px solid var(--border-color);
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.hero-search button {
  padding: 12px 32px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
}

/* 分类区域 */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 32px;
  text-align: center;
}

.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--bg-white);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.category-card .icon {
  width: 56px;
  height: 56px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.category-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

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

/* 课程卡片 */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-card {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: box-shadow 0.2s;
}

.course-card:hover {
  box-shadow: var(--shadow-md);
}

.course-logo {
  width: 64px;
  height: 64px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.course-info {
  flex: 1;
}

.course-info h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.course-info .meta {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

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

.course-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  background: var(--bg-light);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 12px;
}

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

.course-action {
  text-align: right;
}

.course-action .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
}

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

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

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

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

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

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

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-light);
}

/* 分类页头部 */
.category-header {
  background: var(--bg-white);
  padding: 40px 0;
  text-align: center;
}

.category-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

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

/* 筛选器 */
.filters {
  background: var(--bg-white);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group label {
  font-weight: 500;
  margin-right: 8px;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--bg-light);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  color: white;
}

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

.pagination a,
.pagination span {
  padding: 10px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

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

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

/* 文章页 */
.article-page {
  background: var(--bg-light);
  padding: 40px 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

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

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

.article-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.article-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.article-action {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.article-action .btn {
  padding: 14px 48px;
  font-size: 1.125rem;
}

/* 推荐文章 */
.recommended {
  background: var(--bg-white);
  padding: 32px 0;
  margin-top: 40px;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.recommended-section h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.recommended-section ul li {
  margin-bottom: 12px;
}

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

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

/* 底部 */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

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

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

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

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: var(--text-light);
}

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

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

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

.error-content h1 {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
}

.error-content h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

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

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

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

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-top: 12px;
    gap: 20px;
    justify-content: center;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 60px 0;
  }

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

  .hero-search {
    flex-direction: column;
    margin: 0 20px;
  }

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

  .course-card {
    flex-direction: column;
    text-align: center;
  }

  .course-tags {
    justify-content: center;
  }

  .course-action {
    text-align: center;
  }

  .article-header,
  .article-content {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

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

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

  .filter-group {
    justify-content: center;
  }

  .error-content h1 {
    font-size: 5rem;
  }
}
