/* ! 此css文件仅用作字体、layout、footer及menu ! */

body { padding-top: 56px;
background-color: rgb(242, 242, 242);  
}

.left-aligned { margin-left: auto; }

/* ---------------------------菜单栏--------------------------- */
.bg-top {
  background: rgb(64, 81, 68) !important;
}

.nav-item {
  font-family: 'Prompt';
  font-size: 20px;
}

.dropdown-item {
  font-family: 'Prompt';
  font-size: 18px;
}

/* 页脚*/
.bg-dark {
  background-color: rgb(64, 81, 68) !important;
}

/* 标题部分（header） */
.bg-hero { 
  background-color: rgb(64, 81, 68); 
  position: relative;
  z-index: 1000;
  box-shadow: 0px 35px rgb(156, 60, 41);
}

.nav-link {
  color: white;
  font-weight: bold;
}

/* 父容器，作为定位的基准 */
.header-container {
  position: relative;
  width: 100%;
}

/* 图片样式，和之前保持一致 */
.header-container .header-image {
  width: 100%;
  height: auto;
  display: block; /* 避免图片下方产生空隙 */
}

/* 位于图片上层的标题样式 */
.header-container .header-title {
  position: absolute;
  bottom: 55px;
  left: 70px;
  color: white;
  text-shadow: 0px 6px rgb(156, 60, 41);
  font-family: 'Bowlby One', serif;
  font-size: 58pt;
  margin: 0; /* 清除 h1 默认的 margin，避免影响定位 */
}

/* 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; }
footer { z-index: 1000;}

/* -------------------------- 加载动画 -------------------------- */

/* 加载动画的总容器 (绿色背景) */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(64, 81, 68);
  z-index: 9999;
  display: flex;

   /* 将主轴改为垂直方向，让动画和进度条上下排列 */
  flex-direction: column; 

  justify-content: center;
  align-items: center;

  /* 为最后的淡出效果做准备 */
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

/* --- 进度条部分样式 --- */

/* 进度条整体区域 */
.progress-section {
  /* 与上方动画的间距为 20px */
  margin-top: -107px;
  margin-left: 20px;
  text-align: center;
}

/* 进度条边框 */
.progress-container {
  width: 180px;
  margin-left: -75px;
  height: 15px;
  border: 3px solid rgb(246, 241, 234, 0.9);
  background-color: transparent;
  padding: 2px; 
  box-sizing: border-box; 
}

/* 进度条填充物 */
#progress-bar-fill {
  width: 0%; /* 初始宽度为 0 */
  height: 100%;
  background-color: rgb(246, 241, 234);
  
  /* 让进度更新有平滑的过渡效果 */
  transition: width 0.5s ease;
}

/* 静态背景图层，放在最底层 */
#holder-1 {
  z-index: 1;
}
#holder-4 {
  z-index: 2; /* 在图层1之上 */
}

/* 动画视口，放在静态背景之上 */
.viewport {
  z-index: 5;
}

/* 图层5，确保它在最顶层 */
#holder-5 {
  z-index: 10;
}

/* 新增的图层6，确保它在最顶层 */
#holder-6 {
  z-index: 10;
}

/* 总容器 (定位基准) */
.images-container {
  position: relative;
  left: -40px;
  width: 200px; /* 作为所有元素的居中参考点 */
  height: 200px;
}

/* 通用的视口/遮罩样式 */
.viewport {
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 图2的专属视口 (尺寸可以自定义) */
#viewport-2 {
  width: 100vw;
  height: 90%;
  top: -5vh;
  left: calc(50% - 5px);
  /*border: 2px dashed rgba(255, 0, 0, 0.5) */
}

/* 图3的专属视口 (尺寸可以自定义) */
#viewport-3 {
  left: 6vw;
  width: 300%;
  height: 100vh;
}

/* --- 图片支架的样式 --- */
.image-holder {
  position: absolute;
  /* 使用 transform 来进行精确的初始居中 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 630px;
  width: 1120px;
}

.image-holder img {
  width: 100%;
  height: 100%;
}

/* --- 关键修改点 2：动画应用和关键帧 --- */
/* 将动画直接作用于 transform 属性，以获得更平滑的效果 */

#holder-2 {
  animation: move-vertical 6s linear infinite;
}
#holder-3 {
  animation: move-horizontal 6s linear infinite;
  margin-top: 8px;
}

/* 动画关键帧，基于 transform */
@keyframes move-vertical {
  0% {
    transform: translate(-50%, -50%); 
  }
  50% {
    transform: translate(-50%, 0%);
  }
  100% {
    transform: translate(-50%, 50%);
  }
}

@keyframes move-horizontal {
  0% {
    transform: translate(-93%, -50%);
  }
  100% {
    transform: translate(-3%, -50%);
  }
}

/* ----------- 左侧SVG绿色进度条 ----------- */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0.5vw;
  height: 100vh;
  z-index: 10000;
  pointer-events: none; /* 穿透鼠标事件，不会影响页面交互 */
  background-color: transparent;
}

