/* IT咨询课堂 - 产品规格风格样式表 */
/* 主色调: #607d8b */

/* ========== CSS 变量 ========== */
:root {
  --primary-color: #607d8b;
  --primary-dark: #455a64;
  --primary-light: #90a4ae;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7f8;
  --bg-tertiary: #eceff1;
  --border-color: #e0e0e0;
  --border-light: #eeeeee;
  --link-color: #607d8b;
  --link-hover: #455a64;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ========== 基础重置 ========== */
*, *::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;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

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

ul, ol {
  list-style: none;
}

/* ========== 布局容器 ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

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

.nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

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

.search-input {
  width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-color);
}

.search-btn {
  width: 36px;
  height: 36px;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Hero区域 ========== */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 48px 0;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== 面包屑 ========== */
.breadcrumb {
  background-color: var(--bg-secondary);
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}

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

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

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

.breadcrumb-current {
  color: var(--text-primary);
}

/* ========== 主内容区 ========== */
.main {
  padding: 32px 0;
  min-height: calc(100vh - 300px);
}

/* ========== 区块标题 ========== */
.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.view-more {
  font-size: 13px;
  color: var(--primary-color);
}

/* ========== 分类网格 ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.category-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.category-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 内容卡片 ========== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.content-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

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

.content-card-image {
  width: 100%;
  height: 160px;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.content-card-body {
  padding: 16px;
}

.content-card-category {
  font-size: 12px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.content-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* ========== 列表样式 ========== */
.content-list {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.content-list-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

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

.content-list-item:hover {
  background-color: var(--bg-secondary);
}

.content-list-icon {
  width: 40px;
  height: 40px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: var(--primary-color);
  font-size: 16px;
  flex-shrink: 0;
}

.content-list-info {
  flex: 1;
  min-width: 0;
}

.content-list-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-list-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-list-meta {
  text-align: right;
  flex-shrink: 0;
  margin-left: 16px;
}

.content-list-date {
  font-size: 12px;
  color: var(--text-muted);
}

.content-list-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--primary-color);
  background-color: rgba(96, 125, 139, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

/* ========== 规格表格 ========== */
.spec-section {
  margin-bottom: 40px;
}

.spec-table-wrapper {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.spec-table th,
.spec-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.spec-table th {
  background-color: var(--bg-secondary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-table td {
  font-size: 14px;
  color: var(--text-secondary);
}

.spec-table tr:hover td {
  background-color: var(--bg-secondary);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-label {
  font-weight: 500;
  color: var(--text-primary);
}

/* ========== 文章详情 ========== */
.article-header {
  margin-bottom: 32px;
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 16px;
}

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

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

.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

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

.article-content p {
  margin-bottom: 16px;
}

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

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

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

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

.article-content code {
  background-color: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
  color: var(--primary-dark);
}

.article-content pre {
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 16px;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* ========== 规格详情页 ========== */
.spec-detail-header {
  text-align: center;
  padding: 32px 0;
}

.spec-detail-image {
  width: 200px;
  height: 200px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 64px;
}

.spec-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.spec-detail-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.spec-detail-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.spec-detail-section-title {
  background-color: var(--bg-secondary);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.spec-detail-list {
  padding: 8px 0;
}

.spec-detail-item {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
}

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

.spec-detail-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.spec-detail-value {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ========== 下载按钮 ========== */
.download-section {
  text-align: center;
  padding: 24px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

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

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

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

.pagination a,
.pagination span {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.pagination .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ========== 三栏底部 ========== */
.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-column-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-list a:hover {
  color: var(--primary-color);
}

.footer-list a::before {
  content: "•";
  color: var(--primary-light);
}

/* ========== 页脚 ========== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 40px 0 20px;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

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

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

/* ========== 404页面 ========== */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

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

.error-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

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

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

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

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

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

  .search-box {
    order: 2;
  }

  .search-input {
    width: 140px;
  }

  .hero {
    padding: 32px 0;
  }

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

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

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

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

  .article-title {
    font-size: 22px;
  }

  .spec-detail-item {
    flex-direction: column;
    gap: 4px;
  }

  .spec-detail-label {
    width: auto;
  }

  .error-code {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

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

  .category-card {
    padding: 16px;
  }

  .content-list-item {
    padding: 12px 16px;
  }

  .content-list-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
  }

  .pagination a,
  .pagination span {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }
}
