/**
 * MigrantLaw Theme for DataLife Engine 20.0
 * Specialized SEO Legal & Migration Information Portal
 * Designed for High Organic Search Traffic & Core Web Vitals
 */

:root {
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --color-primary: #6493C0;
  --color-primary-hover: #5282af;
  --color-primary-light: #8eb5dc;
  --color-primary-dark: #1b3854;
  --color-primary-surface: #f0f6fb;
  --color-accent: #d46238;
  --color-accent-hover: #b84f29;
  --color-accent-surface: #fff8f5;
  --color-link: #2b6194;
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;
  --color-info-bg: #eff6fb;
  --color-info-border: #bcd5ec;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --container-max-width: 1240px;
  --sidebar-width: 340px;
  --content-gap: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container */
.site-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--color-accent);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-topbar {
  background-color: var(--color-primary-dark);
  color: #94a3b8;
  font-size: 13px;
  padding: 6px 0;
}

.header-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
}

.topbar-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.topbar-links {
  display: flex;
  gap: 16px;
}

.topbar-links a {
  color: #cbd5e1;
  font-size: 13px;
}

.topbar-links a:hover {
  color: #ffffff;
}

.header-main {
  padding: 14px 0;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Logo */
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-emblem-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-brand:hover .brand-emblem-wrap {
  transform: scale(1.06);
}

.brand-logo-svg {
  display: block;
  width: 46px;
  height: 46px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 2px;
}

/* Header Consultation Hotline */
.header-hotline {
  display: flex;
  align-items: center;
}

.hotline-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background-color: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.hotline-phone-link:hover {
  background-color: #ffedd5;
  border-color: #fed7aa;
}

.hotline-icon-wrap {
  width: 34px;
  height: 34px;
  background-color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.hotline-content {
  display: flex;
  flex-direction: column;
}

.hotline-number {
  font-size: 15px;
  font-weight: 800;
  color: #9a3412;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hotline-note {
  font-size: 10.5px;
  font-weight: 600;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Header Search */
.header-search-form {
  position: relative;
  width: 260px;
}

.header-search-input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-alt);
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.header-search-input:focus {
  outline: none;
  border-color: var(--color-primary-light);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(15, 43, 72, 0.1);
  width: 300px;
}

.header-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-btn:hover {
  color: var(--color-primary);
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
}

/* Category Navigation Bar */
.category-nav-bar {
  background-color: var(--color-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 100;
}

.category-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.category-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.category-nav-item {
  flex-shrink: 0;
}

.category-nav-link {
  display: block;
  padding: 12px 18px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}

.category-nav-link:hover,
.category-nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.14);
  border-bottom-color: var(--color-accent);
}

/* Priority+ Navigation: More / Overflow Dropdown */
.category-nav-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0;
}

.category-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.category-more-btn:hover,
.category-nav-more.open .category-more-btn {
  background-color: rgba(255, 255, 255, 0.16);
  border-bottom-color: var(--color-accent);
}

.category-more-icon {
  transition: transform 0.2s ease;
}

.category-nav-more.open .category-more-icon {
  transform: rotate(180deg);
}

.category-overflow-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.18), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  padding: 6px 0;
  list-style: none;
  z-index: 1000;
  animation: navDropdownFade 0.18s ease forwards;
}

@keyframes navDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-nav-more.open .category-overflow-dropdown {
  display: block;
}

.category-overflow-dropdown .category-nav-item {
  width: 100%;
}

.category-overflow-dropdown .category-nav-link {
  display: block;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  border-bottom: none;
  border-left: 3px solid transparent;
  background-color: transparent;
  white-space: normal;
  text-decoration: none;
  transition: all 0.15s ease;
}

.category-overflow-dropdown .category-nav-link:hover,
.category-overflow-dropdown .category-nav-link.active {
  background-color: var(--color-info-bg);
  color: var(--color-link);
  border-left-color: var(--color-link);
  padding-left: 22px;
}

/* ==========================================================================
   Breadcrumbs (Speedbar)
   ========================================================================== */
