/* ==========================================================================
   ByWave.sbs - 知识库与文章专栏原生样式表 (Article Dedicated CSS)
   纯原生 CSS，零重型框架，秒开无阻，高转化率排版与移动端自适应
   ========================================================================== */

/* 页面主体外框 */
.article-page {
  padding: 36px 0 80px 0;
}

.article-page .container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑导航 */
.breadcrumb-nav {
  margin-bottom: 22px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 13.5px;
  color: #94A3B8;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: #38BDF8;
  text-decoration: none;
  transition: color var(--transition-fast, 0.2s ease);
}

.breadcrumb-item a:hover {
  color: #7DD3FC;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #64748B;
  user-select: none;
}

.breadcrumb-item.current {
  color: #E2E8F0;
  font-weight: 500;
}

/* 文章主卡片容器 (深色高质感玻璃拟态卡片，彻底隔绝背景动态杂点) */
.article-page article,
.article-container {
  background: rgba(11, 18, 33, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-lg, 18px);
  padding: 46px 42px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 40px;
}

/* 文章头部 */
.article-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 28px;
  margin-bottom: 36px;
}

/* 分类标签徽章 */
.article-topic-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #10f0ba;
  background: rgba(16, 240, 186, 0.12);
  border: 1px solid rgba(16, 240, 186, 0.32);
  padding: 5px 14px;
  border-radius: var(--radius-pill, 9999px);
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(16, 240, 186, 0.18);
}

/* 文章大标题 */
.article-main-title {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1.38;
  color: #FFFFFF;
  margin: 0 0 20px 0;
  letter-spacing: -0.4px;
}

/* 文章元信息栏 (更新日期、阅读时间、标签) */
.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: #94A3B8;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 18px;
  margin-top: 14px;
}

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

/* 前言导读引言框 */
.lead-quote {
  font-size: 16px;
  line-height: 1.85;
  color: #E2E8F0;
  background: rgba(56, 189, 248, 0.06);
  border-left: 4px solid #38BDF8;
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  padding: 20px 24px;
  margin: 0 0 34px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.lead-quote strong {
  color: #38BDF8;
}

/* 正文区域排版规范 */
.article-body,
.article-content {
  font-size: 15.5px;
  line-height: 1.85;
  color: #CBD5E1;
}

.article-body p,
.article-content p {
  margin-bottom: 22px;
  text-align: justify;
}

.article-body strong,
.article-content strong {
  color: #FFFFFF;
  font-weight: 700;
}

.article-body a:not(.btn),
.article-content a:not(.btn) {
  color: #38BDF8;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--transition-fast, 0.2s ease);
}

.article-body a:not(.btn):hover,
.article-content a:not(.btn):hover {
  color: #7DD3FC;
}

/* 文章二级与三级标题 */
.article-body h2,
.article-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 44px 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.2px;
}

.article-body h2::before,
.article-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, #00F5FF, #3B82F6);
  border-radius: 2px;
  flex-shrink: 0;
}

.article-body h3,
.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #F8FAFC;
  margin: 32px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 列表规范 */
.article-body ul,
.article-body ol,
.article-content ul,
.article-content ol {
  margin: 0 0 26px 20px;
  padding-left: 12px;
}

.article-body li,
.article-content li {
  font-size: 15px;
  line-height: 1.8;
  color: #CBD5E1;
  margin-bottom: 10px;
}

.article-body li::marker,
.article-content li::marker {
  color: #38BDF8;
}

/* ==========================================================================
   重点修复：文章内测速与对比表格样式 (核心表格展示)
   ========================================================================== */
.data-table-wrap,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0 36px 0;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(56, 189, 248, 0.05);
  -webkit-overflow-scrolling: touch;
}

.article-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
  min-width: 620px;
}

.article-table thead,
.data-table thead {
  background: linear-gradient(180deg, rgba(14, 23, 39, 0.98), rgba(8, 14, 28, 0.98));
}

.article-table th,
.data-table th {
  color: #38BDF8;
  font-weight: 700;
  padding: 16px 20px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.28);
  font-size: 14px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.article-table td,
.data-table td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 14px;
  line-height: 1.6;
}

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

.article-table tbody tr:hover td,
.data-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.07);
}

/* 提示卡片 Callouts */
.callout,
.article-callout {
  padding: 20px 24px;
  border-radius: var(--radius-md, 12px);
  margin: 28px 0;
  font-size: 14.5px;
  line-height: 1.75;
  background: rgba(14, 23, 39, 0.85);
  border-left: 4px solid #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-left-width: 4px;
}

