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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

* {
  box-sizing: border-box;
}

[id] {
  scroll-margin-top: 180px; /* 必须！确保跳转后内容可见 */
}

/* 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 }


/* 导航栏 */
/* 背景色 */
.custom-navbar-bg {
    background-color: #4F7F30;
    height: 60px;
}

.navbar-nav .nav-item {
    margin: 0 15px;
    font-family: "Poppins", sans-serif;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: white;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

/* 鼠标悬停菜单效果 */
.navbar-dark .navbar-nav .nav-link:hover {
    background-color: #3C5139 !important;
    color: white !important;
    transform: none !important;
    text-shadow: 
    0 0 1px #ffffff,
    0 0 1px #ffffff,
    0 0 1px #ffffff;
}

/* 确保基础状态无背景色 */
.navbar-nav .nav-link {
    background-color: transparent !important;
}

/* 下拉菜单 */
.navbar-nav .dropdown-menu {
    background-color: #B1D685;
    border-radius: 6px;
    border: none;
    text-align: center;
    min-width: 200px;
}

/* 下拉菜单项 */
.navbar-nav .dropdown-item {
    color: white;
    padding: 10px 25px; /* 增加内边距 */
    transition: all 0.3s ease;
    text-align: center; /* 文字居中 */
    font-weight: 400;
    font-size: 0.95rem;
}

/* 下拉菜单悬停 */
.navbar-nav .dropdown-item:hover {
    background-color: #E8F7C9;
    color: #5a5e2b;
    transform: scale(1.05);
    font-size: 1.05rem;
    font-weight: 500;
}

/* Logo样式 */
.navbar-brand .navbar-logo {
    height: 50px;
    transition: transform 0.3s;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1);
}


/* 导航栏自动隐藏动画 */
.navbar {
  transition: transform 0.3s ease-in-out;
}

/* 向上滑出屏幕 */
.navbar.hidden {
  transform: translateY(-100%);
}

/* 侧边固定导航栏 */
/* 侧边固定导航栏 */
/* 侧边固定导航栏 */
.sticky-menu {
  position: fixed;
  top: 160px;
  min-height: 300px;
  left: 20px; 
  width: 200px;
  padding: 15px 10px;
  color: black;
  z-index: 1000;
  max-height: 60vh;
  overflow-y: auto;
}

.sticky-menu::-webkit-scrollbar {
  width: 6px;
}
.sticky-menu::-webkit-scrollbar-thumb {
  background: #ffcc00;
  border-radius: 3px;
}
.sticky-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.sticky-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sticky-menu ul li a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 12px;
  font-size: 0.95em;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border-left: 3px solid transparent; /* 悬停时出现强调线 */
}

.sticky-menu ul li a:hover {
  background-color: #B1D685;
  color: #555;
  border-left-color: #FFCC00;
  padding-left: 15px;
}

/* 子菜单缩进 */
.sticky-menu ul ul {
  margin-left: 20px;
  padding-left: 0;
  font-size: 0.85em;
}

.sticky-menu ul ul li a {
  padding: 6px 12px;
  color: white;
}