#progress-rect {
  width: 100%;
  height: 0%;
  fill: rgb(64, 81, 68);
  transition: height 0.2s linear;
}


/* -------------------------- 内容框架 -------------------------- */

.main-content-with-sidebar {
    padding-left: 25vw;
    box-sizing: border-box;
}

.content-container {
    background-color: rgb(246, 241, 234);      /* 背景为白色 */
    margin-top: 95px;
    border-radius: 20px;          /* 创建圆角效果 */
    padding: 50px;                /* 在容器内部添加内边距，让内容和边框有距离感 */
    box-shadow: 0 6px 8px rgba(0,0,0,0.6); /* (可选) 添加阴影，增加立体感 */
    margin-right: 5vw;            /* 右侧边栏的宽度 */
}

.content-section {
    padding-top: 20px;
    margin-bottom: 15px;
}


.content-container h1 {
font-family: 'Prompt bold', serif;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 36.6pt;
  text-align: center;
  z-index: 1;
  color: #395541;
}

.content-container h2 {
font-family: 'Prompt bold', serif;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 35.6pt;
  color: #9c3c29;
  z-index: 1;
}

.content-container h3 {
font-family: 'Prompt', serif;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size:23pt;
  color: #9c3d2a;
  z-index: 1;
}

.content-container h4 {
font-family: 'Prompt', serif;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 16.7pt;
  z-index: 1;
}

.content-container h5 {
font-family: 'Prompt', serif;    
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 16.7pt;
  z-index: 1;
}

.content-container h6 {
font-family: 'Prompt', serif;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 16.7pt;
  z-index: 1;
}

.content-container p, .content-container li {
  font-family: 'Proza Libre', serif;
  text-align: justify;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 14.7pt;
  z-index: 1;
}

.content-container code {
  font-family: 'Proza Libre', serif;
  color: #000100;
  font-size: 14.7pt;
  font-weight: bold;
}

/* 标题下方灰色方块阴影效果 */

.content-container h1 {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  
  /* 基础设置 */
  display: inline;
  padding-bottom: 3px;

  background-image: linear-gradient(to bottom, rgba(128, 128, 128, 0.5), rgba(128, 128, 128, 0.5));
  background-position: 5px 74%; /* 定位在文本底部 */
  background-size: 100% 25px; /* 下划线厚度为2px */
  background-repeat: no-repeat;
}

/* 文本下方阴影 */

.content-container .text-shadow-block,
.content-container h4 {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  
  /* 基础设置 */
  display: inline;
  padding-bottom: 3px;

  background-image: linear-gradient(to bottom, rgba(128, 128, 128, 0.5), rgba(128, 128, 128, 0.5));
  background-position: 5px 74%; /* 定位在文本底部 */
  background-size: 100% 10px; /* 下划线厚度为2px */
  background-repeat: no-repeat;
}


/* 灰色圆角文本框 */
.content-container .text {
  position: relative;
  background-color: #9ca39c6c;
  padding: 5px 10px 5px 50px;
  border-radius: 10px;
  font-size: 14.7pt;
}

/* 文本框式有序列表样式 */
.content-container ol.text-box{
  list-style: none; /* 隐藏默认序号 */
  counter-reset: item; /* 初始化计数器 */
  padding-left: 0; 
}

.content-container ol.text-box li{
  counter-increment: item;
  position: relative;
  background-color: #9ca39c6c;
  padding: 5px 10px 5px 50px;
  border-radius: 10px;
  font-size: 14.7pt;

}

.content-container ol.text-box li::before {
  content: counter(item) ".";
  position: absolute;
  left: 22px;
  top: 6px;
  width: 40px;
  height: 100%;
  font-size: 23.7pt;
  font-family: 'Prompt', serif;
  font-weight: bolder;
  z-index: 1;
}

.content-container ol.text-box li span.number-shadow {
  position: absolute;
  left: 17px;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: #bcb3a0;
  border-radius: 50%;
  z-index: 0;       /* 确保阴影在文字下方 */
}


/* 文本框式无序列表样式 */
.content-container ul.text-box{
  list-style: none; /* 隐藏默认序号 */
  padding-left: 0; 
}

.content-container ul.text-box li{
  position: relative;
  background-color: #9ca39c6c;
  padding: 5px 10px 5px 50px;
  border-radius: 10px;
  font-size: 14.7pt;

}

.content-container ul.text-box li::before {
  content: attr(data-letter);
  position: absolute;
  left: 24px;
  top: 6px;
  width: 40px;
  height: 100%;
  font-size: 23.7pt;
  font-family: 'Prompt', serif;
  font-weight: bolder;
  z-index: 1;
}

.content-container ul.text-box li span.number-shadow {
  position: absolute;
  left: 17px;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: #bcb3a0;
  border-radius: 50%;
  z-index: 0;  /* 确保阴影在文字下方 */
}


/* 公式式无序列表排样式 */
.content-container ul.formula-list{
  list-style: none; /* 隐藏默认序号 */
  margin: 0;
  padding-left: 0; 
}

