/*Global fonts configuration*/
@font-face {
    font-family: "font-header";
    src: url("https://static.igem.wiki/teams/5323/fonts/Baloo2-VariableFont_wght.woff2");
}

@font-face {
    font-family: "font-title";
    src: url("https://static.igem.wiki/teams/5323/fonts/Baloo2-SemiBold.woff2");
}

@font-face {
    font-family: "font-content";
    src: url("https://static.igem.wiki/teams/5323/fonts/Junge-Regular.woff2");
}

@font-face {
    font-family: "font-small";
    src: url("https://static.igem.wiki/teams/5323/fonts/NotoSerif-Italic-VariableFont.woff2");
}

.nav,.sidenav, .header{
    font-family: "font-header",sans-serif;
}

.content h1, h2, h3, h4{
    font-family: "font-title",serif;
}

.content p{
    font-family: "font-content", 'Times New Roman', Times, serif;
}

small {
    font-family: "font-small",serif;
    font-size: 80%;
}

figcaption {
    font-family: "font-small",serif;
    font-size: 50%;
}

/*CSS全局设置*/
*{
    margin:0;
    padding:0;
 }
 .nav{
    font-size: large;
    background-color:#F4D8AE;
    height:3em;
    width:100%;
    margin:0 auto;
 }
 /*横向一级菜单样式设置*/
 ul{
    list-style:none;
 }
 ul li{
    float:left;
    line-height:40px;
    text-align:center;
    position:relative;
 }
 a{
     text-decoration:none;
     color:#22b6d7;
     display:block;/*将a行内元素转变成块级元素*/
     width:90px;
     height:40px;
 }
 a:hover{
     background-color:#F4D8AE;
     color:#f9648b;
 }
 /*二级下拉菜单样式设置*/
ul li ul li {
    float: none; /* 取消浮动，使其垂直排列 */
    display: flex; /* 启用 flexbox 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    background-color: rgba(240, 237, 233, 0.8);
    border: 2px solid #fc98b2ed; /* 设置边框的宽度、样式和颜色 */
}

ul li ul li a {
    font-size: 20px;
    text-align: center; /* 确保文本在链接内居中 */
    width: 100%; /* 确保链接占据整个菜单项的宽度 */
    padding: 0px 0; /* 适当调整内边距 */
}

 ul li ul {
    font-size: 18px;
    position: absolute;
    top: 40px; /* 保持二级菜单在一级菜单下方 */
    left: 50%; /* 将二级菜单的左边缘对齐到一级菜单的中心 */
    transform: translateX(-50%); /* 将二级菜单向左移动其宽度的一半，实现居中 */
    display: none; /* 默认隐藏二级菜单 */
    width: 180px; /* 设置二级菜单的宽度 */
}

 /*为了兼容IE7写的CSS样式，但是必须写在a:hover前面*/
 ul li ul li a:link,ul li ul li a:visited{
     background-color:#f0ede900;
     /* background-color: rgba(84, 33, 152, 0); */
 }
 /* ul li ul li a:hover{
     /* background-color:#009933; */
 /* } */ 
 /*鼠标滑过一级菜单的元素时显示下拉菜单*/
 ul li:hover ul{
     display:block;
 }
 p {
    text-indent: 2em;
 }

 .content img { 
    margin: auto;
 }

 /* Table cofiguration */
 table {
    width: 800px;
    margin: auto;
    border-collapse: collapse;
 }
 table td {
    border: 1px solid black;
    padding: 8px;
  }

/* Images in content configuration */
.content img {
    display: flex;
}
.project-details img {
    text-align: center;
    max-width: 800px;
}
figcaption {
    text-align: center;
}