/* ========================================
   企业文化老司机 - 企业文化创研所
   主样式文件
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #1a3a5c;        /* 深海蓝 - 主色 */
  --primary-light: #2a5298;  /* 亮蓝 */
  --primary-dark: #0f2340;   /* 深蓝 */
  --accent: #c8922a;         /* 金色 - 点缀色 */
  --accent-light: #e8b04a;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --bg-main: #f7f8fc;
  --bg-white: #ffffff;
  --bg-light: #eef1f8;
  --border: #e2e8f0;
  --border-light: #f0f4f8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --font-main: 'Noto Serif SC', 'Source Han Serif CN', Georgia, serif;
  --font-ui: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-dark);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 68px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.nav-brand .brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-brand .brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 2px;
  margin-top: 2px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-weight: 500;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-search-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.85);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
  margin-left: 8px;
}
.nav-search-btn:hover { background: rgba(255,255,255,0.22); }
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 600px;
  margin: 0 24px;
  box-shadow: var(--shadow-lg);
}
.search-box h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
}
.search-input-wrap {
  display: flex;
  gap: 10px;
}
.search-input-wrap input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s;
}
.search-input-wrap input:focus { border-color: var(--primary-light); }
.search-input-wrap button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-input-wrap button:hover { background: var(--primary-light); }
.search-results { margin-top: 16px; max-height: 360px; overflow-y: auto; }
.search-result-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border-light);
}
.search-result-item:hover { background: var(--bg-light); }
.search-result-item h4 { font-size: 15px; margin-bottom: 4px; color: var(--primary); }
.search-result-item p { font-size: 13px; color: var(--text-muted); }
.search-close {
  float: right;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(200,146,42,0.12);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block;
  background: rgba(200,146,42,0.25);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-weight: 600;
}
.hero h1 {
  font-size: 42px;
  color: #fff;
  margin-bottom: 16px;
  font-family: var(--font-main);
  line-height: 1.3;
}
.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.78);
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 36px;
}
.stat-item { text-align: left; }
.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
  font-family: var(--font-main);
  line-height: 1.2;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 2px; }
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.9);
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.4);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.7); }

/* ========================================
   SECTION TITLES
   ======================================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-title {
  font-size: 26px;
  color: var(--primary-dark);
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  height: 84%;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.section-more {
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.section-more:hover { gap: 8px; }

/* ========================================
   ARTICLE CARDS
   ======================================== */
.articles-section { padding: 60px 0; }

