/* 栏目静态列表页样式 */

/* 页面头部 Banner */
header.page-header .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 主内容区 */
.category-section {
  padding: 40px 0 60px;
  background: #f7f7f7;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.cat-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}

/* 侧边栏 */
.cat-sidebar {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  padding: 20px 0 16px;
  position: sticky;
  top: 20px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  padding: 0 20px 12px;
  border-bottom: 2px solid #c0392b;
  margin-bottom: 8px;
}

.sidebar-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  color: #555;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-cat-link:hover {
  background: #fff5f5;
  color: #c0392b;
  border-left-color: #c0392b;
}

.sidebar-cat-link.active {
  background: #fff5f5;
  color: #c0392b;
  font-weight: 600;
  border-left-color: #c0392b;
}

.cat-count {
  background: #f0f0f0;
  color: #999;
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
}

.sidebar-cat-link.active .cat-count,
.sidebar-cat-link:hover .cat-count {
  background: #fce4e2;
  color: #c0392b;
}

/* 主内容 */
.cat-main {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  padding: 28px 30px 32px;
}

.cat-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 20px;
}

.cat-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c0392b;
}

.cat-total {
  font-size: 0.88rem;
  color: #999;
}

/* 文章列表 */
.cat-article-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-article-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 5px;
  transition: background 0.18s;
}

.cat-article-item:hover {
  background: #fff5f5;
}

.cat-article-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 50%;
}

.cat-article-item:nth-child(-n+3) .cat-article-num {
  background: #c0392b;
  color: #fff;
}

.cat-article-title {
  color: #333;
  font-size: 0.97rem;
  line-height: 1.5;
  text-decoration: none;
  flex: 1;
  transition: color 0.18s;
}

.cat-article-title:hover {
  color: #c0392b;
}

/* 公众号原文链接 */
.cat-article-origin {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #888;
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  transition: all 0.18s;
  background: #fafafa;
}

.cat-article-origin:hover {
  color: #c0392b;
  border-color: #c0392b;
  background: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
  .cat-layout {
    grid-template-columns: 1fr;
  }

  .cat-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 12px 0 8px;
  }

  .sidebar-title {
    width: 100%;
  }

  .sidebar-cat-link {
    flex: 1 1 calc(50% - 1px);
    min-width: 120px;
    border-left: none;
    border-bottom: 2px solid transparent;
    justify-content: center;
    gap: 6px;
    font-size: 0.88rem;
    padding: 8px 10px;
  }

  .sidebar-cat-link.active,
  .sidebar-cat-link:hover {
    border-left-color: transparent;
    border-bottom-color: #c0392b;
  }

  .cat-main {
    padding: 20px 16px 24px;
  }

  .page-title {
    font-size: 1.5rem;
  }
}
