/* ============================================================
   指南页（浅色背景）的 header 修正
   原站点 header 默认是「透明底 + 白色文字」（深色横幅上用），
   只有滚动 50px 后 JS 才加 .sticky（白底 + 蓝字）。
   指南页顶部是浅色底，未滚动时白字会看不见 —— 这里让指南页
   header 始终为白底 + 深色文字。
   ============================================================ */
body.page-guide .header-area,
body.page-guide .header-area:not(.sticky) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-bottom: 1px solid #eceff5;
  box-shadow: 0 1px 8px rgba(23, 26, 29, 0.04);
}

/* 菜单文字：未滚动与滚动后保持一致（深灰蓝） */
body.page-guide .navbar .navbar-nav > li > a,
body.page-guide .header-area:not(.sticky) .navbar .navbar-nav > li > a {
  color: #2e3d62;
}

body.page-guide .navbar .navbar-nav > li > a::before,
body.page-guide .header-area:not(.sticky) .navbar .navbar-nav > li > a::before {
  background-color: #2e3d62;
}

/* 移动端汉堡按钮：白底上要看得见 */
body.page-guide .navbar .navbar-toggler .toggler-icon {
  background-color: #2e3d62;
}

/* 悬浮/选中的高亮色：商务淡蓝 */
body.page-guide .navbar .navbar-nav > li > a:hover,
body.page-guide .navbar .navbar-nav > li > a.active,
body.page-guide .header-area:not(.sticky) .navbar .navbar-nav > li > a:hover,
body.page-guide .header-area:not(.sticky) .navbar .navbar-nav > li > a.active {
  color: #4a7fb5;
}

/* 下拉菜单文字：由高饱和 #056afc 调整为更淡、更商务的蓝 */
body.page-guide .navbar .navbar-nav li .sub-menu li a {
  color: #4a7fb5;
}

body.page-guide .navbar .navbar-nav li .sub-menu li:hover > a {
  color: #6b9ccb;
}

.guide-page-area {
  padding: 120px 0 80px;
  background: #fafbff;
  min-height: calc(100vh - 200px);
}

/* 「User Guide」上方的平台图标（替代原蓝色菱形） */
.guide-platform-icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto 8px;
}

/* 关闭原有的蓝色菱形（sub-title::before），改用平台图标 */
body.page-guide .guide-page-area .section-title .sub-title::before,
body.page-guide .guide-page-area .section-title.text-center .sub-title::before {
  display: none;
  content: none;
  width: 0;
  height: 0;
  border: 0;
}

/* 关掉菱形后不再需要为它预留的上方内边距 */
body.page-guide .guide-page-area .section-title .sub-title {
  padding-top: 0;
}

body.page-guide .guide-page-area .section-title .title {
  margin-top: 6px;
}

.guide-page-area .section-title .title {
  font-size: 32px;
  margin-top: 10px;
}

.guide-meta {
  margin-top: 16px;
  font-size: 14px;
  color: #999;
}

.guide-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 40px;
}

.guide-sidebar {
  flex: 0 0 240px;
  position: sticky;
  top: 100px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 24px 0;
}

.guide-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding: 0 24px 12px;
  border-bottom: 1px solid #f0f2f8;
  margin-bottom: 8px;
}

.guide-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-nav li a {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  color: #666e82;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.guide-nav li a:hover,
.guide-nav li a.active {
  color: #068adf;
  background: #f0f7ff;
  border-left-color: #068adf;
}

.guide-main {
  flex: 1;
  min-width: 0;
}

.guide-section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px 48px;
  margin-bottom: 32px;
  scroll-margin-top: 100px;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section h2 {
  font-size: 22px;
  color: #333;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #068adf;
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-section .section-desc {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
}

.guide-video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 16px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.guide-video-wrap video {
  width: 100%;
  display: block;
}

.guide-video-title {
  font-size: 16px;
  font-weight: 600;
  color: #444;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #068adf;
}

.guide-video-title:first-of-type {
  margin-top: 0;
}

.guide-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-feature-list li {
  position: relative;
  padding: 10px 0 10px 20px;
  font-size: 15px;
  line-height: 1.75;
  color: #666e82;
  border-bottom: 1px solid #f5f6fa;
}

.guide-feature-list li:last-child {
  border-bottom: none;
}

.guide-feature-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #fd4538;
  font-weight: bold;
  font-size: 18px;
}

.guide-cert-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 16px;
  text-align: center;
}

