/* ==========================================================================
   QUBENIX BLOG ARTICLE DESIGN SYSTEM
   Matches Qubenix AI Brand, Typography, Colors & Spacing
   ========================================================================== */

:root {
  --article-max-width: 840px;
  --article-header-max: 960px;
  --article-primary: #3C32A3;
  --article-accent: #6B5FD1;
  --article-text: #141225;
  --article-muted: #55516B;
  --article-subtle: #716E85;
  --article-border: #E5E7EB;
  --article-surface: #F9F9FC;
  --article-highlight: #F4F3FC;
  --article-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.blog-article-page {
  font-family: var(--article-font);
  color: var(--article-text);
  background: #FFFFFF;
  margin: 0;
  padding: 0;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Breadcrumb Navigation
   -------------------------------------------------------------------------- */
.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--article-subtle);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--article-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-breadcrumb a:hover {
  color: var(--article-primary);
  text-decoration: underline;
}

.article-breadcrumb .sep {
  opacity: 0.5;
  user-select: none;
}

.article-breadcrumb .current {
  color: var(--article-text);
  font-weight: 500;
  max-width: 480px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Article Hero Section
   -------------------------------------------------------------------------- */
.article-hero {
  background: linear-gradient(180deg, #F9F9FD 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(20, 18, 37, 0.06);
  padding: 56px 24px 48px;
}

.article-hero-inner {
  max-width: var(--article-header-max);
  margin: 0 auto;
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  background: rgba(60, 50, 163, 0.08);
  border: 1px solid rgba(60, 50, 163, 0.18);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--article-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.article-title-h1 {
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: #0B0C2B;
  margin: 0 0 20px;
}

.article-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--article-muted);
  margin: 0 0 28px;
  font-weight: 400;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 18, 37, 0.08);
  font-size: 14px;
  color: var(--article-muted);
}

.article-author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--article-text);
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--article-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C4C4CD;
}

/* --------------------------------------------------------------------------
   Article Featured Visual
   -------------------------------------------------------------------------- */
.article-featured-media {
  max-width: var(--article-header-max);
  margin: -10px auto 48px;
  padding: 0 24px;
}

.article-featured-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 37, 0.08);
  box-shadow: 0 16px 40px -12px rgba(18, 22, 104, 0.08);
  background: #F1F1EE;
  aspect-ratio: 16 / 9;
}

.article-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   Article Core Content Container
   -------------------------------------------------------------------------- */
.article-container {
  max-width: var(--article-max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--article-text);
}

.article-content p {
  margin: 0 0 24px;
}

.article-content strong {
  font-weight: 650;
  color: #0E0D1B;
}

/* Headings */
.article-content h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  color: #0B0C2B;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 48px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20, 18, 37, 0.08);
}

.article-content h3 {
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 650;
  color: #141225;
  letter-spacing: -0.015em;
  line-height: 1.4;
  margin: 36px 0 14px;
}

.article-content h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--article-primary);
  margin: 24px 0 10px;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 0 0 26px 20px;
  padding: 0;
}

.article-content li {
  margin-bottom: 10px;
  padding-left: 6px;
}

/* Links */
.article-content a {
  color: var(--article-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 550;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

/* --------------------------------------------------------------------------
   Key Takeaways Callout Box
   -------------------------------------------------------------------------- */
.article-takeaways {
  background: var(--article-highlight);
  border: 1px solid rgba(60, 50, 163, 0.2);
  border-left: 4px solid var(--article-primary);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 36px;
}

.takeaways-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--article-primary);
  margin-bottom: 14px;
}

.takeaways-header svg {
  width: 20px;
  height: 20px;
  stroke: var(--article-primary);
  fill: none;
}

.article-takeaways ul {
  margin: 0;
  padding-left: 20px;
  color: var(--article-text);
  font-size: 16px;
  line-height: 1.65;
}

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

.article-takeaways li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Engineering Callout / Note Boxes
   -------------------------------------------------------------------------- */
.article-callout {
  background: #F8F9FC;
  border: 1px solid #E5E7EB;
  border-left: 4px solid var(--article-accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 16px;
  line-height: 1.65;
}

.article-callout-warning {
  background: #FFFBF0;
  border-color: #FDE68A;
  border-left-color: #F59E0B;
}

.article-callout strong {
  color: var(--article-text);
  display: block;
  margin-bottom: 6px;
  font-size: 16.5px;
}

/* --------------------------------------------------------------------------
   Tables (for comparisons: CRM vs ERP, Custom vs SaaS)
   -------------------------------------------------------------------------- */
.article-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
}

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

.article-table th {
  background: #F4F5F8;
  padding: 14px 18px;
  font-weight: 650;
  color: #0B0C2B;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}

.article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #EBECEF;
  vertical-align: top;
  color: var(--article-text);
}

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

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

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.article-faq {
  margin: 48px 0 36px;
  padding-top: 32px;
  border-top: 1px solid #E5E7EB;
}

.article-faq h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 24px;
}

.faq-item {
  background: #FAFBFC;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: #D1D5DB;
}

.faq-item details {
  width: 100%;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 650;
  color: #141225;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
  stroke: var(--article-muted);
  flex-shrink: 0;
}

.faq-item details[open] summary .chevron {
  transform: rotate(180deg);
  stroke: var(--article-primary);
}

.faq-item details[open] summary {
  color: var(--article-primary);
  border-bottom: 1px solid #EDEFF3;
}

.faq-answer {
  padding: 18px 22px 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--article-muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Contextual CTA Box
   -------------------------------------------------------------------------- */
.article-cta {
  background: linear-gradient(135deg, #3C32A3 0%, #292178 100%);
  border-radius: 16px;
  padding: 40px 36px;
  color: #FFFFFF;
  margin: 48px 0;
  box-shadow: 0 16px 36px -10px rgba(60, 50, 163, 0.35);
  text-align: center;
}

.article-cta h3 {
  color: #FFFFFF;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  margin: 0 0 12px;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 24px;
}

.article-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #FFFFFF;
  color: var(--article-primary) !important;
  font-size: 16px;
  font-weight: 650;
  border-radius: 9999px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Author Card & References
   -------------------------------------------------------------------------- */
.article-author-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: 12px;
  margin: 40px 0 32px;
}

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

.author-card-content h4 {
  font-size: 17px;
  font-weight: 700;
  color: #0B0C2B;
  margin: 0 0 6px;
}

.author-card-content p {
  font-size: 14.5px;
  color: var(--article-muted);
  line-height: 1.6;
  margin: 0;
}

.article-references {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
  font-size: 13.5px;
  color: var(--article-subtle);
}

.article-references h4 {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--article-muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-references ol {
  margin: 0;
  padding-left: 20px;
}

.article-references li {
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Related Articles Grid
   -------------------------------------------------------------------------- */
.article-related-section {
  background: #F9F9FC;
  border-top: 1px solid rgba(20, 18, 37, 0.08);
  padding: 64px 24px 80px;
}

.article-related-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.article-related-title {
  font-size: 26px;
  font-weight: 700;
  color: #0B0C2B;
  margin: 0 0 28px;
  letter-spacing: -0.015em;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .article-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .article-hero {
    padding: 36px 16px 32px;
  }
  .article-featured-media {
    padding: 0 16px;
    margin-bottom: 32px;
  }
  .article-container {
    padding: 0 16px 60px;
  }
  .article-content {
    font-size: 16.5px;
  }
  .article-takeaways {
    padding: 18px 20px;
  }
  .article-cta {
    padding: 32px 20px;
  }
  .article-related-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