.breadcrumbs-bar {
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.breadcrumbs-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs-item a {
  color: var(--text-secondary);
}

.breadcrumbs-item a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.breadcrumbs-separator {
  color: var(--border-hover);
  font-size: 11px;
}

.breadcrumbs-current {
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Page Layout & Grid
   ========================================================================== */
.main-wrapper {
  padding: 10px 0 50px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: var(--content-gap);
  align-items: start;
}

.main-content {
  min-width: 0;
}

.site-sidebar {
  min-width: 0;
}

/* ==========================================================================
   Category SEO Lead Block
   ========================================================================== */
.category-seo-lead {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.category-seo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: var(--color-info-bg);
  color: var(--color-link);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.category-seo-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.category-seo-text p {
  margin-bottom: 10px;
}

.category-seo-text p:last-child {
  margin-bottom: 0;
}

.category-seo-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

.category-seo-text a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-seo-text a:hover {
  color: var(--color-accent);
}

.category-seo-text ul,
.category-seo-text ol {
  margin: 10px 0 10px 20px;
  padding: 0;
}

.category-seo-text li {
  margin-bottom: 4px;
}

/* ==========================================================================
   Homepage Portal Hub Architecture (SEO Silo + Pillar Content)
   ========================================================================== */
.home-hub-header {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.home-hero-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fed7aa;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.home-hub-h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.home-hub-lead {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.65;
  max-width: 820px;
}

/* Category Hub Cards (Silo Grid) */
.hub-categories-section {
  margin-bottom: 36px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.hub-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.hub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.hub-card-icon.rvp {
  background-color: #eff6ff;
  color: #1e3a5f;
}

.hub-card-icon.vnzh {
  background-color: #ecfdf5;
  color: #047857;
}

.hub-card-icon.citizenship {
  background-color: #fef2f2;
  color: #b91c1c;
}

.hub-card-icon.patent {
  background-color: #fff7ed;
  color: #c2410c;
}

.hub-card-icon.reg {
  background-color: #f0f9ff;
  color: #0284c7;
}

.hub-card-icon.docs {
  background-color: #eef2ff;
  color: #4f46e5;
}

.hub-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.35;
  margin-bottom: 6px;
}

.hub-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.hub-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  display: inline-block;
  margin-top: auto;
}

/* Pillar Content Guides Section */
.home-pillar-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.pillar-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.pillar-section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pillar-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.2s ease;
}

.pillar-card:hover {
  background-color: #ffffff;
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.pillar-step-badge {
  display: inline-block;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.pillar-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.pillar-card-title a {
  color: var(--color-primary-dark);
}

.pillar-card-title a:hover {
  color: var(--color-accent);
}

.pillar-card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Feed Section Header before latest news */
.feed-section-header {
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.feed-section-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--color-accent);
}

.feed-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.3;
}

.feed-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Homepage FAQ Section (Schema.org FAQPage) */
.home-faq-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-top: 40px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.faq-item:hover {
  background-color: #ffffff;
  border-color: var(--border-hover);
}

.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-question::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-answer {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 34px;
}

/* ==========================================================================
   Article Cards (shortstory.tpl)
   ========================================================================== */
.articles-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.article-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.article-category-badge {
  display: inline-block;
  background-color: var(--color-info-bg);
  color: var(--color-link);
  border: 1px solid var(--color-info-border);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-category-badge a,
.article-category-badge a:hover,
.article-category-badge a:focus,
.article-card:hover .article-category-badge,
.article-card:hover .article-category-badge a {
  color: var(--color-link) !important;
  text-decoration: none !important;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.article-card-title a {
  color: var(--text-primary);
}

.article-card-title a:hover {
  color: var(--color-accent);
}

.article-card-snippet {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}

.article-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-success);
  font-weight: 600;
}

.article-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-accent);
}

.article-readmore-btn:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Full Article Page (fullstory.tpl)
   ========================================================================== */
.article-full-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.article-h1-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-primary-dark);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

/* E-E-A-T Trust Panel */
.trust-panel {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 24px;
}

.trust-panel-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-icon {
  width: 18px;
  height: 18px;
  color: var(--color-success);
}

.trust-panel-label {
  color: var(--text-muted);
}