.guide-cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.guide-cert-row img {
  width: calc(50% - 8px);
  max-width: 280px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guide-cert-caption {
  font-size: 13px;
  color: #999;
  margin: 12px 0 0;
  text-align: center;
  width: 100%;
}

.guide-demo-img {
  max-width: 480px;
  margin: 0 auto 16px;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.guide-tip {
  background: #faf7ef;
  border: 1px solid #f0ead8;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #967d53;
}

.guide-tip strong {
  color: #856404;
}

.guide-steps {
  margin: 16px 0 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps > li {
  position: relative;
  padding: 12px 0 12px 36px;
  font-size: 15px;
  line-height: 1.75;
  color: #666e82;
  border-bottom: 1px solid #f5f6fa;
  counter-increment: step;
}

.guide-steps > li:last-child {
  border-bottom: none;
}

.guide-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  background: #c5d6fc;
  color: #068adf;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-steps ul {
  margin: 8px 0 0 16px;
  list-style: disc;
}

.guide-steps ul li {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 4px;
}

.guide-info-box {
  background: #f0f7ff;
  border: 1px solid #d6e8fa;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}

.guide-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 14px;
}

.guide-info-row:last-child {
  margin-bottom: 0;
}

.guide-info-label {
  color: #666;
  min-width: 120px;
}

.guide-info-value {
  color: #333;
  font-family: Consolas, Monaco, monospace;
  background: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #e2e2e2;
  flex: 1;
  word-break: break-all;
}

.guide-contact-card {
  text-align: center;
  padding: 24px;
}

.guide-contact-card img {
  width: 180px;
  margin-bottom: 16px;
}

.guide-contact-card p {
  font-size: 15px;
  color: #666e82;
  margin-bottom: 8px;
}

.guide-contact-phone {
  font-size: 22px;
  font-weight: 600;
  color: #068adf;
}

.guide-divider {
  height: 1px;
  background: #f0f2f8;
  margin: 32px 0;
}

@media (max-width: 991px) {
  .guide-layout {
    flex-direction: column;
  }

  .guide-sidebar {
    position: static;
    flex: none;
    width: 100%;
  }

  .guide-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 0 12px;
  }

  .guide-nav li a {
    padding: 8px 14px;
    border-left: none;
    border-radius: 20px;
    margin: 4px;
    background: #f5f6fa;
    font-size: 13px;
  }

  .guide-nav li a:hover,
  .guide-nav li a.active {
    background: #068adf;
    color: #fff;
  }
}

.guide-nav-group {
  padding: 16px 24px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-role-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.guide-role-header h2 {
  margin: 0;
}

.guide-role-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #068adf, #4a9eff);
  border-radius: 20px;
}

.guide-section-role .guide-role-badge {
  background: linear-gradient(135deg, #068adf, #4a9eff);
}

#guard-guide .guide-role-badge {
  background: linear-gradient(135deg, #2e9f6a, #5bc992);
}

#staff-guide .guide-role-badge {
  background: linear-gradient(135deg, #7b61ff, #a894ff);
}

#visitor-guide .guide-role-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.guide-ui-note {
  margin-bottom: 20px;
}

.guide-ui-note .guide-tip {
  margin-top: 0;
}

.guide-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 28px;
  padding: 16px;
  background: #f8faff;
  border-radius: 8px;
  border: 1px solid #e8eef8;
}

.guide-subnav li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  color: #068adf;
  background: #fff;
  border: 1px solid #d6e8fa;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.guide-subnav li a:hover {
  background: #068adf;
  color: #fff;
  border-color: #068adf;
  text-decoration: none;
}

.guide-subsection {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px dashed #e8eef8;
  scroll-margin-top: 100px;
}

.guide-subsection:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.guide-sub-title {
  font-size: 18px;
  color: #333;
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid #068adf;
}

.guide-mini-title {
  font-size: 15px;
  font-weight: 600;
  color: #555;
  margin: 20px 0 10px;
}

.guide-figure,
.guide-figure-grid {
  margin: 20px 0 8px;
}

.guide-figure-grid {
  display: grid;
  /* 横向最多 3 张：minmax 下限按「3 列仍能放下」取值，
     配合 max-width 上限避免超宽屏出现第 4 列 */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 900px;
  gap: 16px;
}

/* 明确锁定最多 3 列（窄屏由 auto-fit 自动降为 2 列 / 1 列） */
@media (min-width: 768px) {
  .guide-figure-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guide-step-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e8eef8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: block;
}

/* 单张图片（放进 figure 里、不参与三列网格）不撑满整列，限宽并居中，
   避免一张手机截图被放得过大、与三列网格的观感不协调。
   用 min(100%, 320px) 保证窄屏仍能自适应。 */
.guide-figure > .guide-step-img {
  width: auto;
  max-width: min(100%, 320px);
  margin-left: auto;
  margin-right: auto;
}

/* 网格里只有一张图时同样限宽居中（成为「单图」而非一格） */
.guide-figure-grid:has(> .guide-step-img:only-child) {
  grid-template-columns: minmax(0, min(100%, 320px));
  justify-content: center;
}

/* 网络不支持 :has() 时，用 figure 包裹的单图规则兜底即可 */
@supports not selector(:has(*)) {
  .guide-figure-grid > .guide-step-img:only-child {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

.guide-figure-caption {
  font-size: 13px;
  color: #999;
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .guide-page-area {
    padding: 100px 0 60px;
  }

  .guide-section {
    padding: 28px 20px;
  }

  .guide-page-area .section-title .title {
    font-size: 24px;
  }

  .guide-cert-row img {
    width: 100%;
    max-width: 280px;
  }
}
