/* 1. 响应式容器：使用 Flexbox + gap 控制间距 */
.category-container {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	/* 👈 核心：卡片之间的分隔距离（上下左右均为24px） */
	padding: 16px;
	/* max-width: 1200px; */
	margin: 0 auto;
}

/* 2. 响应式卡片宽度计算 */
.category-list {
	/* 基础宽度：占据一半减去间距的一半 */
	flex: 1 1 calc(50% - 12px);
	min-width: 300px;
	/* 👈 核心：当屏幕小于此值时自动换行变单列 */
}

/* 3. 卡片样式优化 */
.category-item {
	border: 1px solid #e5e7eb;
	margin-bottom: 12px;
	/* 列表内部各分类块之间的垂直间距 */
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-header {
	padding: 14px 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	font-weight: 600;
	color: #1f2937;
	user-select: none;
	transition: background 0.2s;
	position: relative;
	border-left: 3px solid rgb(244, 141, 53);
}

.category-header:hover {
	background: #f9fafb;
}



/* 展开/收起图标动画 */
.category-header::after {
	position: absolute;
	right: 0;
	content: "▶";
	display: inline-block;
	margin-right: 10px;
	font-size: 10px;
	color: #f59e0b;
	transition: transform 0.3s ease;
}

.category-header.expanded::after {
	transform: rotate(90deg);
	/* 用旋转代替字符替换，动画更平滑 */
}

/* 内容区平滑过渡 */
.category-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease-out;
	background: #fafafa;
	border-top: 0 solid #eee;
}

.category-header.expanded+.category-content {
	border-top-width: 1px;
}

.category-content ul {
	list-style: none;
	padding: 8px 16px 12px 36px;
	margin: 0;
}

.category-content li {
	padding: 5px 0;
	font-size: 14px;
	color: #4b5563;
	line-height: 1.5;
}

.category-content li:hover {
	color: #f59e0b;
	cursor: pointer;
}
.category-container .active{
    color: #f59e0b;
}
/* 4. 移动端适配 */
@media (max-width: 640px) {
	.category-container {
		gap: 16px;
		/* 手机端适当缩小间距 */
		padding: 12px;
	}

	.category-list {
		flex: 1 1 100%;
		/* 手机端强制单列 */
		min-width: unset;
	}
}