.trust-panel-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* Table of Contents (TOC) */
.toc-box {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.toc-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-toggle-btn {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.toc-list {
  margin-top: 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-item {
  list-style: none;
}

.toc-item a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.toc-item a:hover {
  color: var(--color-accent);
}

.toc-item a:hover .toc-text {
  text-decoration: underline;
}

.toc-num {
  font-weight: 700;
  color: inherit;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 24px;
}

.toc-text {
  color: inherit;
}

/* Sub-items hierarchy (H3) */
.toc-item.toc-h3 {
  padding-left: 24px;
}

.toc-item.toc-h3 a {
  font-size: 14.5px;
  font-weight: 500;
  color: #1e3a8a;
}

.toc-item.toc-h3 .toc-num {
  min-width: 32px;
}

/* Article Body Typography */
.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: #1e293b;
}

/* In-Article Links (High contrast & distinct styling) */
.article-body a {
  color: #1a56db;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(26, 86, 219, 0.45);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.article-body a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.article-body h2 a,
.article-body h3 a,
.article-body h4 a {
  color: inherit;
  text-decoration: none;
}

.article-body h2 a:hover,
.article-body h3 a:hover,
.article-body h4 a:hover {
  color: var(--color-accent);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 28px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  text-align: left;
}

.article-body th {
  background-color: var(--bg-surface-alt);
  font-weight: 700;
  color: var(--color-primary);
}

.article-body tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Legal Callout Boxes (Clean modern framed design, no thick left border) */
.legal-callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 26px 0;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-alt);
}

.legal-callout-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-callout.warning {
  border-color: #fecaca;
  background-color: #fff5f5;
}

.legal-callout.warning .legal-callout-title {
  color: #b91c1c;
}

.legal-callout.law {
  border-color: #bfdbfe;
  background-color: #eff6ff;
}

.legal-callout.law .legal-callout-title {
  color: #1d4ed8;
}

.legal-callout.doc {
  border-color: #bbf7d0;
  background-color: #f0fdf4;
}

.legal-callout.doc .legal-callout-title {
  color: #15803d;
}

.article-body blockquote {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 22px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Social Share & Copy Link */
.article-share-bar {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.share-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.share-btn:hover {
  opacity: 0.9;
  color: #ffffff;
}

.share-tg {
  background-color: #229ed9;
}

.share-vk {
  background-color: #0077ff;
}

.share-wa {
  background-color: #25d366;
}

.share-copy {
  background-color: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.share-copy:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* Author Expert Box */
.author-expert-box {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 32px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.author-details {
  flex: 1;
}

.author-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.author-role {
  font-size: 13px;
  color: var(--color-success);
  font-weight: 600;
  margin-bottom: 6px;
}

.author-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Related News Grid (relatednews.tpl)
   ========================================================================== */
.related-articles-section {
  margin-top: 36px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.related-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.related-item-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  background-color: #f8fafc;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.related-item-card:hover {
  background-color: #ffffff;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.related-item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.related-item-title a {
  color: var(--color-primary-dark);
}

.related-item-title a:hover {
  color: var(--color-accent);
}

.related-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.sidebar-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Sidebar List */
.sidebar-links-list {
  list-style: none;
}

.sidebar-links-list li {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.sidebar-links-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-links-list li a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-links-list li a:hover {
  color: var(--color-accent);
}

.sidebar-badge {
  font-size: 11px;
  background-color: var(--bg-surface-alt);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Sticky Warning/Help Widget */
.sidebar-help-card {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-help-title {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-help-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ==========================================================================
   Pagination (navigation.tpl)
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 36px 0;
}

.pagination-container a,
.pagination-container>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-container a:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.pagination-container span.current,
.pagination-container .current {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Reset any nested span inside pagination links to prevent double background */
.pagination-container a span {
  display: inline;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  color: inherit !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   Comments / Q&A Section (comments.tpl & addcomments.tpl)
   ========================================================================== */
.comments-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

.comments-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.comment-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.comment-author {
  font-weight: 700;
  color: var(--color-primary);
}

.comment-date {
  color: var(--text-muted);
  font-size: 12px;
}

.comment-content {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Add comment form */
.add-comment-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}

.add-comment-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(15, 43, 72, 0.1);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.submit-btn {
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--color-primary-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-primary-dark);
  color: #94a3b8;
  padding-top: 50px;
  padding-bottom: 24px;
  font-size: 14px;
  border-top: 4px solid var(--color-primary-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-disclaimer {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #64748b;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {

  .header-status-nav,
  .header-search-form {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .article-full-container {
    padding: 24px 20px;
  }

  .article-h1-title {
    font-size: 24px;
  }

  .trust-panel {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .category-nav-bar {
    display: none;
  }

  .category-nav-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .category-nav-list {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }

  .category-nav-item {
    width: 100%;
  }

  .category-nav-link {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .category-nav-more {
    display: none !important;
  }

  .category-seo-lead {
    padding: 16px;
    gap: 12px;
    margin-bottom: 20px;
  }

  .category-seo-icon {
    display: none;
  }

  .category-seo-text {
    font-size: 14px;
  }
}

/* ==========================================================================
   Hotline 8 800 Consultation Components
   ========================================================================== */
.topbar-phone-link {
  color: #fed7aa !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topbar-phone-link:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Header Hotline */
.header-hotline {
  display: flex;
  align-items: center;
}

.hotline-phone-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background-color: var(--color-success-bg);
  border: 1px solid #bbf7d0;
  transition: all 0.2s ease;
}

.hotline-phone-link:hover {
  background-color: #dcfce7;
  border-color: #86efac;
  box-shadow: var(--shadow-sm);
}

.hotline-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-success);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hotline-content {
  display: flex;
  flex-direction: column;
}

.hotline-number {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.hotline-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-success);
}

/* Mobile Header Call Button */
.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--color-success);
  color: #ffffff;
  border: none;
  text-decoration: none;
}

.mobile-call-btn:hover {
  background-color: #059669;
  color: #ffffff;
}

/* Sidebar Hotline Card */
.sidebar-hotline-card {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  padding: 22px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-hotline-badge {
  display: inline-block;
  background-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.sidebar-hotline-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #ffffff;
}

.sidebar-hotline-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 16px;
}

.sidebar-hotline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background-color: var(--color-accent);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(194, 65, 12, 0.3);
}

.sidebar-hotline-btn:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.sidebar-hotline-sub {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
}

/* Footer Hotline Banner */
.footer-hotline-banner {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-hotline-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.footer-hotline-sub {
  font-size: 13px;
  color: #cbd5e1;
}

.footer-hotline-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-success);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(4, 120, 87, 0.4);
}

.footer-hotline-btn:hover {
  background-color: #059669;
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .header-hotline {
    display: none;
  }

  .footer-hotline-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .mobile-header-actions {
    display: flex;
  }
}