/* ==============================================================================
   Vrise Blog & Article System Styles — Modern Dark Glassmorphism
   Inherits design tokens from styles.css
   ============================================================================== */

/* Breadcrumbs */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumbs a:hover {
  color: var(--primary-light);
}
.breadcrumbs__sep {
  opacity: 0.4;
}
.breadcrumbs__current {
  color: var(--text);
  font-weight: 500;
}

/* Blog Hub Layout */
.blog-hub {
  padding: 130px 24px 80px;
  max-width: 1240px;
  margin: 0 auto;
}
.blog-hub__header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 50px;
}
.blog-hub__title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.blog-hub__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Grid of Article Cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 25px rgba(124, 58, 237, 0.15);
}
.blog-card:hover::before {
  opacity: 1;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.blog-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
  color: var(--text);
  transition: color 0.2s;
}
.blog-card:hover .blog-card__title {
  color: #fff;
}
.blog-card__snippet {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-size: 0.85rem;
}
.blog-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.blog-card__author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}
.blog-card__link {
  color: var(--primary-light);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.blog-card:hover .blog-card__link {
  gap: 10px;
  color: var(--accent);
}

/* Article Page Layout */
.article-page {
  padding: 120px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}
.article-header {
  margin-bottom: 40px;
}
.article-header__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.article-header__title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 14px 0 18px;
  color: #fff;
  letter-spacing: -0.02em;
}
.article-header__lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #cbd5e1;
  background: rgba(124, 58, 237, 0.05);
  border-left: 3px solid var(--primary);
  padding: 18px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 20px;
}

/* Article Content Typography */
.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #e2e8f0;
}
.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 48px 0 20px;
  color: #fff;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  position: relative;
}
.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--gradient);
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 32px 0 14px;
  color: #f1f5f9;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
}
.article-content li {
  margin-bottom: 10px;
  line-height: 1.65;
}
.article-content strong {
  color: #fff;
}

/* Table in Articles - No Horizontal Scrolling */
.table-wrapper {
  overflow-x: hidden;
  margin: 32px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
  box-sizing: border-box;
}
.article-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
  box-sizing: border-box;
}
.article-table th {
  background: rgba(124, 58, 237, 0.15);
  color: #fff;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  vertical-align: middle;
}
.article-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: top;
}
.article-table tr:last-child td {
  border-bottom: none;
}
.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* Responsive Table: Transform to clean stacked cards on mobile to eliminate any horizontal scroll */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: hidden;
    border: none;
    background: transparent;
    margin: 24px 0;
    padding: 0;
  }
  .article-table,
  .article-table tbody,
  .article-table tr,
  .article-table td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .article-table thead {
    display: none;
  }
  .article-table tr {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.3s, background 0.3s;
  }
  .article-table tr:hover {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(255, 255, 255, 0.05);
  }
  .article-table td {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    font-size: 0.95rem;
  }
  .article-table td:first-child {
    padding-top: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    padding-bottom: 10px;
    margin-bottom: 6px;
  }
  .article-table td:first-child strong {
    color: #fff;
  }
  .article-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .article-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--accent, #06b6d4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
  }
  .article-table td:first-child[data-label]::before {
    color: var(--primary-light, #a78bfa);
  }
}

/* E-E-A-T Expert Callout */
.expert-quote {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 36px 0;
  position: relative;
}
.expert-quote__text {
  font-size: 1.05rem;
  font-style: italic;
  color: #f8fafc;
  line-height: 1.7;
  margin-bottom: 18px;
}
.expert-quote__author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.expert-quote__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.expert-quote__info h4 {
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 2px;
}
.expert-quote__info span {
  font-size: 0.82rem;
  color: var(--primary-light);
}

/* FAQ Accordion */
.article-faq {
  margin: 50px 0 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.article-faq .faq-item,
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.article-faq .faq-item:hover,
details.faq-item:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(255, 255, 255, 0.03);
}
.article-faq .faq-item[open],
.article-faq .faq-item.active,
details.faq-item[open] {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
}
.article-faq .faq-question,
details.faq-item summary.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
  outline: none;
  transition: color 0.2s;
}
details.faq-item summary.faq-question::-webkit-details-marker,
details.faq-item summary.faq-question::marker {
  display: none;
}
.article-faq .faq-question:hover,
details.faq-item summary.faq-question:hover {
  color: var(--primary-light);
}
.article-faq .faq-question::after,
details.faq-item summary.faq-question::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent, #06b6d4);
  border-bottom: 2px solid var(--accent, #06b6d4);
  transform: rotate(45deg);
  transition: transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}
.article-faq .faq-item[open] .faq-question::after,
.article-faq .faq-item.active .faq-question::after,
details.faq-item[open] summary.faq-question::after {
  transform: rotate(-135deg);
  border-color: var(--primary-light, #a78bfa);
}
/* Override styles.css .faq-answer { max-height:0; opacity:0; } */
.article-faq .faq-answer,
details.faq-item .faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 24px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.98rem;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
}
.article-faq details.faq-item[open] .faq-answer,
.article-faq .faq-item.active .faq-answer,
details.faq-item[open] .faq-answer {
  max-height: 800px !important;
  opacity: 1 !important;
  padding: 0 24px 22px !important;
  overflow: visible !important;
}

/* In-Article CTA Banner */
.article-cta {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  margin: 50px 0 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.article-cta h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.article-cta p {
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 24px;
  font-size: 1.02rem;
}

/* Related Articles Navigation */
.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-articles__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #fff;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: all 0.3s;
}
.related-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
}
.related-card h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}
.related-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-hub__title {
    font-size: 2rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .article-header__title {
    font-size: 1.85rem;
  }
  .article-page {
    padding: 100px 16px 60px;
  }
  .article-cta {
    padding: 28px 20px;
  }
}
