/* ===== design_ocean - 深海蓝·专业稳重 ===== */
:root {
  --primary: #0c4a6e;
  --primary-dark: #082f49;
  --primary-light: #38bdf8;
  --accent: #06b6d4;
  --bg: #f0f9ff;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --radius: 8px;
  --transition: 0.3s ease;
  --shadow-sm: 0 1px 2px rgba(12,74,110,0.05);
  --shadow: 0 4px 12px rgba(12,74,110,0.08);
  --shadow-lg: 0 8px 24px rgba(12,74,110,0.12);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--text); line-height: 1.6; background: var(--bg-white); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== Header ===== */
.header { background: var(--primary); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { color: var(--text-white); font-size: 20px; font-weight: 700; white-space: nowrap; }
.logo:hover { color: var(--primary-light); }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { color: rgba(255,255,255,0.85); padding: 8px 16px; border-radius: 4px; white-space: nowrap; font-size: 15px; }
.main-nav a:hover, .main-nav a.active { color: var(--text-white); background: rgba(255,255,255,0.12); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-white); border-radius: 2px; transition: var(--transition); }

/* ===== Hero (方案B: 全宽深色Hero) ===== */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary) 100%); padding: 80px 0; text-align: center; color: var(--text-white); }
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero .hero-subtitle { font-size: 20px; opacity: 0.9; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 40px; font-weight: 800; color: var(--primary-light); line-height: 1.1; }
.hero-stats span { font-size: 14px; opacity: 0.85; }
.hero-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-buttons .btn-primary { background: var(--primary-light); color: var(--primary-dark); padding: 14px 40px; border-radius: var(--radius); font-size: 16px; font-weight: 600; display: inline-block; }
.hero-buttons .btn-primary:hover { background: var(--accent); color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(56,189,248,0.3); }
.hero-buttons .btn-secondary { background: transparent; color: var(--text-white); padding: 14px 40px; border-radius: var(--radius); font-size: 16px; font-weight: 600; border: 2px solid rgba(255,255,255,0.4); display: inline-block; }
.hero-buttons .btn-secondary:hover { border-color: var(--text-white); background: rgba(255,255,255,0.1); }

/* ===== Section Common ===== */
.section { padding: 64px 0; }
.section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--primary); }
.section-desc { text-align: center; color: var(--text-light); margin-bottom: 40px; font-size: 16px; }

