/* =============================================
   design_dark — Dark Theme Template
   ============================================= */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.12);
  --text: #cbd5e1;
  --text-heading: #f1f5f9;
  --gray: #64748b;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --bg: #0b1120;
  --bg-card: #131c31;
  --bg-alt: #0f172a;
  --border: rgba(148, 163, 184, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --text-light: #94a3b8;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
;}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: #60a5fa; }
img { max-width: 100%; height: auto; vertical-align: middle; }
svg { vertical-align: middle; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Page Background */
.page-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(99,102,241,0.04) 0%, transparent 50%),
              var(--bg);
}

/* =============================================
   Top Bar
   ============================================= */
.topbar { width: 100%; background: rgba(15,23,42,0.95); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--gray); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 16px; flex-wrap: wrap; }
.topbar-inner > span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-inner svg { flex-shrink: 0; opacity: 0.5; }
.topbar-links { display: flex; gap: 12px; margin-left: auto; }
.topbar-links a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.topbar-links a:hover { color: var(--text-heading); }

/* =============================================
   Header / Navigation
   ============================================= */
.header { width: 100%; position: sticky; top: 0; z-index: 1000; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: nowrap; gap: 12px; }
header[class*="header"] { position: sticky; top: 0; z-index: 1000; }

.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }

[class*="logo"] { flex-shrink: 0; max-width: 260px; }
[class*="logo"] a, [class*="logo-text"] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.logo {
  font-size: 1.25rem; font-weight: 800; color: var(--text-heading);
  text-decoration: none; display: flex; align-items: center; gap: 2px; letter-spacing: -0.5px;
}
.logo:hover { color: var(--primary); }
.logo-acc { color: var(--primary); font-weight: 900; font-size: 1.3em; }

/* Nav */
.nav { display: flex; align-items: center; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: nowrap; align-items: center; }
.nav-list > li { position: relative; flex-shrink: 0; }
.nav-list > li > a {
  display: block; padding: 10px 14px; white-space: nowrap;
  text-decoration: none; font-size: 14px; color: var(--text);
  border-radius: 6px; transition: background 0.3s ease, color 0.3s ease;
}
.nav-list > li > a:hover { background: rgba(255,255,255,0.06); color: var(--text-heading); }
.nav-list > li > a.active { color: var(--primary); background: var(--primary-light); }

/* Submenu */
.nav-list li ul, .subnav {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 180px; z-index: 300; padding: 8px 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-list li:hover > ul { display: block; }
.nav-list li ul a { padding: 8px 18px; display: block; white-space: nowrap; text-decoration: none; font-size: 14px; color: var(--text); transition: background 0.2s; }
.nav-list li ul a:hover { background: rgba(255,255,255,0.06); color: var(--text-heading); }

/* Nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-heading); }
.nav-toggle svg { display: block; }

/* Header search */
.header-search { display: flex; align-items: center; }
.header-search button {
  background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--gray); border-radius: 6px; transition: background 0.2s, color 0.2s;
}
.header-search button:hover { background: rgba(255,255,255,0.06); color: var(--text-heading); }

