body { padding-top: 50px; }
.left-aligned { margin-left: auto; }
.bg-dark { background-color: #343a40 !important; }
.bg-hero { background-color: #45b06cff; }

/* CALLOUT */
.bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem }
.bd-callout h4 { margin-bottom: 1.25rem }
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { border-radius:.25rem }
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:#5bc0de }
.bd-callout-warning { border-left-color:#f0ad4e }
.bd-callout-danger { border-left-color:#d9534f }

/* footer */
footer a { color: white; font-weight: bold; text-decoration: none; }
footer a:hover { color: white; text-decoration: underline; }

/* 调整导航栏高度 */
.custom-navbar {
  background-color: #800020 !important;
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
  min-height: 50px; /* 减小高度 */
  transition: all 0.3s ease;
}

/* 导航栏品牌文字样式 */
.custom-navbar-brand {
  color: white !important;
  font-weight: bold;
  font-size: 1.3rem; /* 稍微减小字体 */
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.custom-navbar-brand:hover {
  color: #f8f9fa !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 导航链接文字样式 */
.custom-nav-link {
  color: white !important;
  font-weight: 500;
  font-size: 0.95rem; /* 减小字体 */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.8rem !important; /* 减小内边距 */
  margin: 0 0.1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.custom-nav-link:hover,
.custom-nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* 下拉菜单样式 */
.custom-dropdown {
  background-color: #800020 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 0 !important; /* 调整下拉菜单位置 */
}

/* 下拉菜单项样式 */
.custom-dropdown-item {
  color: white !important;
  font-weight: 400;
  font-size: 0.9rem; /* 减小字体 */
  padding: 0.5rem 1.2rem !important; /* 减小内边距 */
  transition: all 0.2s ease;
}

.custom-dropdown-item:hover,
.custom-dropdown-item:focus {
  background-color: #600018 !important;
  color: white !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* 确保下拉菜单在展开时文字为白色 */
.custom-navbar .dropdown-menu.show {
  background-color: #800020 !important;
}

/* 导航栏隐藏/显示动画 */
.navbar-hidden {
  transform: translateY(-100%);
}

.navbar-visible {
  transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 991px) {
  .custom-nav-link {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem !important;
  }

  .custom-navbar-brand {
    font-size: 1.1rem;
  }

  .custom-navbar {
    min-height: 45px;
  }
}

/* 内容表格样式 */
        .preview-content table{
            text-align: left;
            font-size: 17px;
            margin: 0 auto;
            text-indent: 1em;

            border-collapse: collapse;
            border-top: 2px solid rgb(61, 61, 61);
            border-bottom: 2px solid rgb(61, 61, 61);
            border-left: 0;
            border-right: 0;
        }

        .preview-content th{
            text-align: center;
            font-size: 17px;
            margin: 0 auto;
            text-indent: 1em;
            border-bottom: 2px solid rgb(61, 61, 61);
        }

        .preview-content td{
            text-align: center;
            font-size: 17px;
            margin: 0 auto;
            text-indent: 1em;
            border-top: 1px solid rgb(255, 255, 255);
            border-right: 1px solid rgb(255, 255, 255);
            border-bottom: 1px solid rgb(255, 255, 255);
            border-left: 1px solid rgb(255, 255, 255);
        }

        .preview-content tr{
            text-align: center;
            font-size: 17px;
            margin: 0 auto;
            text-indent: 1em;
        }

/* 可展开的子菜单的样式更新 */
.expandable-item {
  position: relative;
  overflow: hidden;
  transition: height 0.3s ease;
}

.expandable-item .submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.expandable-item.expanded .submenu {
  max-height: 300px; /* 根据子菜单项数量调整 */
}

.expandable-item.expanded {
  height: auto;
}

.navbar-nav ul,
.submenu {
  list-style: none;
  padding-left: 0;
}

/* 特别针对子菜单列表 */
.submenu {
  list-style-type: none !important;
}

/* 确保所有导航内的列表都没有标记 */
.custom-navbar ul {
  list-style: none;
}

/* 完全透明子菜单 */
/* 完全透明子菜单（无边框） */
.submenu.custom-dropdown {
  background-color: transparent !important;
  backdrop-filter: none;
  border: none; /* 移除边框 */
  box-shadow: none; /* 移除阴影 */
}

.submenu .custom-dropdown-item {
  background-color: transparent !important;
  color: white !important;
  transition: background-color 0.3s ease;
}

.submenu .custom-dropdown-item:hover,
.submenu .custom-dropdown-item:focus {
  background-color: rgba(128, 0, 32, 0.3) !important;
}



/* 导航栏颜色更新 */
/* 微妙的色调变化效果 */
/* 强化导航栏颜色变化效果 */
.custom-navbar {
  background: linear-gradient(135deg, #800020, #6a002d, #54003a, #3d0047, #260054);
  background-size: 300% 300%;
  animation: vibrantShift 3s ease infinite;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes vibrantShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 增强导航链接的悬停效果 */
.custom-nav-link:hover,
.custom-nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 1);
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* 增强品牌文字效果 */
.custom-navbar-brand:hover {
  color: #f8f9fa !important;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* 强化下拉菜单项悬停效果 */
.custom-dropdown-item:hover,
.custom-dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 1);
  transform: translateX(5px);
  transition: all 0.2s ease;
}

/* 页面整体背景 */
body {
  padding-top: 50px;
  background-color: #f0f4f8;
  background-image: linear-gradient(90deg, #e0e7ee 1px, transparent 1px);
  background-size: 20px 100%;
  background-attachment: fixed;
  min-height: 100vh;
}



/* 为特定页面添加内容压缩样式 */
/* 为特定页面添加内容压缩样式 */
.human-practices-page .container {
  /* width: 90% !important; 原来的90% */
  margin-left: 0 !important; /* 靠左对齐 */
  margin-right: auto !important; /* 右侧自动边距 */
  padding-left: 15px;
  padding-right: 15px;
}

/* 图片容器样式 */
/* 图片容器样式 */
.image-container {
  width: 100%;
  margin: 20px 0;
  text-align: center;
  position: relative;
}
iframe {
    display: block;
    margin: 0 auto;
}
.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式图片容器 */
.responsive-image-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 20px 0;
}

.responsive-image-container::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 宽高比 */
}

.responsive-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 正方形图片容器 */
.square-image-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 20px 0;
}

.square-image-container::before {
  content: "";
  display: block;
  padding-top: 100%; /* 1:1 正方形比例 */
}

.square-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 图片标题样式 */
.image-caption {
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  margin-top: 10px;
  font-style: italic;
}

.square-image-container {
  height: 200px; /* 设定固定高度 */
  overflow: hidden;
}

.square-image-container img {
  object-fit: cover; /* 保持比例填充容器 */
  width: 100%;
  height: 100%;
}


/* 文字内容背景样式 */
/* 文字内容背景容器 */
.content-background {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(128, 0, 32, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .content-background {
    padding: 20px;
    margin: 15px 0;
  }
}

/* 减小导航链接的内边距和字体大小 */
.custom-nav-link {
  padding: 0.3rem 0.6rem !important; /* 从 0.3rem 0.8rem 减小 */
  font-size: 0.9rem; /* 从 0.95rem 减小 */
  margin: 0 0.05rem; /* 从 0.1rem 减小 */
}

/* 减小下拉菜单项的内边距 */
.custom-dropdown-item {
  padding: 0.4rem 1rem !important; /* 从 0.5rem 1.2rem 减小 */
  font-size: 0.85rem; /* 从 0.9rem 减小 */
}

/* 减小品牌文字大小 */
.custom-navbar-brand {
  font-size: 1.2rem; /* 从 1.3rem 减小 */
}
/* 进一步减小导航栏高度 */
/* 图片逆时针旋转90度的类 */
.rotate-90-counterclockwise {
  transform: rotate(-90deg);
  transform-origin: center;
}

/* 如果需要保持旋转后元素占据原来的空间，可以添加以下样式 */
.rotate-90-counterclockwise-container {
  display: inline-block;
  transform: rotate(-90deg);
  transform-origin: center;
}

/* 侧边栏样式 */
.sidebar {
  position: fixed;
  top: 50px;
  left: 0;
  bottom: 0;
  width: 250px;
  background-color: rgba(248, 249, 250, 0.9);
  backdrop-filter: blur(5px);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  overflow-y: auto;
  z-index: 100;
  transition: all 0.3s ease;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar.visible {
  transform: translateX(0);
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 8px 20px;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  display: block;
  text-decoration: none;
}

.sidebar .nav-link:hover {
  color: #800020;
  background-color: rgba(128, 0, 32, 0.05);
  border-left: 3px solid #800020;
}

.sidebar .nav-link.active {
  color: #800020;
  background-color: rgba(128, 0, 32, 0.1);
  border-left: 3px solid #800020;
}

.sidebar .sidebar-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 10px 20px;
  color: #6c757d;
  font-weight: bold;
}

/* 主内容区域调整 */
.main-content {
  margin-left: 250px;
  padding: 20px;
  transition: margin-left 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.visible {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    position: fixed;
    top: 60px;
    left: 10px;
    z-index: 101;
    display: block;
  }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #800020;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #6a002d;
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
  position: fixed;
  top: 60px;
  left: 10px;
  z-index: 101;
  display: none;
  background-color: #800020;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
}
/* 为不需要侧边栏的页面隐藏侧边栏 */
.no-sidebar .sidebar {
  display: none;
}

.no-sidebar .main-content {
  margin-left: 0;
}

/* 在小屏幕设备上也隐藏侧边栏切换按钮 */
.no-sidebar .sidebar-toggle {
  display: none;
}


/* 调整侧边栏高度，避免覆盖footer */
@media (min-width: 992px) {
  .sidebar {
    bottom: 100px; /* 为footer留出空间 */
  }
}

/* footer样式调整，确保在侧边栏之上 */
footer {
  position: relative;
  z-index: 101; /* 确保footer在侧边栏之上 */
}

/* 主内容区域调整 */
.main-content {
  margin-left: 250px;
  padding: 20px;
  transition: margin-left 0.3s ease;
  min-height: calc(100vh - 150px); /* 确保内容区域有最小高度 */
}

/* 响应式调整 */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    bottom: 0;
  }
  
  .sidebar.visible {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    position: fixed;
    top: 60px;
    left: 10px;
    z-index: 101;
    display: block;
  }
}
/* 在大屏幕上居中导航栏 */
@media (min-width: 992px) {
  /* 居中导航菜单项 */
  .custom-navbar .navbar-nav {
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }

  
  /* 确保容器相对定位 */
  .custom-navbar .container {
    position: relative;
    display: flex;
    justify-content: center;
  }
}