/* 全局防溢出 */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* 1. 局部基础与隔离设置 */
.news-detail-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f4f5f7;
  color: #222;
  line-height: 1.7;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  /* 防止组件整体向外溢出 */
}

/* 2. 重置组件内部元素的盒模型及边距 */
.news-detail-wrapper *,
.news-detail-wrapper *::before,
.news-detail-wrapper *::after {
  box-sizing: border-box;
}

/* 3. 页面布局与组件样式 */
.news-detail-wrapper .container {
  max-width: 80%;
  width: 100%;
  margin: 24px auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 1fr;
  /* 默认单列（移动端优先） */
  gap: 20px;
}

/* 大屏开启双列 sidebar 布局 */
@media (min-width: 992px) {
  .news-detail-wrapper .container {
    grid-template-columns: 1fr 340px;
    gap: 32px;
  }
}

.news-detail-wrapper .main-card {
  background: #fff;
  padding: 32px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  word-break: break-word;
  overflow-wrap: anywhere;
  /* 兼容长字符串折行 */
  max-width: 100%;
  min-width: 0;
  /* 修复 Grid/Flex 容器默认 min-width: auto 导致的溢出 */
  overflow: hidden;
  /* 截断溢出部分 */
}

.news-detail-wrapper h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 16px;
  text-align: center;
  word-break: break-word;
}

.news-detail-wrapper .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
  margin-bottom: 24px;
  justify-content: center;
}

.news-detail-wrapper .hero-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 20px;
  display: block;
}

.news-detail-wrapper p {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
}

/* 富文本内容防超出控制 */
.news-detail-wrapper .content {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

/* 处理富文本中的所有子元素 */
.news-detail-wrapper .content * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.news-detail-wrapper .content img,
.news-detail-wrapper .content video,
.news-detail-wrapper .content iframe {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}

/* 针对富文本表格的防溢出控制 */
.news-detail-wrapper .content table {
  /*display: block !important;*/
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  table-layout: fixed;
}

.news-detail-wrapper .sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.news-detail-wrapper .widget {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.news-detail-wrapper .widget-title {
  font-size: 16px;
  font-weight: 700;
  border-left: 4px solid #1876f2;
  padding-left: 10px;
  margin-bottom: 16px;
}

.news-detail-wrapper .rank-list {
  list-style: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* 4. 热榜列表项 */
.news-detail-wrapper .rank-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #333333;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 100%;
}

.news-detail-wrapper .rank-num {
  font-weight: bold;
  color: #1876f2;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.news-detail-wrapper .rank-text {
  color: #333;
  flex: 1;
  word-break: break-all;
  transition: color 0.2s ease;
}

.news-detail-wrapper .rank-item:hover {
  background-color: #f0f9ff;
}

.news-detail-wrapper .rank-item:hover .rank-text {
  color: #1876f2;
}

/* 上一篇/下一篇链接布局样式 */
.post-navigation {
  max-width: 80%;
  margin: 16px auto;
  padding: 0 15px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 5. 移动端适配强化 */
@media (max-width: 768px) {
  .news-detail-wrapper .container {
  max-width: 100%;
  width: 100%;
  margin: 24px auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 1fr;
  /* 默认单列（移动端优先） */
  gap: 20px;
}
  .news-detail-wrapper .container {
    margin: 12px auto;
    padding: 0 10px;
    gap: 16px;
  }

  .news-detail-wrapper .main-card {
    padding: 16px 12px;
    border-radius: 0;
    /* 移动端贴边展示更省空间 */
  }

  .news-detail-wrapper h1 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .news-detail-wrapper .article-meta {
    gap: 8px 12px;
    font-size: 12px;
    justify-content: flex-start;
  }

  .news-detail-wrapper p {
    font-size: 15px;
  }
}

/* FAQ  1. 容器样式（隔离区） */
.faq-blue-card {
  box-sizing: border-box;
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: #444;
  line-height: 1.6;
}

/* 内部所有元素重置，防止被外部全局样式污染 */
.faq-blue-card * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  list-style: none;
  outline: none;
  text-decoration: none;
}

/* 2. 标题区 */
.faq-blue-card .f-bc-header {
  text-align: center;
  margin-bottom: 40px;
}

.faq-blue-card .f-bc-title {
  font-size: 24px;
  font-weight: 800;
  color: #0d1b3e;
  /* 更深的商务蓝黑 */
  letter-spacing: 1px;
}

/* 标题下的蓝色短线 */
.faq-blue-card .f-bc-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: #2563eb;
  /* 经典蓝色 */
  margin: 12px auto 0;
  border-radius: 2px;
}

.faq-blue-card .f-bc-subtitle {
  font-size: 16px;
  color: #888;
  margin-top: 10px;
}

/* 3. FAQ 列表 */
.faq-blue-card .f-bc-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* 卡片之间的间距 */
}

