/* ===== Sub-page Navbar Override ===== */
/* 二级页面：初始透明背景（在page-hero上方），滚动后变白 */
.navbar {
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* 初始状态：白色导航链接 */
.navbar .nav-link {
  color: white;
}
.navbar .nav-link:hover {
  color: #7dd3fc;
}
.navbar .mobile-menu-btn {
  color: white;
}

/* 滚动后：深色导航链接 */
.navbar.scrolled .nav-link {
  color: #374151;
}
.navbar.scrolled .nav-link:hover {
  color: #0369a1;
}
.navbar.scrolled .mobile-menu-btn {
  color: #374151;
}

/* ===== Article Layout ===== */
.article-layout { padding: 4rem 0; }

.content-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .content-grid { grid-template-columns: 1fr 320px; } }

/* ===== Article Header ===== */
.article-category {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 1rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500;
  margin-bottom: 1.25rem;
}
.article-title {
  font-size: 1.75rem; font-weight: 700; color: #111827;
  line-height: 1.35; margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .article-title { font-size: 2rem; } }

.article-meta {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.meta-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; color: #6b7280; }

/* ===== Article Body ===== */
.article-content { font-size: 1rem; line-height: 1.85; color: #374151; }
.article-content h2 {
  font-size: 1.375rem; font-weight: 700; color: #111827;
  margin: 2rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid #0891b2;
}
.article-content h3 { font-size: 1.125rem; font-weight: 600; color: #111827; margin: 1.5rem 0 0.75rem; }
.article-content p  { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content img {
  max-width: 100%; height: auto; border-radius: 0.75rem;
  margin: 1.5rem 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.article-content blockquote {
  margin: 1.5rem 0; padding: 1rem 1.5rem;
  background: #eff6ff; border-left: 4px solid #0369a1;
  border-radius: 0 0.5rem 0.5rem 0; color: #374151; font-style: italic;
}
.article-content pre {
  margin: 1.5rem 0; padding: 1.25rem;
  background: #1f2937; color: #e5e7eb; border-radius: 0.75rem;
  overflow-x: auto; font-size: 0.875rem; line-height: 1.7;
}
.article-content code {
  padding: 0.125rem 0.375rem; background: #eff6ff;
  border-radius: 0.25rem; font-size: 0.875em; color: #0369a1;
}
.article-content pre code { background: transparent; color: inherit; padding: 0; }

/* ===== Article Footer ===== */
.article-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #f3f4f6; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tag {
  padding: 0.375rem 0.875rem;
  background: #eff6ff; color: #0369a1;
  border: 1px solid #bfdbfe; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500;
  text-decoration: none; transition: all 0.3s;
}
.tag:hover { background: #0369a1; color: white; border-color: #0369a1; }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nav-item {
  padding: 1.25rem;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  text-decoration: none; color: inherit; transition: all 0.3s;
}
.nav-item:hover { border-color: #0891b2; background: #eff6ff; }
.nav-label {
  font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.375rem;
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-title {
  font-size: 0.875rem; font-weight: 500; color: #374151;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nav-item.prev .nav-label { justify-content: flex-start; }
.nav-item.next { text-align: right; }
.nav-item.next .nav-label { justify-content: flex-end; }

/* ===== Sidebar ===== */
.sidebar-card {
  background: white; border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #f3f4f6; padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-title {
  font-size: 1rem; font-weight: 600; color: #111827;
  margin-bottom: 1.25rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid #eff6ff;
  display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-title::before {
  content: '';
  display: inline-block; width: 3px; height: 1rem;
  background: linear-gradient(135deg, #0369a1, #0891b2);
  border-radius: 9999px;
}

/* Related news list */
.related-item {
  display: flex; gap: 1rem; padding: 0.75rem 0;
  border-bottom: 1px solid #f9fafb;
  text-decoration: none; color: inherit; transition: all 0.3s;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover .related-title { color: #0369a1; }

.related-thumb {
  width: 4rem; height: 3rem; border-radius: 0.5rem;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-thumb svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.related-title {
  font-size: 0.8125rem; font-weight: 500; color: #374151;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-date { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }

/* Share buttons */
.share-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.share-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.3s;
}
.share-btn-copy   { background: #f3f4f6; color: #374151; }
.share-btn-copy:hover { background: #e5e7eb; }
.share-btn-wechat { background: #07c160; color: white; }
.share-btn-wechat:hover { background: #06a352; }
.share-btn-weibo  { background: #e6162d; color: white; }
.share-btn-weibo:hover { background: #c41226; }
.share-btn-email  { background: #0369a1; color: white; }
.share-btn-email:hover { background: #0c4a6e; }

/* Back button */
.back-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white; border: 1px solid #e5e7eb; border-radius: 0.5rem;
  font-size: 0.875rem; color: #374151;
  text-decoration: none; transition: all 0.3s; margin-bottom: 2rem;
}
.back-btn:hover { border-color: #0891b2; color: #0369a1; }