/* ===== 业务优势 - 浅蓝背景6列 ===== */
.section-advantages { background: var(--bg); }
.advantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.advantage-item { text-align: center; padding: 32px 24px; background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: var(--transition); }
.advantage-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.advantage-item .advantage-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-light), var(--accent)); color: var(--text-white); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 28px; }
.advantage-item h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.advantage-item p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ===== 服务分类 - 3列x3行白色卡片 ===== */
.section-categories { background: var(--bg-white); }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: var(--transition); }
.category-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.category-card h3 { font-size: 20px; color: var(--primary); margin-bottom: 8px; }
.category-card h3 a { color: var(--primary); }
.category-card h3 a:hover { color: var(--accent); }
.category-card .category-desc { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.category-card .category-articles { border-top: 1px solid var(--bg); padding-top: 12px; }
.category-card .category-articles li { padding: 4px 0; }
.category-card .category-articles li a { font-size: 14px; color: var(--text); }
.category-card .category-articles li a:hover { color: var(--accent); }

/* ===== 最新资讯 - 2列网格 ===== */
.section-news { background: var(--bg); }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card .news-card-body { padding: 20px 24px; }
.news-card .news-category { display: inline-block; font-size: 12px; background: var(--bg); color: var(--primary); padding: 2px 12px; border-radius: 12px; margin-bottom: 8px; }
.news-card h3 { font-size: 18px; margin-bottom: 8px; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { font-size: 14px; color: var(--text-light); margin-bottom: 12px; line-height: 1.6; }
.news-card time { font-size: 13px; color: var(--text-light); }

/* ===== CTA ===== */
.section-cta { background: var(--primary); text-align: center; color: var(--text-white); }
.section-cta h2 { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.section-cta p { font-size: 16px; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-cta .btn-primary { background: var(--text-white); color: var(--primary); padding: 14px 40px; border-radius: var(--radius); font-size: 16px; font-weight: 600; display: inline-block; }
.section-cta .btn-primary:hover { background: var(--primary-light); color: var(--primary-dark); transform: translateY(-2px); }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 12px 0; font-size: 14px; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }

/* ===== Page Header ===== */
.page-header { padding: 48px 0; background: var(--bg); text-align: center; }
.page-header h1 { font-size: 36px; font-weight: 700; color: var(--primary); }

/* ===== List (变体B: 紧凑列表式) ===== */
.content-with-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding: 40px 0; }
.main-content { min-width: 0; }
.sidebar { min-width: 0; }
.article-list-compact { }
.article-item-compact { display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); transition: var(--transition); }
.article-item-compact:hover { padding-left: 8px; }
.article-item-compact .article-icon-block { flex-shrink: 0; width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary-light), var(--accent)); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--text-white); font-size: 18px; }
.article-item-compact .article-info { flex: 1; min-width: 0; }
.article-item-compact h3 { font-size: 18px; margin-bottom: 4px; }
.article-item-compact h3 a { color: var(--text); }
.article-item-compact h3 a:hover { color: var(--primary); }
.article-item-compact .article-summary { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.article-item-compact .meta { font-size: 13px; color: var(--text-light); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.article-item-compact .meta .category-tag { background: var(--primary); color: var(--text-white); padding: 1px 10px; border-radius: 10px; font-size: 12px; }

/* ===== Sidebar ===== */
.widget { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.widget h4 { font-size: 18px; color: var(--primary); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.side-nav li { } 
.side-nav li a { display: block; padding: 8px 0; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--bg); }
.side-nav li a:hover { color: var(--primary); padding-left: 8px; }
.hot-list li { padding: 8px 0; border-bottom: 1px solid var(--bg); }
.hot-list li:last-child { border-bottom: none; }
.hot-list li a { font-size: 14px; color: var(--text); }
.hot-list li a:hover { color: var(--primary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: 4px 12px; background: var(--bg); border-radius: 16px; font-size: 13px; color: var(--text-light); }
.tag-cloud a:hover { background: var(--primary); color: var(--text-white); }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 14px; color: var(--text); }
.pagination a:hover { background: var(--primary); color: var(--text-white); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: var(--text-white); border-color: var(--primary); }
.empty { text-align: center; padding: 64px 0; color: var(--text-light); font-size: 16px; }

/* ===== Detail (变体A: 标准两栏) ===== */
.detail-article h1 { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 16px; line-height: 1.3; }
.detail-article .meta { font-size: 14px; color: var(--text-light); margin-bottom: 24px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.detail-article .meta span { display: inline-flex; align-items: center; gap: 4px; }
.article-body { font-size: 16px; line-height: 1.8; color: var(--text); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-body h2 { font-size: 24px; margin: 24px 0 12px; }
.article-body h3 { font-size: 20px; margin: 20px 0 10px; }
.article-body p { margin-bottom: 12px; }
.article-body img { border-radius: var(--radius); margin: 16px 0; }
.article-tags { margin-bottom: 24px; }
.article-tags span { font-weight: 600; margin-right: 8px; color: var(--text); }
.article-tags a { display: inline-block; padding: 4px 12px; background: var(--bg); border-radius: 16px; font-size: 13px; margin-right: 8px; margin-bottom: 4px; }
.article-tags a:hover { background: var(--primary); color: var(--text-white); }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-nav .prev, .article-nav .next { font-size: 14px; }
.article-nav .prev span, .article-nav .next span { display: block; color: var(--text-light); font-size: 12px; margin-bottom: 4px; }
.article-nav .next { text-align: right; }

/* ===== About ===== */
.about-content { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.about-content h2 { font-size: 28px; color: var(--primary); margin-bottom: 16px; }
.about-content p { font-size: 16px; line-height: 1.8; margin-bottom: 16px; color: var(--text); }

/* ===== Contact ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0; }
.contact-info { }
.contact-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.contact-item .contact-icon { flex-shrink: 0; width: 48px; height: 48px; background: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); }
.contact-item h4 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.contact-item p { font-size: 14px; color: var(--text-light); }
.contact-form { }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: var(--transition); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,74,110,0.1); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group button { background: var(--primary); color: var(--text-white); padding: 12px 32px; border: none; border-radius: var(--radius); font-size: 16px; cursor: pointer; transition: var(--transition); }
.form-group button:hover { background: var(--primary-dark); }

/* ===== Search ===== */
.search-header { padding: 32px 0; }
.search-header p { font-size: 14px; color: var(--text-light); margin-top: 8px; }

/* ===== Sitemap ===== */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 40px 0; }
.sitemap-col h3 { font-size: 20px; color: var(--primary); margin-bottom: 12px; }
.sitemap-col ul li { padding: 4px 0; }
.sitemap-col ul li a { font-size: 14px; color: var(--text); }
.sitemap-col ul li a:hover { color: var(--accent); }

/* ===== Tag Page ===== */
.tag-header { text-align: center; padding: 48px 0; background: var(--bg); }
.tag-header h1 { font-size: 36px; color: var(--primary); }
.tag-header p { color: var(--text-light); }

/* ===== County ===== */
.county-header { padding: 48px 0; background: var(--bg); text-align: center; }
.county-header h1 { font-size: 36px; color: var(--primary); }

/* ===== Page (通用) ===== */
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.page-content h2 { font-size: 28px; color: var(--primary); margin-bottom: 16px; }
.page-content p { font-size: 16px; line-height: 1.8; margin-bottom: 16px; }
.page-content img { border-radius: var(--radius); margin: 16px 0; }

/* ===== Footer ===== */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding-top: 56px; padding-bottom: 24px; }
.footer a { color: rgba(255,255,255,0.75); }
.footer a:hover { color: var(--primary-light); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 32px; }
.footer-col h4 { color: var(--text-white); font-size: 18px; margin-bottom: 16px; position: relative; padding-bottom: 8px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 32px; height: 2px; background: var(--primary-light); }
.footer-col p, .footer-col li { font-size: 14px; line-height: 2; }
.footer-col ul li a { white-space: nowrap; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 14px; }
.float-top { position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px; background: var(--primary); color: var(--text-white); border: none; border-radius: 50%; cursor: pointer; font-size: 20px; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: var(--transition); z-index: 99; }
.float-top:hover { background: var(--accent); transform: translateY(-2px); }

/* ===== Article List Standard ===== */
.article-list { }
.article-item { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; transition: var(--transition); }
.article-item:hover { box-shadow: var(--shadow); }
.article-item h3 { font-size: 18px; margin-bottom: 8px; }
.article-item h3 a { color: var(--text); }
.article-item h3 a:hover { color: var(--primary); }
.article-item .article-summary { font-size: 14px; color: var(--text-light); margin-bottom: 12px; }
.article-item .meta { font-size: 13px; color: var(--text-light); display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 32px; }
  .section-title { font-size: 28px; }
}

@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); flex-direction: column; padding: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .main-nav.active { display: flex; }
  .nav-toggle { display: flex; }
  .advantages-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; align-items: center; gap: 16px; }
  .hero h1 { font-size: 28px; }
  .hero .hero-subtitle { font-size: 16px; }
  .article-nav { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 28px; }
  .detail-article h1 { font-size: 24px; }
}