/* 4. FAQ 卡片条目 */
.faq-blue-card .f-bc-item {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  /* 经典卡片阴影，悬停时加强 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
  /* 预设边框平滑过度 */
}

/* 悬停时的品质感提升：阴影变大，蓝色微光 */
.faq-blue-card .f-bc-item:hover {
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  /* 向上微浮 */
}

/* 展开状态的样式调整 */
.faq-blue-card .f-bc-item[open] {
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
  border-color: #e2e8f0;
  /* 添加细边框，更清晰 */
}

/* 5. 问题区域 */
.faq-blue-card .f-bc-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 30px;
  cursor: pointer;
  /* --- 核心修复：移除点击黑框与阴影 --- */
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
  /* 防止点击时选中文本 */
}

/* 彻底清除焦点/点击时的边框外发光 */
.faq-blue-card .f-bc-question:focus,
.faq-blue-card .f-bc-question:active,
.faq-blue-card .f-bc-question:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* 移除 Chrome / Safari / Edge 默认箭头及 marker */
.faq-blue-card .f-bc-question::-webkit-details-marker,
.faq-blue-card .f-bc-question::marker {
  display: none;
  content: "";
}

/* 问题文本容器 */
.faq-blue-card .f-bc-q-text {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 问题前的蓝色方形图标 */
.faq-blue-card .f-bc-q-mark {
  display: block;
  width: 10px;
  height: 10px;
  background-color: #2563eb;
  border-radius: 2px;
  flex-shrink: 0;
}

/* 6. 图标：经典的蓝色加号图标 */
.faq-blue-card .f-bc-icon {
  position: relative;
  width: 20px;
  height: 20px;
  margin-left: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* 加号的线条样式 */
.faq-blue-card .f-bc-icon::before,
.faq-blue-card .f-bc-icon::after {
  content: "";
  position: absolute;
  background-color: #2563eb;
  /* 线条为蓝色 */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 横线 */
.faq-blue-card .f-bc-icon::before {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
}

/* 竖线 */
.faq-blue-card .f-bc-icon::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
}

/* 展开状态的图标旋转动画 */
.faq-blue-card .f-bc-item[open] .f-bc-icon {
  transform: rotate(45deg);
  /* 顺时针旋转45度，形成一个X */
}

/* 7. 答案区域 */
.faq-blue-card .f-bc-answer {
  padding: 0 30px 25px 30px;
  font-size: 14px;
  /* 修改答案字体大小为 14px */
  color: #666;
  border-top: 1px solid #f1f5f9;
  /* 添加顶部细分割线 */
  margin-top: 0;
  padding-top: 20px;
  animation: fBcSlideDown 0.3s ease-out;
  /* 采用滑下动画 */
}


/* 简单动画：答案滑下 */
@keyframes fBcSlideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* ==========================================
       8. 移动端兼容性适配 (Mobile Responsive)
       ========================================== */
@media (max-width: 768px) {
  .faq-blue-card {
    margin: 25px auto;
    padding: 0 12px;
  }

  .faq-blue-card .f-bc-header {
    margin-bottom: 25px;
  }

  .faq-blue-card .f-bc-title {
    font-size: 22px;
  }

  .faq-blue-card .f-bc-subtitle {
    font-size: 14px;
  }

  .faq-blue-card .f-bc-question {
    padding: 16px 18px;
  }

  .faq-blue-card .f-bc-q-text {
    font-size: 15px;
    /* 移动端问题字号适度缩小 */
    gap: 8px;
  }

  .faq-blue-card .f-bc-q-mark {
    width: 8px;
    height: 8px;
  }

  .faq-blue-card .f-bc-answer {
    padding: 15px 18px 20px 18px;
    font-size: 14px;
    /* 移动端保持 14px */
    line-height: 1.5;
  }

  /* 移动端稍微减弱 hover 的上浮效果，提升触摸体验 */
  .faq-blue-card .f-bc-item:hover {
    transform: none;
  }
}