.callout-title,
.article-callout-title {
  font-weight: 700;
  font-size: 15.5px;
  color: #38BDF8;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 文章内嵌入式呼吁行动卡片 (CTA Box) */
.article-cta-box {
  background: linear-gradient(135deg, rgba(14, 30, 58, 0.95), rgba(7, 12, 24, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-lg, 18px);
  padding: 38px 30px;
  margin: 44px 0;
  text-align: center;
}

.article-cta-box h3 {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 12px 0;
}

.article-cta-box p {
  color: #94A3B8;
  font-size: 14.5px;
  max-width: 640px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 确保文章内部任何按钮文字极其清晰、高对比度、无下划线 */
.article-body .btn,
.article-content .btn,
.article-cta-box .btn,
.cta-actions .btn {
  text-decoration: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.article-body .btn-primary,
.article-content .btn-primary,
.article-cta-box .btn-primary,
.cta-actions .btn-primary {
  background: linear-gradient(135deg, #00ffc4 0%, #10f0ba 50%, #05c48b 100%) !important;
  color: #021812 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(16, 240, 186, 0.42) !important;
}

.article-body .btn-primary:hover,
.article-content .btn-primary:hover,
.article-cta-box .btn-primary:hover,
.cta-actions .btn-primary:hover {
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(16, 240, 186, 0.7) !important;
}

.article-body .btn-outline,
.article-content .btn-outline,
.article-cta-box .btn-outline,
.cta-actions .btn-outline {
  background: rgba(14, 23, 39, 0.75) !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  text-decoration: none !important;
}

.article-body .btn-outline:hover,
.article-content .btn-outline:hover,
.article-cta-box .btn-outline:hover,
.cta-actions .btn-outline:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
  transform: translateY(-2px);
}

/* 文章页尾与相关推荐阅读 */
.article-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-articles-box h3 {
  font-size: 19px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-links-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-sm, 8px);
  color: #E2E8F0;
  text-decoration: none;
  font-size: 14.5px;
  transition: all var(--transition-fast, 0.2s ease);
}

.related-links-list li a:hover {
  background: rgba(16, 240, 186, 0.1);
  border-color: #10f0ba;
  color: #10f0ba;
  transform: translateX(4px);
}

.link-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 240, 186, 0.14);
  color: #10f0ba;
  border: 1px solid rgba(16, 240, 186, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

/* FAQ 手风琴全局防护与重置 (CSS Grid 丝滑无延迟) */
.faq-item {
  background: rgba(14, 23, 39, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  margin-bottom: 14px;
}

.faq-item:hover {
  border-color: rgba(16, 240, 186, 0.4);
}

.faq-item.active {
  border-color: rgba(16, 240, 186, 0.5);
  background: rgba(18, 30, 52, 0.9);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer;
  user-select: none;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF !important;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #10f0ba !important;
}

.faq-question span:first-child,
.faq-title {
  flex-grow: 1;
  font-size: 16px;
  font-weight: 700;
  color: inherit;
  line-height: 1.5;
}

.faq-toggle-icon {
  font-size: 20px;
  font-weight: 600;
  color: #10f0ba;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 240, 186, 0.1);
  border: 1px solid rgba(16, 240, 186, 0.25);
  line-height: 1;
}

.faq-item.active .faq-toggle-icon {
  color: #00ffc4;
  background: rgba(16, 240, 186, 0.25);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease;
  opacity: 0;
  overflow: hidden;
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-answer > p {
  min-height: 0;
  overflow: hidden;
  padding: 0 24px 22px 24px;
  margin: 0;
  color: #CBD5E1;
  font-size: 14.5px;
  line-height: 1.8;
}

/* ==========================================================================
   知识库大厅卡片网格样式 (articles/index.html 专用)
   ========================================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.article-card {
  background: rgba(11, 18, 33, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal, 0.3s ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.article-card:hover {
  border-color: rgba(16, 240, 186, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 240, 186, 0.12);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.article-cat {
  font-size: 11.5px;
  font-weight: 700;
  color: #10f0ba;
  background: rgba(16, 240, 186, 0.12);
  border: 1px solid rgba(16, 240, 186, 0.32);
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(16, 240, 186, 0.12);
}

.article-date {
  font-size: 12px;
  color: #64748B;
}

.article-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.article-card-title a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color var(--transition-fast, 0.2s ease);
}

.article-card-title a:hover {
  color: #10f0ba;
}

.article-excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: #94A3B8;
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.keyword-pill {
  font-size: 11px;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  transition: all var(--transition-fast, 0.2s ease);
}

.keyword-pill:hover {
  border-color: rgba(16, 240, 186, 0.35);
  color: #10f0ba;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.read-time {
  color: #64748B;
}

.article-link-arrow {
  color: #10f0ba;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--transition-fast, 0.2s ease);
}

.article-link-arrow:hover {
  transform: translateX(4px);
  color: #00ffc4;
  text-decoration: none;
}

/* ==========================================================================
   移动端与平板自适应
   ========================================================================== */
@media (max-width: 992px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-page {
    padding: 20px 0 60px 0;
  }

  .article-page article,
  .article-container {
    padding: 26px 18px;
    border-radius: var(--radius-md, 12px);
  }

  .article-main-title {
    font-size: 22px;
    line-height: 1.4;
  }

  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
  }

  .article-body h2,
  .article-content h2 {
    font-size: 19px;
    margin: 34px 0 14px 0;
  }

  .article-body p,
  .article-content p {
    font-size: 14.5px;
    line-height: 1.75;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .related-links-list li a {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .article-table th,
  .article-table td {
    padding: 12px 14px;
    font-size: 13px;
  }
}