.sticky-menu > ul > li > a.active {
  font-weight: bold !important;
  color: #4F7F30 !important;
  background-color: #E8F7C9 !important; /* 明显的浅绿色 */
  border-left-color: #FFCC00 !important;
  padding-left: 15px !important;
  transform: scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sticky-menu ul ul li a.active {
  font-weight: bold !important;
  color: #4F7F30 !important;
  background-color: #E8F7C9 !important;
  border-left-color: #FFCC00 !important;
  padding-left: 15px !important;
}



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

/* 首页 */
/* 首页 */
/* 首页 */
/* 首页容器 */
/* 首页容器 */

/* 每个区域 */
.home {
  position: relative;
  width: 100%;
  background-image: url('https://static.igem.wiki/teams/5772/home/final.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* 所有 section 背景透明 */
.home-section {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 20vh;
  padding: 20px 20px;
  box-sizing: border-box;
}

/* 内容容器 */
.home-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2; /* 在背景之上 */
}

/* 行容器 */
.home-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 20vh;
}

/* 项目标题样式 */
.home-title {
  text-align: center;
  color: white;
  line-height: 1.4;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-title .main-heading {
  font-size: 4rem;
  font-weight: 800;
  color:#ffcc00
}

.home-title .sub-heading {
  font-size: 2.2rem;
  font-weight: 500;
  color: white;
}

/* 图片容器 */
.home-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.home-img {
  max-height: 400px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* 文字容器 */
.home-text {
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin: 10px;
  padding: 15px;
  border-radius: 12px;
}

.home-text p {
  font-size: 1.6rem;
  line-height: 1.7;
  color: white;
  text-align: center;
}

.home-text strong {
  font-weight: 700;
  color: #ffcc00;
  font-size: 1.6rem;
}

.section-1 {
  padding-top: 200px;
}

/* 内容页 */
/* 内容页 */
/* 内容页 */

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; 
  height: 100vh; 
  background-image: url('https://static.igem.wiki/teams/5772/home/final.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
}

/* 正文盒子 */
/* 正文盒子 */
/* 正文盒子 */
.section-box {
  background-color: white;
  padding: 10px;
  margin: 30px 20px;
  margin-left: 260px; 
  width: calc(100% - 300px);
  max-width: 1200px;
  min-width: 600px;
  border-radius: 15px; 
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  line-height: 1.7;
  position: relative;
}

/* 内部左侧竖线 */
.section-line {
  border-left: 4px solid #4F7F30;
  padding: 10px;
  line-height: 1.7;
}

.section-box h1 {
  color: #2c3e50;
  font-size: 2.2em;
  margin-bottom: 16px;
  border-bottom: 3px solid #ffcc00;
  padding-bottom: 8px;
  display: inline-block;
}

.section-box h2 {
  font-size: 1.6em;
  color: #4F7F30;
  margin-top: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  position: relative;
  padding-left: 15px;
}

.section-box h3 {
  font-size: 1.3em;
  color: #555;
  margin-top: 20px;
  margin-bottom: 5px;
  font-weight: 500;
  position: relative;
  padding-left: 12px;
  letter-spacing: 0.5px;
}

.section-box h4 {
  font-size: 1.15em;
  color: #666;               
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 500;
  position: relative;
  padding-left: 10px;
  letter-spacing: 0.3px;
  font-style: normal;
}

.section-box h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #ccc; /* 浅灰色，非常克制 */
  border-radius: 2px;
}

.section-box h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 6px;
  height: 100%;
  background-color: #FFCC00;
}

.section-box p,
.section-box ul,
.section-box ol {
  color: black;
  text-align: justify;
  margin-bottom: 16px;
}

.section-box strong {
  font-weight: bold;
  color: #4F7F30;
}

/* 图片 容器 */


/* 单张图片：居中显示 */
.image-center {
  text-align: center;
  margin: 10px 0;
}

.image-center img {
  max-width: 100%;
  width: 50%;
  height: auto;
  border-radius: 0;
}

.image-container {
  text-align: center;
  margin: 10px 0;
}

.image-container img {
  max-width: 100%;
  width: 50%;
  height: auto;
  border-radius: 0;
}

.figure-container {
  text-align: center;
  margin: 10px 0;
}

.figure-container img {
  max-width: 100%;
  width: 50%;
  height: auto;
  border-radius: 0;
}

/* 两张图并列（响应式） */
.image-grid-2 {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.image-trio {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.image-trio .image-item {
  flex: 1 1 30%;
  min-width: 250px;
  text-align: center;
}

.image-trio img {
  width: 100%;
  height: auto;
}

.image-trio .fig-caption {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

.image-pair {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.image-item {
  flex: 1;
  min-width: 0; 
  text-align: center;
}

.image-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* 图注 */
.fig-caption {
  font-size: 0.9em;
  color: #666;
  text-align: center !important;
  line-height: 1.4;
  width: 100%;
  display: block;
  padding: 0;
  white-space: normal;
}

.figure-caption{
  font-size: 0.9em;
  color: #666;
  text-align: center !important;
  line-height: 1.4;
  width: 100%;
  display: block;
  padding: 0;
  white-space: normal;
}

/* PDF 嵌入容器 */
.pdf-container {
  display: block;
  width: 75%;
  max-width: 900px;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
}

.pdf-header {
  background-color: #4F7F30;
  color: white;
  padding: 10px 15px;
  font-weight: bold;
  font-size: 0.95em;
}

.pdf-frame {
  width: 100%;
  height: 500px;
  border: none;
}
.section-box.main-content-container {
  margin-left: 260px;
  width: calc(100% - 300px);
}

.references-section {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
}

.references-section h2 {
  color: #4F7F30;
  border-bottom: 2px solid #b1d685;
}

.references-section ol {
  padding-left: 20px;
  line-height: 1.6;
}

.references-section li {
  margin-bottom: 8px;
}

/* 移除 section-line 的左边竖线 */
.section-box.main-content-container .section-line {
  border-left: none;
  padding: 10px;
  line-height: 1.7;
}

/* ====== References 样式 ====== */
.references-section {
  background-color: #f9f9f9; 
  border-left-color: #b1d685;
  padding: 15px;
  border-radius: 0 0 10px 10px; 
}

.references-section h2 {
  color: #4F7F30;
  border-bottom: 2px solid #b1d685;
}

.references-section ol {
  padding-left: 20px;
  line-height: 1.6;
}

.references-section li {
  margin-bottom: 8px;
}

/* 表格容器 & 样式 */
/* 表格样式 */
/* 表格样式 */
/* 表格样式 - 修复超出容器问题 */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.eng-table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.eng-table caption {
  font-size: 1em;
  margin-bottom: 10px;
  color: #4F7F30;
  font-weight: bold;
  text-align: center;
  font-style: italic;
  caption-side: top;
  padding: 10px 0;
  background-color: #f5f9f2;
}

.eng-table thead tr {
  background-color: #4F7F30;
  color: white;
}

.eng-table th,
.eng-table td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  white-space: nowrap; /* 防止单元格内容换行 */
}

.eng-table th {
  text-align: center;
  font-weight: 600;
}

.eng-table tbody tr:nth-of-type(even) {
  background-color: #f9f9f9;
}

.eng-table tbody tr:hover {
  background-color: #f0f8e8;
}


/* team容器 */
/* team容器 */
/* team容器 */
.members-container {
  max-width: 1200px;
  margin: 50px auto;
  padding: 10px;
}

/* ===== 成员姓名特效 ===== */
.member-name {
  font-size: 1.4em;
  font-weight: bold;
  margin-top: 6px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #4F7F30, #B1D685);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.member-name:hover {
  transform: scale(1.05);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 分组标题 */
.group-title {
  font-size: 2em;
  color: white;
  margin: 60px 0 20px 0;
  border-bottom: 3px solid #B1D685;
  padding-bottom: 8px;
  display: inline-block;
  background-color: rgba(79, 127, 48, 0.7);
  padding: 5px 15px;
  border-radius: 8px;
}

/* 网格布局：每行最多两个卡片 */
.members-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: start;
}

/* 单个成员卡片 */
.member-card {
  display: flex;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  min-height: 180px;
  flex: 0 1 calc(50% - 15px);
  max-width: 580px; /* 控制最大宽度 */
  min-width: 300px;
  width: 100%; /* 自适应 */
  display: flex;
}

.member-image {
  width: 35%;
  flex-shrink: 0;
  padding: 10px;
  background-color: #f9f9f9;
  min-height: 180px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* 图片 */
.member-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top; 
  background-color: #f9f9f9; 
}

/* 右侧文字区：允许换行、自适应高度 */
.member-info {
  width: 65%;
  min-width: 0;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 内容从顶部开始 */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 文字样式建议 */
.member-name,
.member-role,
.member-bio {
  white-space: normal;
  overflow-wrap: break-word;
  margin: 0 0 8px 0;
}

/* 插图动画 */
/* 上下浮动动画 */
@keyframes float {
  0% {
    transform: translateY(5px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(5px);
  }
}

.float-animation {
  animation: float 5s ease-in-out infinite;
}


/* 变大变小动画 */
@keyframes scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.scale-animation {
  animation: scale 3s ease-in-out infinite;
}



/* 一些小玩意 */
/* 回到顶部按钮的样式 */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: auto;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  animation: floatUpAndDown 3s ease-in-out infinite;
  animation-play-state: paused;
}

/* 显示时的状态 */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
  animation-play-state: running;
}

@keyframes floatUpAndDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

/* 整个滚动条 */
::-webkit-scrollbar {
width: 12px; /* 竖向滚动条宽度 */
height: 12px; /* 横向滚动条高度（如果需要） */
}

/* 滚动条的轨道 */
::-webkit-scrollbar-track {
background: #ddf9c7;
border-radius: 10px;
}

/* 滚动条的滑块（你拖动的部分） */
::-webkit-scrollbar-thumb {
background: #45b06cff; /* 和你的 .bg-hero 颜色一致 */
border-radius: 10px;
border: 2px solid #f1f1f1; /* 可选：滑块边缘留白效果 */
}

/* 滑块悬停时 */
::-webkit-scrollbar-thumb:hover {
background: #3a905c;
}


/* 移动端适配 */
/* 移动端适配 */
/* 移动端适配 */
@media (max-width: 992px) {
  .section-box {
      margin-left: 240px;
      width: calc(100% - 280px);
  }
}

@media (max-width: 768px) {
  .section-box {
      margin-left: 20px !important;
      margin-right: 20px;
      width: calc(100% - 40px);
      max-width: 100%;
      padding: 20px;
  }

  .section-line {
      display: none; /* 小屏可隐藏竖线 */
  }
}

@media (max-width: 768px) {
  .pdf-container {
      width: 90%;
      margin: 20px auto;
  }
}

@media (max-width: 768px) {
  .sticky-menu {
      left: 10px;
      width: 200px;
      top: 160px;
      font-size: 0.85em;
  }

  .sticky-menu ul li a {
      padding: 8px 10px;
      font-size: 0.8em;
  }

  /* 如果你想隐藏它 */
  /* .sticky-menu { display: none; } */
}

@media (max-width: 768px) {
  .image-container img {
      max-width: 100%;
  }
}

/* 响应式：小屏时堆叠 */
@media (max-width: 768px) {
  .image-grid-2 {
    flex-direction: column;
    align-items: center;
  }

  .image-grid-2 img {
    width: 100% !important; /* 小屏全宽 */
  }
}