/* Debug Log
2025.04.29 Yuanlin 增加了样式进行修正导航栏目
2025.04.30 Yuanlin 增加了样式修改了网站logo和icon
2025.05.01 Yuanlin 增加了样式进行回到主页设置
2025.05.02 Yuanlin 增加了样式进行修正底部footer样式
*/




/****************************** all *******************************/
li {
    list-style-type: none;
}


/*************************** navigation ***************************/
nav {
    width: 100%;
    position: fixed;
    z-index: 900;
    height: 8rem; /* 保持固定高度 */
    top: 0;
    left: 0;
    background-color: #fcfffe;
    justify-content: space-between;
    display: flex;
    /* 添加overflow visible让下拉菜单可以显示在导航栏外部 */
    overflow: visible;
}


a {
    text-decoration: none;
}

a.navbar-brand {
    height: 8rem;
    width: 20vw;
    display: flex;
    justify-content: center;
    margin: 0.5rem 1vw 0vw 3vw;
}

a.navbar-brand img {
    width: 70%;
    object-fit: contain;
    max-height: 7.2rem;
}

nav > .navbar {
    margin: 3rem 1vw;
    margin-right: 4vw;
    font-family: "Barlow Condensed";
    font-weight: 600;
    font-size: 2vw;
    position: relative;
    top: -0.9vw;
}

nav .nav-item {
    position: relative;
    float: left;
    margin: 0;
    margin-right: 3vw;
}

nav .nav-item > li {
    list-style-type: none;
    height: 1.8vw;
}

nav .nav-item > a {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #032d30;
    transition: color 0.15s linear;
    position: relative;
    /* 新增 */
}

nav .nav-item > a::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    /* 调整下划线的位置 */
    left: 0;
    width: 0;
    height: 0.35rem;
    /* 下划线高度 */
    background-color: #fea443;
    transition: width 0.3s ease;
}

nav .nav-item:hover > a::after {
    width: 100%;
}

.son {
    margin: 0;
    padding: 1rem 0;
    list-style: none;
    display: none;
    position: absolute;
    top: calc(100% + 1rem); /* 从导航栏底部下方开始 */
    left: 0;
    background-color: #fcfffe;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    text-align: left;
    border-radius: 0.5rem;
    z-index: 1000;
    /* 移除宽度限制，让内容决定宽度 */
    min-width: 20rem;
}

.son li {
    padding: 0.5rem 2rem;
    width: auto; /* 移除固定宽度 */
    line-height: 2.5rem;
}

.son li a {
    color: #032d30;
    text-decoration: none;
    transition: all 1s ease;
}

.son li a:hover {
    color: #fea453;
}

/************************* container *************************/
.page-container {
    background-color: #f6f6db;
    position: relative;
    justify-content: center;
    padding-top: max(8vw, 12rem);
    padding-bottom: 10rem;
}