@media (max-width: 992px) {
  .header .container { flex-wrap: nowrap; }
}
@media (max-width: 768px) {
  .header .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; width: 100%; flex-basis: 100%; }
  .nav.active { max-height: 90vh; overflow-y: auto; }
  .nav-list { flex-direction: column; width: 100%; flex-wrap: wrap; }
  .nav-list > li > a { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .nav-list li ul { position: static; box-shadow: none; padding-left: 16px; border: none; background: transparent; }
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  width: 100%; position: relative;
  background: linear-gradient(160deg, #0c1628 0%, #152033 40%, #1a2740 100%);
  color: #fff; overflow: hidden; min-height: 520px;
  display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(59,130,246,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(59,130,246,0.04) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; top: 0; right: 0; width: 40%; height: 100%;
  background: linear-gradient(180deg, rgba(59,130,246,0.03) 0%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; width: 100%;
  max-width: 1200px; margin: 0 auto; padding: 80px 40px;
}
.hero-main {
  max-width: 680px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--primary); letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 20px; background: rgba(59,130,246,0.1);
  padding: 6px 16px; border-radius: 50px; border: 1px solid rgba(59,130,246,0.15);
}
.hero-tag::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary);
}
.hero-title {
  font-size: 2.75rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 18px; color: #fff; letter-spacing: -0.5px;
}
.hero-desc {
  font-size: 1.1rem; line-height: 1.8; margin-bottom: 36px;
  color: rgba(255,255,255,0.65); max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-actions .btn-primary {
  background: var(--primary); color: #fff; border: none;
  padding: 14px 32px; font-size: 0.95rem; font-weight: 600;
  border-radius: 8px; transition: all 0.3s;
}
.hero-actions .btn-primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.25); }
.hero-actions .btn-ghost {
  background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 28px; font-size: 0.95rem; font-weight: 500;
  border-radius: 8px; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px;
}
.hero-actions .btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 56px;
  padding: 24px 0 0; border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat { text-align: left; }
.hero-stat-num {
  display: block; font-size: 2rem; font-weight: 800; color: #60a5fa;
  line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.5px;
}
.hero-stat-label { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* =============================================
   Buttons
   ============================================= */
[class*="btn"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s ease; border: none; text-decoration: none; line-height: 1.4;
}
[class*="btn"][class*="primary"],
[class*="btn-primary"] { background: var(--primary); color: #fff; }
[class*="btn"][class*="primary"]:hover,
[class*="btn-primary"]:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.3); }

.btn-ghost, [class*="btn"][class*="ghost"] { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.25); }
.btn-ghost:hover, [class*="btn"][class*="ghost"]:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

[class*="btn"][class*="outline"],
[class*="btn-outline"] { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
[class*="btn"][class*="outline"]:hover,
[class*="btn-outline"]:hover { background: var(--primary); color: #fff; }

[class*="btn"][class*="white"],
[class*="btn-white"] { background: #fff; color: var(--primary); }
[class*="btn"][class*="white"]:hover,
[class*="btn-white"]:hover { background: rgba(255,255,255,0.85); }

[class*="btn"][class*="lg"],
[class*="btn-lg"] { padding: 16px 36px; font-size: 1.05rem; }
[class*="btn"][class*="sm"],
[class*="btn-sm"] { padding: 8px 20px; font-size: 0.85rem; }

/* =============================================
   Cards
   ============================================= */
[class*="card"] {
  background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border);
  overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
[class*="card"]:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.2); }
[class*="card"] a { text-decoration: none; color: inherit; }
[class*="card"] h3, [class*="card"] h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--text-heading); }
[class*="card"] p { color: var(--gray); font-size: 0.92rem; line-height: 1.6; margin-bottom: 0; }

/* Service Card */
.service-card {
  display: block; padding: 32px 28px; position: relative;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-card); text-decoration: none;
  transition: all 0.3s ease; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--primary); opacity: 0; transition: opacity 0.3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.3); }
