/* 基础样式重置 */
body {
margin: 0;
padding: 0;
height: 100%;
background-color:#8cb5e7;
}
#header {
width: 100%; /* 图片宽度为100% */
margin-top: 65px; /* 设置顶部外边距为68px */
height: auto; /* 保持图片的宽高比 */
}
/* 页面内容容器 */
.pagecontainer {
top: 100px;
display: flex;
width: 100%;
flex-direction: column; /* 使子元素垂直排列 */
background-image: url('https://static.igem.wiki/teams/5142/101/dt.jpg'); /* 设置背景图片 */
background-size: cover; /* 覆盖整个容器 */
background-position: center bottom; /* 背景图片底部居中 */
background-repeat: no-repeat; /* 不重复 */
background-attachment: fixed; /* 背景图片固定 */
}

/* 侧边栏样式 */
.sidebar {
position: fixed; /* 默认为固定位置 */
top: 100px; /* 初始位置为页面顶部20%的位置 */
bottom: 100px;
left: 1%;
width: 18vw;
height: 100vh;
overflow-x: hidden;
padding-left: 20px;
padding-right: 20px;
box-sizing: border-box;
transition: opacity 0.3s ease;
opacity: 0; /* 初始时设置为透明 */
}
.sidebar a {
/* 初始样式 */
display: block; /* 使链接填满整个容器 */
padding: 10px 0; /* 设置上下内边距 */
color: #fff; /* 设置文字颜色 */
font-size: 15px; /* 设置字体大小 */
text-decoration: none; /* 移除下划线 */
transition: all 0.3s ease; /* 平滑过渡效果 */
}

.sidebar a:hover {
/* 悬停时的样式 */
font-size: 20px; /* 文字变大 */
font-weight: bold;
color: #47d1ff; /* 文字变色 */
background-color: #ffffff; /* 背景块变色 */
}
.sidebar.fixed {
position: fixed;
top: 0;
}

.sidebar a.active {
font-size: 20px;
font-weight: bold;
color: #47d1ff;
background-color: #ffffff;
}

/* 主体内容区域 */
.content {
margin-top: 20px;
margin-left: 22vw; /* 调整边距，确保内容不会被遮挡 */
box-sizing: border-box;
width: 75vw; /* 设置宽度，确保内容区域不会太宽 */
max-width: 1200px; /* 设置最大宽度，防止内容溢出 */
flex-grow: 1; /* 允许内容区域填充剩余空间 */
}

/* 标题样式 */
.title2 {
text-align: center; /* 标题居中 */
font-size: 40px;
font-weight: bold;
font-size: 2em;
color: #fff;
}

.subsection {
margin-bottom: 20px;
padding: 5px 5px 20px 20px;
background-color: #fdf5ea;
border-radius: 15px;
}

h1 {
font-size: 1.25em;
margin-bottom: 10px;

}
h2 {
font-size: 1.5em;
font-weight: bold;
margin-bottom: 20px;
text-align: center;
}
.highlight {
font-weight: bold;
color: #0056b3;
}
#scrollbar {
position: fixed;
z-index: 9100;
top: 0;
left: 0;
width: 0; /* 初始宽度为0 */
height: 5px;
background-color: rgba(92, 122, 255, 0.897);
border-radius: 5px;
transition: width 0.1s; /* 平滑过渡效果 */
}
/* 导航栏容器 */
#nav {
top: 0;
left: 0;
z-index: 1000;
position: fixed;
margin: 0 auto;
width: 100%;
color: #ffffff;
}

.container{
width: 100%;
background: #8cb5e7;
}

.navbar-brand {
margin-left: 50px;
}

/* 菜单按钮样式 */
.menu-btn {
display: none;
cursor: pointer;
}

/* 菜单包裹样式 */
.menu-wrap {
display: flex;
justify-content: space-between;
align-items: center;
list-style: none;
}

/* 导航项样式 */
.nav-item {
position: relative;
}

.nav-item a {
display: block;
padding: 10px 10px;
text-decoration: none;
font-size: 25px;
color: #ffffff;
font-weight: bold;
}

#nav-biga:hover {
color: #84dcff;
background-color: #fff;
}

/* 下拉菜单样式 */
.nav-item ul {
display: flex; /* 使列表项水平排列 */
list-style-type: none;
flex-direction: column; /* 子菜单垂直排列 */
position: absolute; /* 绝对定位 */
left: 0; /* 放置在父元素的左侧 */
z-index: 1000; /* 确保在其他元素之上 */
background-color: #6dd5ed; /* 设置背景颜色 */
opacity: 0; /* 默认不可见 */
transition: opacity 0.1s ease; /* 平滑过渡效果 */
pointer-events: none; /* 默认不响应点击事件 */
padding: 0;
margin: 0;
width: 100%;
}

.nav-item:hover ul {
opacity: 1; /* 悬停时可见 */
pointer-events: all; /* 悬停时响应点击事件 */
}
.nav-item ul li {
display: flex;
justify-content: center; /* 水平居中 */
width: 100%; /* 使 li 撑满 ul 的宽度 */
}

.nav-item ul li a {
display: block; /* 使链接填满整个 li */
padding: 10px 0; /* 设置内边距，左右为0 */
color: #fff; /* 设置文字颜色 */
font-size: 15px; /* 设置字体大小 */
text-decoration: none; /* 移除下划线 */
transition: color 0.1s ease; /* 设置颜色变化的过渡效果 */
width: 100%; /* 使 a 元素撑满 li 的宽度 */
text-align: center; /* 文本居中 */
}

.nav-item ul li:hover {
background: #fff; /* 悬停时整个 li 背景变色 */
cursor: pointer;
}

.nav-item ul li:hover a {
color: #47d1ff; /* 悬停时链接文字变色 */
}


#nav>.container>.menu-wrap {
font-weight: 400;
font-size: 15px;
display: flex
}

/* Footer样式 */
.footer_area {
    width: 100%;
    box-sizing: border-box;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto; /* 自动填充到内容底部 */
    z-index: 2000; /* 确保在其他元素之上 */
    left: 0px;
    bottom: 0px;
}

.footer_container {
    display: flex;
    width: 100%;
    max-width: 100%;
}
.footer_text {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center; /* Center align text within the footer */
}
.footer_bottom {
    margin-top: 20px;
    width: 100%;
    max-width: 1200px; /* 根据实际需要调整 */
    text-align: center;
}

/* 图片样式 */
.flex-container {
    display: flex;
    justify-content: space-between;
}

.pic {
    max-width: 50%; /* 根据需要调整图片的最大宽度 */
    height: auto; /* 保持图片的宽高比 */
}

/* 容器样式 */
.flex-container2 {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    height: 400px; /* 限定容器的高度，根据需要调整 */
}

/* 图片样式 */
.pic2 {
    max-width: 50%; /* 根据需要调整图片的最大宽度 */
    max-height: 400px; /* 限定图片的最大高度，根据需要调整 */
    height: auto; /* 保持图片的宽高比 */
}
