/* 默认字体设置 */
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, system-ui, sans-serif;
}

/* Custom utility classes */
.mb-20 {
  margin-bottom: 8rem !important;
  /* 20 * 0.4rem = 8rem */
}

/* 导航栏标题样式 */
.navbar-brand p {
  font-size: 1.5rem !important;
}

/* 标题的上外边距 */
h2 {
  margin-top: 2rem !important;
  /* 64px */
}

h3 {
  margin-top: 2rem !important;
  /* 48px */
  /* color: #2965B1 !important; */
  /* 政府网站常用暗蓝色 */
}

h4,
h5 {
  margin-top: 1rem !important;
}


li {
  color: #666666 !important;
}

th,
td {
  font-size: 0.95rem !important;
  color: #666666 !important;
}

.homepage-divider {
  height: 60px;
  margin-top: 60px;
}

/* 代码块切换按钮 */
.code-group {
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  margin: 1rem 0;
}


.code-group summary {
  padding: 0.5rem 1rem;
  color: #6c757d;
  cursor: pointer;
  user-select: none;
}

.code-group summary:hover {
  color: #0d6efd;
  background-color: #f8f9fa;
}

.code-group pre {
  margin: 0;
  border-top: 1px solid #dee2e6;
}

/* 移动设备上的样式 */
@media (max-width: 576px) {
  .homepage-divider {
    height: 40px;
    margin-top: 20px;
  }

  h1 {
    font-size: 1.75rem !important;
  }

  /* 标题的上外边距 */
  h2 {
    font-size: 1.5rem !important;
    margin-top: 1rem !important;
  }

  h3 {
    font-size: 1.2rem !important;
    margin-top: 1rem !important;
  }

  .bd-content>h3 {
    font-size: 1.1rem !important;
  }

  h4,
  .text-body-secondary {
    font-size: 1rem !important;
  }

  h5 {
    font-size: 1rem !important;
  }

  p,
  li,
  ul {
    font-size: 0.9rem !important;
  }

  th,
  td,
  tr {
    font-size: 0.8rem !important;
  }

}

/* 联系方式区块样式 - 类似bd-masthead */
.bd-contact {
  background-image: url('/images/footer-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  min-height: 400px;
  padding-bottom: 20px;
}

@media (max-width: 767.98px) {
  .bd-contact {
    min-height: 200px;
  }
}

.bd-contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 102, 228, 0.6);
  z-index: 1;
}

.bd-contact .container {
  position: relative;
  z-index: 2;
}

.bd-contact h3,
.bd-contact h4 {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bootstrap icon-link-hover 效果 - 兼容 fastbootstrap */
.icon-link-hover {
  transition: transform 0.3s ease, color 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

.icon-link-hover:hover {
  transform: translateX(4px) !important;
  text-decoration: none !important;
}

.icon-link-hover i {
  transition: transform 0.3s ease !important;
  margin-left: 0.5rem !important;
}

.icon-link-hover:hover i {
  transform: translateX(2px) !important;
}



/* 为 text-decoration-none 链接添加卡片悬停效果 */
a.text-decoration-none .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  cursor: pointer !important;
  will-change: transform, box-shadow !important;
  transform: translateY(0) !important;
}

a.text-decoration-none:hover .card {
  transform: translateY(-8px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
  text-decoration: none !important;
}



/* 标题下面的装饰 */
.title-decorator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto;
  width: 160px;
}

.title-decorator::before,
.title-decorator::after {
  content: '';
  display: block;
  height: 2px;
  width: 60px;
  background-color: var(--bs-primary);
  border-radius: 1px;
}

.center-dot {
  width: 8px;
  height: 8px;
  background-color: var(--bs-primary);
  border-radius: 50%;
  flex-shrink: 0;
}