.service-card:hover::before { opacity: 1; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.service-card p { color: var(--gray); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.service-more { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; font-size: 0.85rem; transition: gap 0.2s; }
.service-card:hover .service-more { gap: 8px; }

/* =============================================
   Sections
   ============================================= */
[class*="section"] { width: 100%; padding: 80px 0; }
/* Prevent inner section components from inheriting section padding */
.section-header, .section-title, .section-desc, .section-more,
[class*="section-header"], [class*="section-title"], [class*="section-desc"], [class*="section-more"] { padding: 0; }
[class*="section"][class*="alt"],
[class*="section"][class*="dark"],
[class*="section-bg-dark"],
[class*="section"][class*="gray"],
[class*="section"][class*="grey"] { background: var(--bg-alt); }

.section-alt { background: var(--bg-alt); }
.section-sm { padding: 40px 0; }

[class*="section-header"],
.section-header { text-align: center; margin-bottom: 48px; }
[class*="section-title"],
.section-title { font-size: 2rem; font-weight: 800; color: var(--text-heading); margin-bottom: 8px; }
[class*="section-subtitle"],
[class*="section-desc"],
[class*="section-header"] p,
.section-desc { color: var(--gray); font-size: 1.05rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }
[class*="section-more"] { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
[class*="section-more"]:hover { opacity: 0.8; }

/* =============================================
   Grids
   ============================================= */
[class*="grid"] { display: grid; gap: 24px; }
.service-grid { grid-template-columns: repeat(3, 1fr); }
.news-grid { grid-template-columns: repeat(3, 1fr); }
.advantage-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 992px) {
  .service-grid, .news-grid, .advantage-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .service-grid, .news-grid, .advantage-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Advantage Cards
   ============================================= */
.advantage-card {
  text-align: center; padding: 32px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; transition: all 0.3s ease;
}
.advantage-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.2); }
.adv-icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 12px; background: var(--primary-light); color: var(--primary);
}
.advantage-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.advantage-card p { font-size: 0.9rem; color: var(--gray); margin-bottom: 0; }

/* =============================================
   News / Articles
   ============================================= */
[class*="news"] article, [class*="news"] [class*="item"], [class*="article"] { padding: 16px 0; border-bottom: 1px solid var(--border); }
[class*="news"] h3, [class*="news"] h3 a { font-size: 1.05rem; font-weight: 600; color: var(--text-heading); text-decoration: none; }
[class*="news"] h3 a:hover { color: var(--primary); }

.news-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.2); }
.news-card-body { padding: 24px; }
.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 0.82rem; flex-wrap: wrap; }
.news-cat { display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: 0.78rem; font-weight: 500; background: var(--primary-light); color: var(--primary); }
.news-date { color: var(--gray); }
.news-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.news-card h3 a { color: var(--text-heading); text-decoration: none; transition: color 0.2s; }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { font-size: 0.88rem; color: var(--gray); line-height: 1.6; margin-bottom: 16px; }
.news-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 500; font-size: 0.85rem; text-decoration: none; transition: gap 0.2s; }
.news-link:hover { gap: 8px; }

/* =============================================
   CTA Section
   ============================================= */
.cta-section { padding: 80px 0; }
.cta-box {
  text-align: center; padding: 64px 32px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(99,102,241,0.08) 100%);
  border: 1px solid rgba(59,130,246,0.2); border-radius: 16px; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box h2 { font-size: 2rem; font-weight: 800; color: var(--text-heading); margin-bottom: 12px; position: relative; z-index: 1; }
.cta-box p { font-size: 1.1rem; color: var(--gray); margin-bottom: 28px; position: relative; z-index: 1; }
.cta-box .btn { position: relative; z-index: 1; }

/* Generic CTA fallback */
[class*="cta"] { text-align: center; padding: 80px 24px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 16px; }
[class*="cta"] h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
[class*="cta"] p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 28px; color: rgba(255,255,255,0.85); }

/* =============================================
   Tags / Labels / Badges
   ============================================= */
[class*="tag"], [class*="label"], [class*="badge"] {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 50px; font-size: 0.8rem; font-weight: 500;
  background: var(--primary-light); color: var(--primary); text-decoration: none;
}

/* =============================================
   Meta / Info lines
   ============================================= */
[class*="meta"] { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--gray); }
[class*="meta"] span { white-space: nowrap; }

/* =============================================
   Links with arrows
   ============================================= */
[class*="link"]:not([class*="nav"]):not([class*="footer"]) { color: var(--primary); font-weight: 500; text-decoration: none; transition: opacity 0.3s; }
[class*="link"]:not([class*="nav"]):not([class*="footer"]):hover { opacity: 0.8; }