@media (max-width: 576px) {
  .container { padding: 0 12px; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 24px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .section { padding: 40px 0; }
  .section-title { font-size: 24px; }
  .news-card .news-card-body { padding: 16px; }
  .float-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
}


/* === footer-col-* semantic variants (auto-added) === */
.footer-col-services,
.footer-col-about,
.footer-col-links,
.footer-col-contact { /* inherits .footer-col base style */ }


/* ========== 内容区样式补丁 (auto-added) ========== */

/* 段落间距 */
.article-content p,
.article-text p,
.article-body p,
.detail-body p,
.article-detail .content p,
.page-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

/* 标题样式 */
.article-content h2,
.article-text h2,
.article-body h2,
.detail-body h2,
.article-detail .content h2,
.page-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 14px;
  line-height: 1.4;
}

.article-content h3,
.article-text h3,
.article-body h3,
.detail-body h3,
.article-detail .content h3,
.page-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
  line-height: 1.4;
}

/* 列表样式 */
.article-content ul,
.article-text ul,
.article-body ul,
.detail-body ul,
.article-detail .content ul,
.page-content ul {
  list-style: disc;
  margin: 0 0 16px 24px;
}

.article-content ol,
.article-text ol,
.article-body ol,
.detail-body ol,
.article-detail .content ol,
.page-content ol {
  list-style: decimal;
  margin: 0 0 16px 24px;
}

.article-content li,
.article-text li,
.article-body li,
.detail-body li,
.article-detail .content li,
.page-content li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* 图片样式 */
.article-content img,
.article-text img,
.article-body img,
.detail-body img,
.article-detail .content img,
.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 16px 0;
}