.page-header {
    position: relative;
    background: transparent;
    height: 40vw; 
    overflow: hidden;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-mid {
    width: 100%; 
    height: 100%;
    z-index: 50;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-mid > img {
    max-height: 100%; /* 最大高度为容器高度 */
    max-width: 100%; /* 最大宽度为容器宽度 */
    height: auto;
    width: auto;
    z-index: 50;
    object-fit: contain; 
    display: block;
    margin: 0;
    padding: 0;
}
.page-name {
    font-family: "Barlow Condensed";
    font-size: 4vw;
    font-weight: 500;
    color: #032d30;
    position: absolute;
    top: 40%;
    left: 27%;
    z-index: 100;
}

.page-body {
    width: 100%;
    display: flex;
    margin-top: 10rem;
    justify-content: center;
    color: #032d30;
}

.left-nav {
    display: flex;
    flex-direction: column;
    gap: 1vh;
    
    height: fit-content;
    font-family: "Quicksand";
    position: sticky;
    top: 10rem;

    width: 16rem;

    padding: 1.5rem;
    
    margin-right: 3rem; 
}

.left-nav-title {
    font-family: "Barlow Condensed";

    margin-bottom: 0.6rem;

    text-align: left;

    font-size: 2.8rem;

    font-weight: bold;
}

.left-nav-item {
    font-family: "Quicksand";
    font-weight: 500;
    font-size: 1.2rem;
    text-align: left;
    cursor: pointer;
    margin-bottom: 0.4rem;
    position: relative;
    padding-left: 1.8rem;
    transition: all 0.3s ease;
}

.left-nav-item::before {
    content: '';
    position: absolute;
    left: 0rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 50%;
    transition: all 0.4s ease;
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.left-nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.58rem;
    top: calc(50% + 6px);
    width: 4px;
    height: calc(100% + 0.9rem);
    background-color: transparent;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    transform-origin: top;
    transform: scaleY(0);
}

/* 已阅读的标题和其后续标题都显示连接线 */
.left-nav-item.bright:not(:last-child)::after,
.left-nav-item.bright ~ .left-nav-item:not(:last-child)::after {
    background-color: #2E7D32;
    transform: scaleY(1);
}

.left-nav-item.bright {
    color: #2E7D32;
}

.left-nav-item.bright::before {
    background-color: #2E7D32;
    transform: translateY(-50%) scale(1.2);
    border-color: #e8f5e8;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* 移除旧的线条动画和连接线样式 */


.bright {
    color: #01de9b;
}

.sub-nav {
    display: none;
    flex-direction: column;
    height: 0;
    opacity: 0;
    transition: opacity 0.6s ease, height 0.6s ease;
}

.unfold {
    opacity: 1;
    height: fit-content;
}

.sub-item {
    font-size: 1.6rem;
}

.right-text {
     max-width: 72rem;   
    width: 100%;
    padding: 0 2.5rem;   /* 加左右内边距，防止贴边 */
}


.main-text {
    max-width: 72rem;          
    margin: 4rem auto;          
    padding: 2rem 3rem;          /* 增加左右内边距 */
    background: #fcfffe;        
    border-radius: 1.2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.references {
    border-radius: 1.2rem;
    background: #fcfffe;
    padding: 2rem 3rem;
    margin: 4rem auto 0 auto;
    max-width: 80rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    font-size: 0.5rem;
    line-height: 1.5;
    font-family: "Quicksand";
    color: #444;

}
.references .text-content-h1 {
    padding-left: 2rem;  /* 给标题本身加左内边距 */
    font-size: 2rem;       /* 稍微比正文小一点，但依然醒目 */
    color: #e2a216;        /* 也可以换成稍深的绿色 */
}


.text-content-h1 {
    text-align: left;
    margin-top: 1.8rem;
    margin-bottom: 1.8rem;
    font-size: 2rem;
    color: #e2a216;
    font-family: "Quicksand";
    font-weight: bold;

}

.text-content-h4 {
    text-align: left;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;


    font-size: 1.8rem;

    font-family: "Quicksand";
    font-weight: bold;
}

.text-content-h5 {
    margin-top: 1rem;
    margin-bottom: 1rem;

    
    font-size: 1.6rem;

    font-family: "Quicksand";
    font-weight: bold;
}

.text-content-p {

    margin: 1.2rem 0;

    text-align: justify;
    font-family: "Quicksand";
    font-weight: 400;

    font-size: 1.3rem;

    line-height: 1.6;
}

.text-content-p a,
.text-content-p a:hover,
.text-content-p a:visited,
.text-content-p a:active {
    color: #01de9b;
}

/* 表格部分 */
.text-content .text-content-table {
    width: 100%;
    font-family: "Quicksand";

    /* ↓ 缩小字体，从1.8rem → 1.4rem */
    font-size: 1.4rem;

    color: #032d30;
    border-collapse: collapse;

    /* ↓ 表格行高增加，更清晰 */
    line-height: 1.5;
}

.text-content .text-content-table table {
    width: 100%;
}

.text-content .text-content-table th,
.text-content .text-content-table td {

    padding: 0.8rem;
    border: 0.1rem solid #ddd;
    text-align: left;
}

.text-content .text-content-table th {
    background-color: #f4f4f4;
}

.text-content .text-content-table td {
    width: auto;
    transition: all 0.3s ease;
}

.text-content .text-content-table td:hover {
    background-color: #dbeee8;
}

/* 图片容器 */
.text-img-container {
    text-align: center;

    margin: 2rem 4rem;
}
.text-img {
    width: 60%;         /* 比原来 70% 更宽，但在容器内部居中 */
    max-width: 100%;    /* 防止撑破容器 */
    height: auto;
}


.text-callout {
    background-color: #9ae6d8;
    border: #01de98;
    font-family: Quicksand;
    font-size: 1.8rem;
    line-height: 2.5rem;
    border-radius: 10px;
    padding: 2rem 4rem;
    position: relative;
}

.text-callout .text-content-ques {
    font-weight: 500;
}

.text-callout .text-content-ans {
    list-style: disc;
}

.text-callout .ihp-click {
    color: #fff;
    bottom: 35%;
    font-size: 1.2vw;
}

.text-detail-brief {
    background-color: #01de98;
    color: #fff;
    margin-top: 3%;
}

.text-content .ihp-text-detail {
    background-color: #dbeee8;
    display: none;
    padding: 2rem 4rem;
    border-radius: 10px;
    height: fit-content;
}

/* .text-img:hover {
    box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
  } */

.references  {
    padding-left: 2rem;
    font-family: Quicksand;
    font-size: 1rem;
    text-indent: -2rem;
    color: #032d30;
    line-height: 2.5rem;
}
.references ul li {
    padding-left: 2rem;
    font-family: Quicksand;
    font-size: 1.1rem;
    text-indent: -2rem;
    color: #032d30;
    line-height: 2.5rem;
}

.figure-caption {
    color: #81ab9d;
    font-size: 1.2rem;
    margin: 1rem 0;
    text-align: center;
}

.four-imgs-container {
    display: grid;
    /* 启用Grid布局 */
    grid-template-columns: repeat(2, 1fr);
    /* 创建两列，每列宽度相等 */
    grid-template-rows: repeat(2, 1fr);
    /* 创建两行，每行高度相等 */
    gap: 10px;
    /* 网格项之间的间隙 */
}

.four-imgs-item {
    width: 100%;
    /* 图片宽度占满网格单元格 */
    height: auto;
    /* 图片高度自适应 */
    object-fit: cover;
    /* 确保图片覆盖整个网格单元格 */
}

.back-to-top {
    position: fixed;
    bottom: min(10px, 3vw);
    right: min(20px, 3vw);
    z-index: 120;
}

.btt-bg {
    background-image: url("https://static.igem.wiki/teams/cug-china/static/backtotop-white.webp");
    background-position: 85px 163px;
    background-size: 145%;
    width: 70px;
    height: 70px;
    position: absolute;
    left: 130px;
    top: 115px;
    border-radius: 50%;
}

.btt-g-bg {
    width: 70px;
    height: 70px;
    background-color: #00c1a4;
    border-radius: 50%;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}

.btt-g-bg:hover {
    opacity: 1;
}

.btt-icon {
    z-index: 100;
    position: relative;
    width: 78px;
    left: -4px;
    top: -4px;
    cursor: pointer;
    /* color: #01de9b;
    color: #CDDED8; */
    border-radius: 50%;
}

/**********************  team-cards   *********************************/
/*footer*/
/* 让滚动图层悬浮在 footer 顶部，和 footer 上边缘对齐 */
.ft3 {
  position: relative; /* 保证 .ft2 绝对定位基准 */
  padding-top: calc(6rem); /* 为 .ft2 留出空间：原来 3rem 之上再加图层高度 */
  background: url("https://static.igem.wiki/teams/5665/static/footer-bg.webp") no-repeat center;
  background-size: cover;
  color: #fcfffe;
  font-family: "Quicksand", sans-serif;
  font-size: 1.4rem;
  overflow: hidden;
}

/* 滚动图层固定在顶部 */
.ft2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.0vw; /* 根据视觉调整高度，可以改大或小 */
  background-color: #ffffff;
  overflow: hidden;
  z-index: 105;
  display: flex;
  align-items: flex-start; /* 确保图片顶部对齐 */
}

/* 图像清晰与平滑优化 */
.ft2 img {
  width: 120%;
  position: absolute;
  left: -20%;
  top: 3px;
  display: block;
  image-rendering: auto;
  backface-visibility: hidden;
  will-change: transform;
}

/* 动画保持 */
.ft2 img:nth-child(1) {
  animation: slide 3s infinite linear;
}
.ft2 img:nth-child(2) {
  animation: slide 4s infinite linear;
}
.ft2 img:nth-child(3) {
  animation: slide 5s infinite linear;
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(16.67%);
  }
}

/* 三栏容器 */
.footer-flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem;
}

/* 左 Logo 区 - 修改：上下两排放置且每列对齐 */
.leftlogo {
  flex: 1;
  min-width: 300px;
  padding: 0 1rem;
}
.universidad-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}
.logo {
  height: 120px;
  object-fit: contain;
  transition: filter 0.3s ease;
  margin: 0 auto;
}
.logo:hover {
  filter: grayscale(0%);
}
/* 左 Logo 区 - 第二行图片排列 */
.left-logo-n {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}
.left-logo-n .logo1 {
  height: 150px;
  object-fit: contain;
  margin: 0 auto;
}