/* =============================================
   Category / Feature icons
   ============================================= */
[class*="icon"] { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* =============================================
   Empty state
   ============================================= */
[class*="empty"] { text-align: center; padding: 40px 0; color: var(--gray); font-size: 0.95rem; }

/* =============================================
   Stats counter
   ============================================= */
[class*="stat"] [class*="number"], [class*="stat"] [class*="num"] { font-size: 2.5rem; font-weight: 900; color: var(--primary); line-height: 1; }
[class*="stat"] [class*="label"] { font-size: 0.9rem; color: var(--gray); margin-top: 4px; }

/* =============================================
   Partner / client logos
   ============================================= */
[class*="partner"], [class*="client"] { opacity: 0.6; transition: opacity 0.3s; }
[class*="partner"]:hover, [class*="client"]:hover { opacity: 1; }

/* =============================================
   Friend Links
   ============================================= */
.friend-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0; font-size: 0.85rem; }
.friend-links span { color: var(--gray); flex-shrink: 0; }
.friend-links a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.friend-links a:hover { color: var(--primary); }

/* =============================================
   Footer
   ============================================= */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 50px 0 0; }
.footer .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
footer[class*="footer"] .footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
@media (max-width: 992px) { footer[class*="footer"] .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { footer[class*="footer"] .footer-grid { grid-template-columns: 1fr; } }

.footer-col h4 { font-family: var(--font-serif, inherit); color: var(--text-heading); font-size: 1rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--gray); font-size: 14px; transition: color 0.3s ease; text-decoration: none; }
.footer-col a:hover { color: var(--text-heading); }
.footer-contact-list p { display: flex; align-items: flex-start; gap: 8px; font-size: 0.88rem; color: var(--gray); margin-bottom: 8px; }
.footer-contact-list svg { flex-shrink: 0; margin-top: 3px; opacity: 0.5; }

.footer-bottom { text-align: center; padding: 20px 0; font-size: 13px; }
.footer-bottom p { color: var(--gray); }
.footer-bottom a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--text-heading); }

/* =============================================
   Floating Widget
   ============================================= */
.float-widget { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.float-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; text-decoration: none;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3); transition: all 0.3s ease; position: relative;
}
.float-btn:hover { background: var(--primary-dark); transform: scale(1.1); }
.float-btn .tooltip {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--bg-card); color: var(--text); padding: 4px 12px;
  border-radius: 6px; font-size: 0.8rem; white-space: nowrap;
  border: 1px solid var(--border); opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.float-btn:hover .tooltip { opacity: 1; }
