/* ==========================================================================
   CyberGuard Knowledge Center & Article Detail Styles
   Domain: cyberguard.sbs
   ========================================================================== */

/* Reading progress bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* Article Hero & Breadcrumbs */
.article-hero {
  padding-top: 130px;
  padding-bottom: 40px;
  background: linear-gradient(180deg, rgba(17, 23, 34, 0.6) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumbs a {
  color: var(--text-secondary);
}
.breadcrumbs a:hover {
  color: var(--color-cyan);
}
.breadcrumbs .separator {
  color: var(--border-medium);
}
.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 500;
}

.article-header {
  margin-bottom: 30px;
}
.article-h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}
@media (min-width: 768px) {
  .article-h1 {
    font-size: 2.85rem;
  }
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-cyan);
}

/* Article Layout Grid (Main Content + Sticky TOC) */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 48px 0 80px 0;
}
@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
  }
}

/* Main Article Content Typography */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 48px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  position: relative;
}
.article-body h2::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--color-cyan);
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 32px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.article-body h4 {
  font-size: 1.15rem;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 20px;
  color: #c2cfdf;
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-body ul, .article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: #c2cfdf;
}
.article-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* Callout Boxes */
.callout {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  border-left: 4px solid var(--color-cyan);
  background: rgba(23, 31, 43, 0.85);
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.callout-title svg {
  width: 18px;
  height: 18px;
  color: var(--color-cyan);
}
.callout p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0;
}
.callout-blue {
  border-left-color: var(--color-blue);
}
.callout-blue .callout-title svg {
  color: var(--color-blue);
}
.callout-warning {
  border-left-color: var(--status-amber);
}
.callout-warning .callout-title svg {
  color: var(--status-amber);
}

/* Comparison Tables in Articles */
.article-table-wrap {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}
.article-table th, .article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}
.article-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
}
.article-table tr:last-child td {
  border-bottom: none;
}
.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Code Blocks */
.code-block {
  background: #0b0f16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #79c0ff;
}
.code-block code {
  color: inherit;
  background: transparent;
  padding: 0;
}

/* Technical Diagram Card */
.tech-diagram-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
  text-align: center;
}
.tech-diagram-box svg {
  max-width: 100%;
  height: auto;
}
.diagram-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* Sticky Sidebar Table of Contents */
.article-sidebar {
  position: relative;
}
.toc-sticky {
  position: sticky;
  top: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-title svg {
  width: 18px;
  height: 18px;
  color: var(--color-cyan);
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toc-item a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
}
.toc-item a:hover {
  color: var(--color-cyan);
  border-left-color: var(--color-cyan);
}
.toc-item.active a {
  color: var(--color-cyan);
  border-left-color: var(--color-cyan);
  font-weight: 600;
}

/* Sidebar CTA widget */
.sidebar-cta {
  margin-top: 24px;
  background: rgba(17, 23, 34, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.sidebar-cta h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.sidebar-cta p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Bottom Article Links & Related */
.article-footer-links {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
}
.related-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.related-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-fast);
}
.related-card:hover {
  border-color: var(--color-cyan);
}
.related-card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.related-card h4 a {
  color: var(--text-primary);
}
.related-card h4 a:hover {
  color: var(--color-cyan);
}
.related-card p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
