/* ===== Articles Page Styles ===== */

/* --- Nav link active state --- */
.nav-link.active {
  color: #3b82f6;
  font-weight: 600;
}

/* --- Articles Hero --- */
.articles-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  background: #fafafa;
}

.articles-hero-bg {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.articles-hero::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.articles-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.articles-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #059669;
  background: rgba(5, 150, 105, 0.08);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(5, 150, 105, 0.12);
}

.articles-hero-title {
  font-size: 44px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.articles-hero-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 24px;
}

/* --- Main Content --- */
.articles-main {
  padding: 40px 0 80px;
  background: #fff;
}

.articles-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* --- Sidebar Navigation --- */
.articles-sidebar {
  position: sticky;
  top: 80px;
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  background: #fafbfc;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sidebar-link.active {
  background: #ecfdf5;
  color: #059669;
  font-weight: 600;
}

.sidebar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-count {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
}

.sidebar-link.active .sidebar-count {
  color: #6ee7b7;
}

/* --- Articles Content Area --- */
.articles-content {
  flex: 1;
  min-width: 0;
}

/* --- Article Section --- */
.article-section {
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}

.article-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.section-subtitle {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 400;
}

/* --- Article Grid --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* --- Article Card --- */
.article-card {
  display: block;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.25s;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.article-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.article-card:hover .article-link-icon {
  opacity: 1;
  color: #059669;
}

.article-link-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  opacity: 0;
  transition: all 0.25s;
}

/* --- Card Header --- */
.article-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.article-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.article-avatar img {
  display: block;
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: contain;
  border-radius: 4px;
}

.article-meta {
  flex: 1;
  min-width: 0;
}

.article-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 2px;
}

.article-source {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

/* --- Card Body --- */
.article-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Card Tags --- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.article-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

.article-tag.green { color: #059669; background: #ecfdf5; }
.article-tag.blue { color: #2563eb; background: #eff6ff; }
.article-tag.purple { color: #7c3aed; background: #f5f3ff; }
.article-tag.orange { color: #ea580c; background: #fff7ed; }
.article-tag.pink { color: #db2777; background: #fdf2f8; }
.article-tag.cyan { color: #0891b2; background: #ecfeff; }
.article-tag.yellow { color: #b45309; background: #fffbeb; }
.article-tag.indigo { color: #4f46e5; background: #eef2ff; }
.article-tag.teal { color: #0d9488; background: #f0fdfa; }
.article-tag.red { color: #dc2626; background: #fef2f2; }

/* --- Card Footer --- */
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.article-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-stat {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}

.article-visit {
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
  transition: color 0.2s;
}

.article-card:hover .article-visit {
  color: #047857;
}

/* --- WeChat Card Special Styles --- */
.wechat-card {
  cursor: pointer;
}

.wechat-card:hover {
  border-color: #a7f3d0;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.08);
}

.wechat-card .article-link-icon.wechat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #07c160;
  padding: 2px 8px;
  border-radius: 4px;
  opacity: 1;
  letter-spacing: 0.5px;
}

.wechat-hint {
  color: #07c160 !important;
  font-size: 12px;
  font-weight: 600;
}

.wechat-card:hover .wechat-hint {
  color: #059669 !important;
}

/* --- WeChat Compact Card --- */
.wechat-grid {
  grid-template-columns: repeat(3, 1fr);
}

.wechat-compact {
  padding: 14px 16px;
}

.wechat-compact .article-card-header {
  margin-bottom: 6px;
}

.wechat-compact .article-meta {
  gap: 1px;
}

.wechat-compact .article-name {
  font-size: 14px;
}

.wechat-compact .article-source {
  font-size: 11px;
}

.wechat-compact .article-desc {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
  -webkit-line-clamp: 2;
}

.wechat-compact .article-tags {
  margin-bottom: 0;
}

.wechat-compact .article-tag {
  font-size: 10px;
  padding: 2px 6px;
}

/* --- WeChat Toast --- */
.wechat-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wechat-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.wechat-toast-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(7, 193, 96, 0.08);
  white-space: nowrap;
}

.wechat-toast-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.wechat-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wechat-toast-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.wechat-toast-name {
  font-size: 16px;
  font-weight: 700;
  color: #07c160;
}

.wechat-toast-copy {
  font-size: 12px;
  font-weight: 600;
  color: #07c160;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.wechat-toast-copy:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.wechat-toast-close {
  font-size: 14px;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.wechat-toast-close:hover {
  background: #f1f5f9;
  color: #475569;
}


@media (max-width: 1100px) {
  .articles-sidebar {
    display: none;
  }

  .articles-main-inner {
    max-width: 1200px;
  }
}

@media (max-width: 900px) {
  .articles-hero-title {
    font-size: 32px;
  }

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

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

@media (max-width: 600px) {
  .articles-hero {
    padding: 40px 0 32px;
  }

  .articles-hero-inner {
    padding: 0 16px;
  }

  .articles-hero-title {
    font-size: 26px;
  }

  .articles-main-inner {
    padding: 0 16px;
  }

  .article-card {
    padding: 16px;
  }

  .section-header {
    gap: 12px;
  }

  .section-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