.float-top { background: var(--gray-200); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.float-top:hover { background: var(--gray); transform: scale(1.1); }

/* =============================================
   Breadcrumb
   ============================================= */
.breadcrumb { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 12px 0; font-size: 0.85rem; }
.breadcrumb .container { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }
.breadcrumb svg { flex-shrink: 0; width: 11px; height: 11px; color: var(--gray); opacity: 0.4; }

/* =============================================
   Page Header
   ============================================= */
.page-header {
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  padding: 48px 0 40px; text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 800; color: var(--text-heading); margin: 0; }
.page-header p { color: var(--gray); font-size: 1rem; margin-top: 8px; }

@media (max-width: 768px) {
  .page-header { padding: 32px 0 28px; }
  .page-header h1 { font-size: 1.5rem; }
}

/* =============================================
   Content + Sidebar Layout
   ============================================= */
.content-with-sidebar {
  display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start;
}
.main-content { min-width: 0; }

@media (max-width: 992px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar { position: sticky; top: 90px; }
.sidebar-widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; margin-bottom: 24px;
}
.sidebar-widget h4 {
  font-size: 0.95rem; font-weight: 700; color: var(--text-heading);
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: 0.9rem; color: var(--text); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav ul { list-style: none; padding-left: 16px; margin-top: 2px; }
.sidebar-nav ul a { font-size: 0.85rem; padding: 6px 12px; }

@media (max-width: 992px) {
  .sidebar { position: static; }
}

/* =============================================
   Detail Article
   ============================================= */
.detail-article { max-width: 860px; }
.detail-header { margin-bottom: 32px; }
.detail-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--text-heading); line-height: 1.3; margin-bottom: 16px; }
.detail-meta { display: flex; align-items: center; gap: 20px; font-size: 0.85rem; color: var(--gray); flex-wrap: wrap; }
.detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.detail-meta svg { width: 14px; height: 14px; opacity: 0.5; flex-shrink: 0; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.detail-tags a {
  display: inline-block; padding: 3px 12px; border-radius: 50px;
  font-size: 0.8rem; background: var(--primary-light); color: var(--primary);
  text-decoration: none; transition: background 0.2s;
}
.detail-tags a:hover { background: rgba(59,130,246,0.2); }

.detail-body {
  font-size: 1rem; line-height: 1.8; color: var(--text);
}
.detail-body h2, .detail-body h3, .detail-body h4 {
  color: var(--text-heading); margin: 28px 0 12px; font-weight: 700;
}
.detail-body h2 { font-size: 1.4rem; }
.detail-body h3 { font-size: 1.15rem; }
.detail-body p { margin-bottom: 16px; }
.detail-body ul, .detail-body ol { margin: 0 0 16px 20px; }
.detail-body li { margin-bottom: 6px; }
.detail-body a { color: var(--primary); }
.detail-body a:hover { text-decoration: underline; }
.detail-body img { border-radius: 8px; margin: 16px 0; }
.detail-body blockquote {
  border-left: 3px solid var(--primary); padding: 12px 20px; margin: 16px 0;
  background: var(--bg-alt); border-radius: 0 8px 8px 0; color: var(--gray);
}
.detail-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.detail-body th, .detail-body td {
  padding: 10px 14px; border: 1px solid var(--border); text-align: left;
}
.detail-body th { background: var(--bg-alt); color: var(--text-heading); font-weight: 600; }

.detail-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.detail-nav-prev, .detail-nav-next { }
.detail-nav-next { text-align: right; }
.nav-label { display: block; font-size: 0.8rem; color: var(--gray); margin-bottom: 4px; }
.detail-nav a { color: var(--primary); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.detail-nav a:hover { color: #60a5fa; }

@media (max-width: 768px) {
  .detail-header h1 { font-size: 1.35rem; }
  .detail-nav { grid-template-columns: 1fr; }
  .detail-nav-next { text-align: left; }
}

/* =============================================
   Article List
   ============================================= */
.article-list { max-width: 860px; }
.article-item {
  padding: 24px 0; border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s;
}
.article-item:last-child { border-bottom: none; }
.article-item-body { }
.article-item h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.article-item h2 a { color: var(--text-heading); text-decoration: none; transition: color 0.2s; }
.article-item h2 a:hover { color: var(--primary); }
.article-meta { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--gray); margin-bottom: 8px; flex-wrap: wrap; }
.article-meta span { display: inline-flex; align-items: center; gap: 4px; }
.article-meta svg { width: 13px; height: 13px; opacity: 0.5; flex-shrink: 0; }
.article-item p { font-size: 0.9rem; color: var(--gray); line-height: 1.6; margin-bottom: 0; }
.read-more {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px;
  color: var(--primary); font-size: 0.85rem; font-weight: 500;
  text-decoration: none; transition: gap 0.2s;
}
.read-more:hover { gap: 8px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-state p { font-size: 1rem; }

/* =============================================
   Pagination
   ============================================= */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 32px 0; flex-wrap: wrap;
}
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: 8px; font-size: 0.85rem; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: all 0.2s;
}
.page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-info { font-size: 0.85rem; color: var(--gray); padding: 0 8px; }

/* =============================================
   Contact Page
   ============================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-heading); margin-bottom: 24px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary); flex-shrink: 0;
}
.contact-item h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-heading); margin-bottom: 4px; }
.contact-item p { font-size: 0.9rem; color: var(--gray); margin: 0; }

.contact-form-wrap h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-heading); margin-bottom: 24px; }
.contact-form { }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-heading); margin-bottom: 6px; }
.form-group input,
.form-group textarea {
  width: 100%; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 0.95rem; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray); opacity: 0.6; }
.form-group textarea { resize: vertical; min-height: 100px; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Page Body (about, pages)
   ============================================= */
.page-body {
  font-size: 1rem; line-height: 1.8; color: var(--text); max-width: 860px;
}
.page-body h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-heading); margin: 28px 0 12px; }
.page-body h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-heading); margin: 24px 0 10px; }
.page-body p { margin-bottom: 16px; }
.page-body ul, .page-body ol { margin: 0 0 16px 20px; }
.page-body li { margin-bottom: 6px; }
.page-body img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

