/* ============================================================
   FILARI PLATFORM — BLOG DETAIL ENGINE CSS
   High-performance, WCAG 2.2 AA Compliant, Responsive Layout
   ============================================================ */

/* Top Reading Progress Bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #4F46E5, #06B6D4);
  z-index: 1001;
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* Article Typography & Markdown-like Rich Content */
.article {
  font-size: 1.125rem; /* 18px */
  line-height: 1.85;
  color: #374151;
}

.article p {
  margin-bottom: 1.5rem;
}

.article h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.025em;
  margin: 2.75rem 0 1rem;
  scroll-margin-top: 96px;
  font-family: 'Sora', sans-serif;
  line-height: 1.25;
}

.article h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 0.85rem;
  font-family: 'Sora', sans-serif;
  scroll-margin-top: 96px;
}

.article ul, .article ol {
  margin: 0 0 1.75rem;
  padding-left: 0.25rem;
  list-style: none;
}

.article li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

.article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

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

.article blockquote {
  margin: 2.25rem 0;
  padding: 1.5rem 1.75rem;
  background: #EEF2FF;
  border-left: 4px solid #4F46E5;
  border-radius: 0 16px 16px 0;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #3730A3;
  font-weight: 500;
}

/* Custom Table Styling in Article Body */
.article-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

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

.article-table th {
  background: #F9FAFB;
  color: #111827;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 2px solid #E5E7EB;
  white-space: nowrap;
}

.article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #F3F4F6;
  color: #4B5563;
  line-height: 1.6;
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-table tr:hover td {
  background: #FAFAF9;
}

/* Code & Preformatted Banners */
.article pre {
  background: #0B1020;
  color: #E2E8F0;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  margin: 1.75rem 0;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Sticky Table of Contents (TOC) Sidebar */
.toc-link {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #6B7280;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.toc-link:hover {
  color: #111827;
  background: #F3F4F6;
}

.toc-link.active {
  color: #4F46E5;
  font-weight: 600;
  border-left-color: #4F46E5;
  background: #EEF2FF;
}

/* Diagram Container Styles */
.blog-graphic-card {
  margin: 2.5rem 0;
  background: #FFFFFF;
  border: 1.5px solid #EEF0F3;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.blog-graphic-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.blog-graphic-subtitle {
  font-size: 0.875rem;
  color: #6B7280;
  margin-bottom: 20px;
}

/* FAQ Accordion Styling */
.faq-item {
  border: 1.5px solid #EEF0F3;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #FFFFFF;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: #C7D2FE;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.06);
}

.faq-question {
  width: 100%;
  padding: 18px 22px;
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #111827;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 16px;
}

.faq-answer {
  padding: 0 22px 20px;
  color: #4B5563;
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  stroke: #4F46E5;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Responsive Media Query Adaptations */
@media (max-width: 1023px) {
  .layout {
    grid-template-columns: 1fr !important;
  }
  #toc-side {
    display: none !important;
  }
  .g2 {
    grid-template-columns: 1fr !important;
  }
  .article h2 {
    font-size: 1.5rem;
  }
  .article blockquote {
    padding: 1.25rem;
    font-size: 1.05rem;
  }
}