/* 中间链接 - 修改为两栏布局 */
.middlelogo {
  flex: 1;
  min-width: 200px;
  text-align: left;
}
.footer-column-title {
  display: block;
  font-weight: bold;
  font-size: 1.6rem;
  color: #01de9b;
  margin-bottom: 1rem;
  position: relative;
  left: 50%; /* 将标题移动到容器50%位置 */
  transform: translateX(-50%); /* 再向左移动自身50%宽度 */
  width: fit-content; /* 使宽度适应内容 */
}
.middle-a-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 新增：两栏布局 */
  gap: 0.6rem 2rem; /* 新增：行列间距 */
  justify-content: center; /* 新增：居中 */
  text-align: left; /* 新增：文字左对齐 */
  max-width: 300px; /* 新增：控制宽度 */
  margin: 0 auto; /* 新增：居中 */
  padding-left: 1rem;
}
.middle-a-container a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s;
  white-space: nowrap; /* 新增：防止文字换行 */
}
.middle-a-container a:hover {
  color: #01de9b;
}

/* 右侧联系信息 - 修改：放大图标 */
.rightlogo {
  flex: 1;
  min-width: 250px;
}
.rightlogo div {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}
.pic, .picc {
  height: 28px; /* 修改：从24px放大到28px */
  width: 28px; /* 新增：保持宽高一致 */
  margin-right: 10px;
}
.contact-text {
  color: #ffffff;
  font-family: Montserrat, sans-serif;
  font-size: 1.2em;
}

/* 底部横线 */
.new1 {
  border: 0;
  height: 1px;
  background: #cccccc66;
  margin: 2rem 0;
}

/* 版权文字 */
.copyright-text {
  text-align: center;
  color: #e0e0e0;
  font-size: 1.2rem;
  line-height: 1.6;
  padding-bottom: 2rem;
  margin: 0;
}
.copyright-text a {
  color: #01de9b;
  text-decoration: none;
}
.copyright-text a:hover {
  text-decoration: underline;
}

/*members 界面样式
此部分想选用卡片翻页效果或沿用之前 待考虑 */

.team-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
  font-family: "Quicksand", sans-serif;
}

.team-main-title {
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 5rem;
  margin-bottom: 4rem;
}

.team-subtitle {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 4rem;
  margin-bottom: 2rem;
  font-family: "Barlow Condensed", sans-serif;
}

.card-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}

/* Flip Card */
.flip-card {
  background-color: transparent;
  width: 280px;
  height: 340px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
  background: #fefefe;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flip-card-front img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.flip-card-front h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

.flip-card-back {
  background: #def2f1;
  color: #333;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-card-back h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.flip-card-back p {
  font-size: 1.4rem;
  padding: 0 1rem;
}



/*loading界面 写在loading.html中了*/