/* =============================================
   Sitemap
   ============================================= */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.sitemap-group { }
.sitemap-group h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; }
.sitemap-group h3 a { color: var(--text-heading); text-decoration: none; }
.sitemap-group h3 a:hover { color: var(--primary); }
.sitemap-group ul { list-style: none; margin: 0; padding: 0; }
.sitemap-group li { margin-bottom: 6px; }
.sitemap-group a { font-size: 0.9rem; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.sitemap-group a:hover { color: var(--primary); }

@media (max-width: 992px) {
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sitemap-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Hot / Sidebar Rankings
   ============================================= */
.sidebar-hot { list-style: none; margin: 0; padding: 0; }
.sidebar-hot li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sidebar-hot li:last-child { border-bottom: none; }
.hot-rank {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray);
}
.sidebar-hot li:nth-child(1) .hot-rank,
.sidebar-hot li:nth-child(2) .hot-rank,
.sidebar-hot li:nth-child(3) .hot-rank { background: var(--primary-light); color: var(--primary); }
.sidebar-hot a { font-size: 0.88rem; color: var(--text); text-decoration: none; line-height: 1.4; }
.sidebar-hot a:hover { color: var(--primary); }

/* =============================================
   Tag Page / Search Highlight
   ============================================= */
.detail-tags a, .tag-link {
  display: inline-block; padding: 3px 12px; border-radius: 50px;
  font-size: 0.8rem; background: var(--primary-light); color: var(--primary);
  text-decoration: none; transition: background 0.2s;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 992px) {
  [class*="grid"] { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.6rem; }
  [class*="section-title"] { font-size: 1.6rem; }
  .hero-inner { padding: 60px 32px 50px; }
  .hero-stats { gap: 36px; }
  .hero { min-height: 400px; }
}
@media (max-width: 768px) {
  [class*="grid"] { grid-template-columns: 1fr !important; }
  .hero { min-height: auto; }
  .hero-inner { padding: 48px 20px 36px; }
  .hero-title { font-size: 1.65rem; }
  .hero-desc { font-size: 1rem; margin-bottom: 28px; }
  .hero-actions { margin-bottom: 40px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { padding: 12px 24px; font-size: 0.9rem; width: 100%; justify-content: center; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-stat { flex: 1; min-width: 80px; }
  .hero-stat-num { font-size: 1.5rem; }
  .hero-main { max-width: 100%; }
  [class*="section"] { padding: 48px 0; }
  .section-header, .section-title, .section-desc, .section-more,
  [class*="section-header"], [class*="section-title"], [class*="section-desc"], [class*="section-more"] { padding: 0; }
  .cta-section { padding: 48px 0; }
  .cta-box { padding: 40px 20px; }
  [class*="btn"] { padding: 10px 22px; }
  [class*="cta"] { padding: 48px 16px; }
  .topbar-inner { justify-content: center; text-align: center; }
}


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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