/* 职业成长指南 - 样式表 */
/* 招聘风格 | 主色调: #2196f3 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #2196f3;
  --accent-dark: #1976d2;
  --accent-light: #e3f2fd;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f7fa;
  --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;
}

/* ===== 重置与基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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-secondary);
}

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

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-primary);
  box-shadow: var(--shadow);
  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-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;
  gap: 8px;
}

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

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-btn {
  padding: 8px 16px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

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

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: #fff;
  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: #fff;
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}

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

.hero-search input:focus {
  outline: none;
}

.hero-search .search-btn {
  padding: 12px 32px;
  font-size: 1rem;
}

/* ===== 分类区域 ===== */
.categories {
  padding: 48px 0;
  background: var(--bg-primary);
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.category-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.category-card .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.category-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.category-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== 内容卡片 ===== */
.content-section {
  padding: 48px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.content-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

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

.content-card .tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.75rem;
  border-radius: 4px;
  margin-bottom: 12px;
}

.content-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.content-card .meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.content-card .meta span {
  margin-right: 16px;
}

.content-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 筛选器 ===== */
.filter-panel {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

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

.filter-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

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

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

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

/* ===== 文章详情 ===== */
.article-header {
  background: var(--bg-primary);
  padding: 48px 0;
  border-bottom: 1px solid var(--border-color);
}

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

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

.article-body {
  background: var(--bg-primary);
  padding: 48px 0;
}

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

.article-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

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

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

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

/* ===== 侧边栏布局 ===== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar-widget h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget li {
  margin-bottom: 12px;
}

.sidebar-widget a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: block;
  transition: color 0.2s;
}

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

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

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

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

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

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

.footer-section a {
  display: block;
  color: #aaa;
  font-size: 0.875rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #444;
  color: #888;
  font-size: 0.875rem;
}

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

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

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

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

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}

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

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

  .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

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

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

  .search-box {
    display: none;
  }

  .hero {
    padding: 48px 0;
  }

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

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

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

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

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

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

  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

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

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

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