/* 智慧职场学 - 全局样式 */
: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: 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;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
}

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

ul {
  list-style: none;
}

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

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

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

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

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 24px;
  padding: 8px 16px;
  width: 280px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

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

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

.hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

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

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-lg);
}

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

.hero-search button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

/* 分类区域 */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
}

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

.section-title a {
  font-size: 14px;
  color: var(--accent-color);
}

/* 分类卡片 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

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

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

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

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

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

/* 课程/文章卡片 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

.card-image {
  height: 160px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.card-body {
  padding: 20px;
}

.card-tag {
  display: inline-block;
  background: rgba(33, 150, 243, 0.1);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* 列表样式 */
.list-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color);
}

.list-box h4 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

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

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

.list-box a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.list-box a::before {
  content: '•';
  color: var(--accent-color);
}

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

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

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* 分类页头部 */
.category-header {
  background: var(--bg-white);
  padding: 32px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.filter-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

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

.filter-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.filter-group a {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  background: var(--bg-light);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-group a:hover,
.filter-group a.active {
  background: var(--accent-color);
  color: #fff;
}

/* 课程列表 */
.course-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

.course-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  transition: all 0.3s;
}

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

.course-thumb {
  width: 200px;
  height: 140px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.course-info {
  flex: 1;
}

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

.course-info .desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

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

.course-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--text-light);
}

.course-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.btn {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

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

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

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

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

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

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.pagination a {
  background: var(--bg-white);
  color: var(--text-secondary);
  box-shadow: var(--shadow);
}

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

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

/* 文章页 */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px;
}

.article-header {
  margin-bottom: 32px;
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
}

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

.article-content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

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

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

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

.article-content strong {
  color: var(--text-primary);
}

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

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

.error-title {
  font-size: 24px;
  margin-bottom: 12px;
}

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

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

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

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

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

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

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-light);
}

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

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

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

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

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

  .course-thumb {
    width: 100%;
    height: 180px;
  }
}

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

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

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

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

  .hero-search {
    flex-direction: column;
  }

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

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

  .list-section {
    grid-template-columns: 1fr;
  }

  .filter-inner {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group {
    flex-wrap: wrap;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

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