/* ==========================================================================
   MOJIE KNOWLEDGE BASE & TECHNICAL ARTICLES STYLESHEET
   Cyberpunk Documentation System for High-Ranking Technical SEO
   ========================================================================== */

.kb-page-body {
  background: radial-gradient(circle at 50% 5%, #081329 0%, #030712 60%, #010307 100%);
  color: #e2eafc;
  font-family: var(--font-cyber);
  line-height: 1.85;
}

/* Article Hero / Breadcrumb Bar */
.article-top-header {
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(5, 11, 24, 0.9);
  padding: 40px 24px 30px;
}

.article-header-container {
  max-width: 1100px;
  margin: 0 auto;
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-breadcrumbs a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

.article-breadcrumbs a:hover {
  text-decoration: underline;
}

.article-breadcrumbs span.sep {
  color: var(--text-muted);
}

.article-main-h1 {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  padding-bottom: 12px;
}

.meta-pill {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--neon-cyan);
  padding: 3px 10px;
  border-radius: 4px;
}

.meta-date, .meta-reading-time, .meta-word-count {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Article Layout Grid (TOC + Content) */
.article-layout {
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Sticky Table of Contents */
.article-sidebar {
  position: sticky;
  top: 90px;
  background: rgba(8, 16, 34, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 22px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.toc-list li {
  margin-bottom: 10px;
}

.toc-list a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.4;
  display: block;
  transition: all 0.2s ease;
  padding-left: 6px;
  border-left: 2px solid transparent;
}

.toc-list a:hover {
  color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
  padding-left: 10px;
}

/* Article Body Content */
.article-content {
  background: rgba(6, 12, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 45px 40px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #dbe4f8;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  margin: 45px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-content h2::before {
  content: '>';
  color: var(--neon-magenta);
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #00f0ff;
  margin: 30px 0 14px;
}

.article-content p {
  margin-bottom: 22px;
  color: #cfdcf7;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 25px;
}

.article-content li {
  margin-bottom: 10px;
  color: #cfdcf7;
}

.article-content strong {
  color: #ffffff;
  font-weight: 700;
}

/* Callout Boxes */
.callout-box {
  background: rgba(8, 18, 38, 0.85);
  border-left: 4px solid var(--neon-cyan);
  border-radius: 0 6px 6px 0;
  padding: 20px 24px;
  margin: 28px 0;
  border-top: 1px solid rgba(0, 240, 255, 0.15);
  border-right: 1px solid rgba(0, 240, 255, 0.15);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.callout-box.warning {
  border-left-color: var(--neon-gold);
}

.callout-box.tip {
  border-left-color: var(--neon-green);
}

.callout-title {
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* Technical Diagrams / ASCII Blocks */
.diagram-block {
  background: #030610;
  border: 1px solid var(--border-cyan);
  border-radius: 6px;
  padding: 20px;
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  line-height: 1.5;
  overflow-x: auto;
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.08);
}

/* Code Snippets */
.code-block {
  background: #040814;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin: 26px 0;
  overflow: hidden;
  font-family: var(--font-mono);
}

.code-header {
  background: rgba(14, 25, 48, 0.8);
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  color: #e2eeff;
  line-height: 1.6;
}

/* Data Tables */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.data-table th {
  background: rgba(12, 25, 52, 0.9);
  color: var(--neon-cyan);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-cyan);
  font-weight: 700;
  font-family: var(--font-mono);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cfdcf7;
}

.data-table tr:hover td {
  background: rgba(0, 240, 255, 0.05);
}

/* In-Article Affiliate CTA Box */
.article-cta-box {
  background: linear-gradient(135deg, rgba(8, 20, 48, 0.95) 0%, rgba(18, 12, 38, 0.95) 100%);
  border: 2px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 35px 30px;
  margin: 50px 0 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--neon-cyan-glow);
}

.article-cta-box h3 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.article-cta-box p {
  color: #b5cbf5;
  font-size: 0.98rem;
  max-width: 650px;
  margin: 0 auto 24px;
}

/* Knowledge Base Hub Styles (kb/index.html) */
.kb-hero-section {
  text-align: center;
  padding: 50px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.kb-search-bar {
  margin: 30px auto 0;
  max-width: 600px;
  position: relative;
}

.kb-search-input {
  width: 100%;
  background: rgba(8, 16, 36, 0.9);
  border: 1px solid var(--border-cyan);
  border-radius: 6px;
  padding: 14px 20px 14px 45px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
  transition: all 0.25s;
}

.kb-search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 25px var(--neon-cyan-glow);
}

.kb-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-cyan);
  font-size: 1.1rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 26px;
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.article-card {
  background: rgba(8, 16, 34, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 8px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  background: rgba(14, 28, 56, 0.9);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.2);
}

.article-card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(255, 0, 127, 0.15);
  border: 1px solid var(--border-magenta);
  color: var(--neon-magenta);
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.45;
}

.article-card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 18px;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}

.read-link {
  color: var(--neon-cyan);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    display: none; /* Hide sticky TOC on mobile */
  }
  .article-content {
    padding: 28px 20px;
  }
  .article-main-h1 {
    font-size: 1.8rem;
  }
}