.content-container ul.formula-list li{
  position: relative;
  display: flex;
}

.content-container ul.formula-list .item_1 {
  width: 35vw;
  padding-left: 10px;
  background-color: #9ca39c90;
  border-radius: 10px;
}

.content-container ul.formula-list .item_2 {
  width: 65vw;
  padding-left: 10px;
  background-color: #bdc5c690;
  border-radius: 10px;
  margin-left: 10px;
}

/* 链接文字变为红色 */
a {
    color: #9c3c29;
}


/* ------------------ 图片 ----------------- */

.content-container img {
  object-fit: contain;
  max-width: 85%;
  max-height: 75vh;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 10px;
}

.content-container img:not(.latex) {
  border: 1px solid rgb(64, 81, 68);
}

/* --- 图片标题样式 --- */
.content-container .image-title {
  font-family: 'Prompt', serif;
  font-weight: bold; 
  text-align: center; 
  font-size: 10.7pt;  
  margin-bottom: 12px;
}

/* --- 图片注解样式 --- */
.content-container .image-caption {
  font-family: 'Prompt', serif;
  display: block;      
  font-style: italic;
  font-size: 12.7pt;
  color: #555;        /* 使用深灰色文字，与正文区分开 */
  margin-bottom: 24px; /* 与下方内容的间距 */
}

/* ------------------ 表格 ----------------- */

.content-container table {
  width: 100%;
  border-collapse: collapse; 
  margin: 20px 0; 
  font-family:'Prompt', sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.content-container th,
.content-container td {
  border: 1px solid rgb(64, 81, 68);
  padding: 12px 15px; 
  text-align: left;
  vertical-align: middle;
}

.content-container th {
  background-color: rgb(64, 81, 68);
  color: #ffffff; 
  font-weight: bold;
}

.content-container tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

/* -------------------------- 侧边栏 -------------------------- */

/* 1. 侧边栏容器 */
.slide-in-nav {
    position: fixed;
    top: 18vh;
    left: 0;
    width: 24vw;
    min-width: 120px;
    z-index: 100;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out; 
}

.hide-side-bar .slide-in-nav,
.slide-in-nav.hide-side-bar {
    display: none !important;
}

.slide-in-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.slide-in-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* 2. 菜单列表项 li */
.slide-in-nav li {
    pointer-events: auto; 
}

.slide-in-nav a {
    display: block;
    position: relative;
    color: #D2A79E;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-size: 1.4vw;
    margin-left: 2vw;
    transition: color 0.3s ease, font-size 0.3s ease;
}

.main-nav-item > a {
    line-height: 120%;
  }

.main-nav-item.is-active > a { 
    color: #9C3C29;
    font-size: calc(1.4vw + 2pt);
}

.main-nav-item > a:hover {
    color: #9C3C29;
}


@media (max-width: 768px) {
    .main-content-with-sidebar {
        padding-left: 50px; /* 小屏幕上减少主内容的偏移 */
    }
    .slide-in-nav {
        transform: translateX(-100%); /* 小屏幕上完全隐藏 */
    }
    .slide-in-nav.is-active {
        transform: translateX(-20%); /* 小屏幕上滑入后也只显示一部分 */
    }
}

/* ---  子菜单容器的样式 --- */
.sub-menu {
  list-style: none;
  padding-left: 20px;
  margin: 0;
  color: #D2A79E;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

/* --- 2. 展开子菜单的样式 --- */
.main-nav-item.is-active .sub-menu {
  max-height: 500px;
}

/* --- 3. 子菜单链接的样式 --- */
.sub-menu a {
  display: block;
  position: relative;
  color: #D2A79E;
  text-decoration: none;
  font-family: 'Prompt', sans-serif;
  font-size: 1.2vw;
  margin-left: 3vw;
  line-height: 120%;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* --- 4. 子菜单的激活与悬停样式 (同之前的规则) --- */
.sub-menu-item.is-active a {
  color: #9C3C29;
  font-size: calc(1.2vw + 2pt);
}

.sub-menu-item a:hover {
  color: #9C3C29;
}

/* ------------- 所有字体 ------------- */


@font-face {
  font-family: 'Noto Serif SC'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/noto-serif-sc.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Arial'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/arial.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Segoe UI Black'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/segoe-ul-black.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Maiandra GD'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/maiandra-gd.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'ShowcardGothic'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/showcardgothic.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MISANs'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/misans-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Times New Roman'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/times-new-roman.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Prompt Bold'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/prompt-bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* 正文字体 */
@font-face {
  font-family: 'Calistoga'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/calistoga.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto Slab'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/robotoslab-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Prompt'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/prompt-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Proza Libre'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/prozalibre-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Cascadia Code'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/cascadiacode-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


/* 章节标题 */
@font-face {
  font-family: 'Bowlby One'; 
  src: url('https://static.igem.wiki/teams/5846/wiki/all-fonts/bowlby-one.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


/* ! 此css文件仅用作字体、layout、footer及menu ! */