/* 引用块 */
.article-content blockquote,
.article-text blockquote,
.article-body blockquote,
.detail-body blockquote,
.article-detail .content blockquote,
.page-content blockquote {
  border-left: 4px solid var(--primary, #2563eb);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--bg, #f9fafb);
  font-style: italic;
}

/* 代码块 */
.article-content code,
.article-text code,
.article-body code,
.detail-body code,
.article-detail .content code,
.page-content code {
  background: var(--bg, #f3f4f6);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.article-content pre,
.article-text pre,
.article-body pre,
.detail-body pre,
.article-detail .content pre,
.page-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 16px 0;
}

/* 表格样式 */
.article-content table,
.article-text table,
.article-body table,
.detail-body table,
.article-detail .content table,
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.article-content th,
.article-text th,
.article-body th,
.detail-body th,
.article-detail .content th,
.page-content th {
  background: var(--bg, #f3f4f6);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border, #e5e7eb);
}

.article-content td,
.article-text td,
.article-body td,
.detail-body td,
.article-detail .content td,
.page-content td {
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
}

/* ========== 品牌标语防溢出 ========== */
.brand-tagline,
[class*="brand-tagline"] {
  max-width: 300px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--text-light, #6b7280);
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .brand-tagline,
  [class*="brand-tagline"] {
    max-width: 200px;
    font-size: 11px;
  }
}



/* 一级栏目 - 醒目样式 */
.sidebar-cats > li > a,
.side-nav > li > a,
.sidebar-widget .side-nav > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 8px;
  border-left: 3px solid var(--primary, #2563eb);
  transition: all 0.2s;
}

.sidebar-cats > li > a:hover,
.side-nav > li > a:hover,
.sidebar-widget .side-nav > li > a:hover {
  background: var(--primary, #2563eb);
  color: #fff;
  padding-left: 18px;
}

/* 二级栏目 - 三列网格 */
.sidebar-cats > li > ul,
.sidebar-cats > li > .sidebar-subcats,
.side-nav > li > ul,
.sidebar-widget .side-nav > li > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 8px;
  padding: 8px 10px;
  margin: 0 0 8px 0;
  list-style: none;
}

.sidebar-cats > li > ul > li,
.sidebar-cats > li > .sidebar-subcats > li,
.side-nav > li > ul > li,
.sidebar-widget .side-nav > li > ul > li {
  margin: 0;
}

.sidebar-cats > li > ul > li > a,
.sidebar-cats > li > .sidebar-subcats > li > a,
.side-nav > li > ul > li > a,
.sidebar-widget .side-nav > li > ul > li > a {
  display: block;
  padding: 5px 8px;
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  transition: all 0.2s;
}

.sidebar-cats > li > ul > li > a:hover,
.sidebar-cats > li > .sidebar-subcats > li > a:hover,
.side-nav > li > ul > li > a:hover,
.sidebar-widget .side-nav > li > ul > li > a:hover {
  color: var(--primary, #2563eb);
  background: #eff6ff;
}

/* 响应式：小屏幕改为两列 */
@media (max-width: 992px) {
  .sidebar-cats > li > ul,
  .sidebar-cats > li > .sidebar-subcats,
  .side-nav > li > ul,
  .sidebar-widget .side-nav > li > ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .sidebar-cats > li > ul,
  .sidebar-cats > li > .sidebar-subcats,
  .side-nav > li > ul,
  .sidebar-widget .side-nav > li > ul {
    grid-template-columns: 1fr;
  }
}

/* ========== 侧栏分类优化 (auto-added) ========== */

/* 一级栏目 - 醒目样式，颜色跟随主题 */
.sidebar-cats > li > a,
.side-nav > li > a,
.sidebar-widget .side-nav > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
  background: var(--bg, #f9fafb);
  border-radius: 6px;
  margin-bottom: 6px;
  border-left: 3px solid var(--primary, #2563eb);
  transition: all 0.2s;
}

.sidebar-cats > li > a:hover,
.side-nav > li > a:hover,
.sidebar-widget .side-nav > li > a:hover {
  background: var(--primary, #2563eb);
  color: #fff;
  padding-left: 16px;
}

/* 二级栏目 - 自适应布局，处理长名称 */
.sidebar-cats > li > ul,
.sidebar-cats > li > .sidebar-subcats,
.side-nav > li > ul,
.sidebar-widget .side-nav > li > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  margin: 0 0 6px 0;
  list-style: none;
}

.sidebar-cats > li > ul > li,
.sidebar-cats > li > .sidebar-subcats > li,
.side-nav > li > ul > li,
.sidebar-widget .side-nav > li > ul > li {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.sidebar-cats > li > ul > li > a,
.sidebar-cats > li > .sidebar-subcats > li > a,
.side-nav > li > ul > li > a,
.sidebar-widget .side-nav > li > ul > li > a {
  display: block;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-light, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  border-radius: 4px;
  border: 1px solid var(--border, #e5e7eb);
  transition: all 0.2s;
}

.sidebar-cats > li > ul > li > a:hover,
.sidebar-cats > li > .sidebar-subcats > li > a:hover,
.side-nav > li > ul > li > a:hover,
.sidebar-widget .side-nav > li > ul > li > a:hover {
  color: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.05);
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar-cats > li > ul > li > a,
  .sidebar-cats > li > .sidebar-subcats > li > a,
  .side-nav > li > ul > li > a,
  .sidebar-widget .side-nav > li > ul > li > a {
    max-width: 100px;
    font-size: 12px;
  }
}