/* Featured Card */
.featured-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-card .card-img {
  height: 320px;
  object-fit: cover;
  width: 100%;
}
.featured-card .card-img-placeholder {
  height: 320px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: rgba(255,255,255,0.3);
}
.featured-card .card-body { padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; }
.featured-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  width: fit-content;
}
.featured-card .card-title {
  font-size: 24px;
  margin-bottom: 14px;
  font-family: var(--font-main);
  line-height: 1.4;
  color: var(--primary-dark);
}
.featured-card .card-title:hover { color: var(--primary-light); }
.featured-card .card-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.card-meta .tag-badge {
  background: var(--bg-light);
  color: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.card-meta .tag-badge:hover { background: var(--primary-light); color: #fff; }

/* Standard Card */
.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-card .card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.article-card .card-img-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
}
.article-card .card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-card .card-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  width: fit-content;
}
.type-article { background: #e8f0fe; color: var(--primary-light); }
.type-video { background: #fce8e6; color: #c5221f; }
.article-card .card-title {
  font-size: 17px;
  margin-bottom: 10px;
  font-family: var(--font-main);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .card-title:hover { color: var(--primary-light); }
.article-card .card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  line-height: 1.7;
}
.article-card .card-meta { padding-top: 12px; border-top: 1px solid var(--border-light); }

/* ========================================
   TAG CLOUD
   ======================================== */
.tags-section { padding: 0 0 48px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.tag-item:hover, .tag-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tag-count {
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.tag-item:hover .tag-count, .tag-item.active .tag-count {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
  padding: 0 12px;
}
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========================================
   ARTICLE DETAIL PAGE
   ======================================== */
.article-page { padding: 48px 0 80px; }
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.article-main { min-width: 0; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb span { color: var(--text-muted); }

/* Article Header */
.article-header { margin-bottom: 32px; }
.article-tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.article-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.article-title {
  font-size: 32px;
  line-height: 1.4;
  color: var(--primary-dark);
  margin-bottom: 16px;
  font-family: var(--font-main);
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta-bar i { margin-right: 4px; }
.article-wechat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #07c160;
  font-weight: 500;
}
.article-wechat-link:hover { text-decoration: underline; }

/* Article Cover */
.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}
.article-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  background: #000;
}
.article-video-wrap iframe,
.article-video-wrap video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Article Body */
.article-body {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 { font-size: 24px; margin: 36px 0 16px; color: var(--primary); border-left: 4px solid var(--accent); padding-left: 12px; }
.article-body h3 { font-size: 20px; margin: 28px 0 12px; color: var(--primary); }
.article-body h4 { font-size: 17px; margin: 20px 0 10px; }
.article-body p { margin-bottom: 20px; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body strong { color: var(--primary-dark); font-weight: 700; }
.article-body a { color: var(--primary-light); text-decoration: underline; }
.article-body img { border-radius: var(--radius-md); margin: 24px auto; max-width: 100%; display: block !important; height: auto !important; }
/* 兼容微信导入文章的 div 包装：重置 line-height，防止图片被压缩为 0 */
.article-body div { line-height: inherit; font-size: inherit; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article-body th { background: var(--primary); color: #fff; padding: 12px 16px; text-align: left; }
.article-body td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.article-body tr:hover td { background: var(--bg-light); }

/* Article Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--border); }
.article-tag {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--primary-light);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.article-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Article Related / Sidebar */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title i { color: var(--accent); }
.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.related-item:hover { background: var(--bg-light); }
.related-item .r-img {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.related-item .r-img-placeholder {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.related-item h4 { font-size: 13px; line-height: 1.5; color: var(--text-primary); font-family: var(--font-main); }
.related-item .r-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========================================
   FOOTER
   ======================================== */
/* ========================================
   WECHAT BANNER
   ======================================== */
.wechat-banner-section {
  padding: 0 0 60px;
}
.wechat-banner {
  background: linear-gradient(135deg, #0f1e3d 0%, #1a3a6b 60%, #0f2d5a 100%);
  border-radius: 20px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.wechat-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.wechat-banner-text { flex: 1; }
.wechat-banner-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  font-family: var(--font-main);
}
.wechat-banner-title i { color: #07c160; margin-right: 6px; }
.wechat-banner-sub {
  font-size: 15px;
  color: var(--accent-light, #d4af37);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.wechat-banner-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
}
.wechat-banner-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wechat-banner-qr img {
  width: 130px;
  height: 130px;
  border-radius: 10px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.2);
  display: block;
}
.wechat-banner-qr span {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
}

.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 52px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .brand-name { font-size: 20px; font-family: var(--font-main); color: #fff; margin-bottom: 6px; }
.footer-brand .brand-sub { font-size: 12px; color: rgba(255,255,255,0.45); letter-spacing: 2px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; max-width: 280px; }
.footer-title { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin-bottom: 24px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-wechat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(7,193,96,0.2);
  border: 1px solid rgba(7,193,96,0.4);
  color: #4eda88;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  margin-top: 12px;
}
.footer-wechat i { font-size: 16px; }
.footer-qr {
  margin-top: 16px;
  display: inline-block;
}
.footer-qr img {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 3px solid rgba(255,255,255,0.15);
}
.footer-qr p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; margin-bottom: 10px; color: var(--text-secondary); }
.empty-state p { font-size: 14px; }

/* ========================================
   LOADING
   ======================================== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   ARTICLES LIST PAGE - FILTERS
   ======================================== */
.list-page-header {
  background: var(--primary);
  padding: 48px 0 40px;
  color: #fff;
}
.list-page-header h1 { font-size: 32px; color: #fff; margin-bottom: 8px; }
.list-page-header p { color: rgba(255,255,255,0.7); font-size: 15px; }
.filter-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 68px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.filter-tag {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-white);
}
.filter-tag:hover, .filter-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.filter-type {
  display: flex;
  gap: 6px;
}
.type-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: var(--bg-white);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.type-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ========================================
   ADMIN - BACKEND STYLES
   ======================================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: var(--primary-dark);
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
}
.admin-sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar-brand .brand-name { font-size: 16px; font-family: var(--font-main); color: #fff; }
.admin-sidebar-brand .brand-sub { font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 1px; margin-top: 2px; }
.admin-nav { padding: 16px 0; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-item.active { background: rgba(255,255,255,0.12); color: #fff; border-left-color: var(--accent); }
.admin-nav-item i { width: 18px; text-align: center; font-size: 15px; }
.admin-nav-section { padding: 14px 20px 6px; font-size: 11px; color: rgba(255,255,255,0.35); letter-spacing: 1.5px; font-weight: 600; }
.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-topbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.admin-topbar h2 { font-size: 18px; font-weight: 700; color: var(--primary-dark); }
.admin-content { padding: 28px; flex: 1; }

/* Admin Stats */
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-card .stat-info .num { font-size: 28px; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.stat-card .stat-info .label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.icon-blue { background: #dbeafe; color: var(--primary-light); }
.icon-green { background: #d1fae5; color: #059669; }
.icon-gold { background: #fef3c7; color: #d97706; }
.icon-red { background: #fee2e2; color: #dc2626; }

/* Admin Table */
.admin-table-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-table-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-table-header h3 { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.admin-search-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  width: 220px;
  outline: none;
  font-family: var(--font-ui);
  transition: border-color 0.2s;
}
.admin-search-input:focus { border-color: var(--primary-light); }
.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-light); }
.btn-gold { background: var(--accent); color: #fff; }
.btn-gold:hover { background: var(--accent-light); }
.btn-red { background: #dc2626; color: #fff; }
.btn-red:hover { background: #b91c1c; }
.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-sm:hover { border-color: var(--primary); color: var(--primary); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--bg-light);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.data-table tr:hover td { background: var(--bg-light); }
.data-table tr:last-child td { border-bottom: none; }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-published { background: #d1fae5; color: #059669; }
.status-draft { background: #f3f4f6; color: #6b7280; }
.table-title-cell { max-width: 280px; }
.table-title-cell .t-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.table-title-cell .t-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.table-title-cell .t-tag {
  background: var(--bg-light);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.action-btns { display: flex; gap: 6px; }

/* Admin Editor */
.editor-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.editor-main { display: flex; flex-direction: column; gap: 20px; }
.editor-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.editor-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.editor-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg-white);
}
.editor-input:focus { border-color: var(--primary-light); }
.editor-input.title-input { font-size: 18px; font-family: var(--font-main); font-weight: 700; }
.editor-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-ui);
  outline: none;
  background: var(--bg-white);
  cursor: pointer;
}
.editor-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.tags-input-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 44px;
  cursor: text;
}
.tag-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 12px;
}
.tag-chip button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.tags-text-input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-ui);
  flex: 1;
  min-width: 80px;
}
.publish-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 18px; margin-bottom: 12px; color: var(--primary-dark); }
.modal-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.success { background: #065f46; }
.toast.error { background: #7f1d1d; }
.toast.warning { background: #92400e; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }
.toast.leaving { animation: slideOut 0.3s ease forwards; }

/* ========================================
   RESPONSIVE
   ======================================== */

/* --- 平板 1024px --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
}

/* --- 手机横屏 / 小平板 768px --- */
@media (max-width: 768px) {

  /* 网格布局 */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* 精选卡片：手机竖排 */
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .card-img,
  .featured-card .card-img-placeholder { height: 200px; }
  .featured-card .card-body { padding: 20px; }
  .featured-card .card-title { font-size: 20px; }

  /* 导航栏 */
  .navbar { padding: 0 16px; height: 60px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }       /* 手机隐藏副标题节省空间 */
  .nav-brand .brand-icon { width: 36px; height: 36px; }

  /* 汉堡菜单展开 */
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;           /* fixed 避免被内容遮住 */
    top: 60px;
    left: 0; right: 0;
    background: var(--primary-dark);
    padding: 12px 16px 20px;
    gap: 2px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-menu.open li { width: 100%; }
  .nav-menu.open .nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.9);
  }
  .nav-menu.open .nav-link:hover,
  .nav-menu.open .nav-link.active {
    background: rgba(255,255,255,0.12);
  }
  .hamburger { display: flex; }

  /* 搜索按钮 */
  .nav-search-btn { width: 34px; height: 34px; }

  /* Hero 区域 */
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 26px; line-height: 1.4; margin-bottom: 12px; }
  .hero p { font-size: 15px; margin-bottom: 24px; }
  .hero-tag { font-size: 11px; margin-bottom: 14px; }
  .hero-stats { gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 12px; }
  .hero-cta { gap: 10px; }
  .btn-primary, .btn-outline { padding: 11px 20px; font-size: 14px; }

  /* Section 标题 */
  .section-title { font-size: 20px; }
  .section-header { margin-bottom: 20px; }
  .articles-section { padding: 36px 0; }
  .tags-section { padding: 0 0 32px; }

  /* 文章卡片 */
  .article-card .card-img,
  .article-card .card-img-placeholder { height: 170px; }
  .article-card .card-body { padding: 14px; }
  .article-card .card-title { font-size: 15px; }

  /* 列表页 Header */
  .list-page-header { padding: 28px 0 24px; }
  .list-page-header h1 { font-size: 24px; }

  /* 筛选栏：手机竖排 */
  .filter-bar { top: 60px; padding: 10px 0; }
  .filter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .filter-tags { gap: 6px; }
  .filter-tag { font-size: 12px; padding: 4px 10px; }
  .filter-type { flex-wrap: wrap; }
  .type-btn { font-size: 12px; padding: 4px 10px; }

  /* 文章详情 */
  .article-page { padding: 28px 0 56px; }
  .article-title { font-size: 22px; }
  .article-meta-bar { gap: 12px; font-size: 12px; }
  .article-body { font-size: 16px; line-height: 1.85; }
  .article-body h2 { font-size: 20px; }
  .article-body h3 { font-size: 17px; }
  .article-tags { flex-wrap: wrap; gap: 6px; }

  /* 搜索弹窗 */
  .search-overlay { padding-top: 70px; align-items: flex-start; }
  .search-box { margin: 0 12px; padding: 18px; border-radius: var(--radius-md); }
  .search-input-wrap input { font-size: 15px; padding: 10px 12px; }

  /* 分页 */
  .pagination { gap: 4px; padding: 28px 0; }
  .page-btn { min-width: 34px; height: 34px; font-size: 13px; padding: 0 8px; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 36px 0 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-brand p { max-width: 100%; }

  /* 微信横幅手机端 */
  .wechat-banner { flex-direction: column; padding: 28px 24px; text-align: center; }
  .wechat-banner-title { font-size: 20px; }
  .wechat-banner-qr img { width: 120px; height: 120px; }
  .wechat-banner-section { padding: 0 0 40px; }

  /* 后台 */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .admin-table-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-search-input { width: 100% !important; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 13px; }
  .action-btns { flex-wrap: wrap; gap: 4px; }
}

/* --- 手机竖屏 480px --- */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  /* 网格：手机单列 */
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Hero */
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 22px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }

  /* 文章卡片：更紧凑 */
  .article-card .card-img,
  .article-card .card-img-placeholder { height: 150px; }
  .article-card .card-title { font-size: 14px; }
  .article-card .card-summary { display: none; } /* 手机隐藏摘要，减少滚动 */
  .article-card .card-body { padding: 12px; }
  .card-meta { font-size: 11px; gap: 8px; }

  /* 精选卡片 */
  .featured-card .card-title { font-size: 18px; }
  .featured-card .card-summary { -webkit-line-clamp: 2; }

  /* 标签云 */
  .tag-item { padding: 5px 12px; font-size: 12px; }

  /* 文章详情 */
  .article-title { font-size: 20px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 18px; margin: 28px 0 12px; }
  .article-body h3 { font-size: 16px; }
  .article-body blockquote { padding: 12px 14px; font-size: 14px; }
  .article-body table { font-size: 13px; }
  .article-body th, .article-body td { padding: 8px 10px; }
  .breadcrumb { font-size: 12px; margin-bottom: 16px; }

  /* 列表页 */
  .list-page-header { padding: 20px 0 18px; }
  .list-page-header h1 { font-size: 20px; }
  .filter-bar { position: static; } /* 小屏取消sticky筛选栏，避免空间不够 */

  /* 章节标题 */
  .section-title { font-size: 18px; }

  /* 搜索框 */
  .search-box { margin: 0 8px; padding: 16px; }
  .search-results { max-height: 260px; }
  .search-result-item h4 { font-size: 14px; }

  /* 分页：只显示当前页附近 */
  .pagination { padding: 20px 0; }

  /* 后台编辑器 */
  .admin-content { padding: 12px; }
  .editor-card { padding: 16px; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }
  .stat-card .stat-info .num { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }

  /* 页脚简化 */
  .footer-links { display: none; } /* 手机隐藏次要链接，保留品牌信息 */
  .footer-grid > div:not(.footer-brand) { display: none; }
}

/* --- 超小屏 375px 以下 --- */
@media (max-width: 375px) {
  .hero h1 { font-size: 20px; }
  .article-title { font-size: 18px; }
  .nav-brand .brand-icon { width: 32px; height: 32px; }
  .brand-name { font-size: 15px; }
  .grid-4 { grid-template-columns: 1fr; }
}
