
/* ===== Description Page Styles ===== */

/* 防止横向滚动条 */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* 拉丁学名斜体样式 */
.scientific-name,
i[class*="scientific"],
i[class*="latin"] {
  font-style: italic;
}

/* 拉丁学名斜体样式 - 通过JavaScript动态添加 */
.latin-name {
  font-style: italic !important;
  color: inherit;
}

/* 化学式下标和上标样式 */
sub {
  font-size: 0.75em;
  vertical-align: sub;
  line-height: 0;
}

sup {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

/* 重置容器padding */
.container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 中间分割线 */
.desc-middle-divider {
  position: relative;
  width: 1px;
  margin-top: 10px;
}

.desc-middle-image {
  position: relative;
  width: 1px;
  height: 15550px;
}

/* 第一部分：图片背景和标题 */
.desc-section-one {
  height: 502px;
  background-image: url('https://static.igem.wiki/teams/5736/img/desc/p1-banner-bg.webp');
  background-size: 100% auto;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desc-section-one-title {
  color: #FFFFFE;
  font-size: 107px;
  font-weight: 900;
  text-align: center;
  margin: 0;
  font-family: Arial, sans-serif;
  margin-top: 10px;
  white-space: nowrap;
  width: auto;
  height: auto;
}

/* 响应式适配 */
@media (max-width: 1200px) {
  .desc-section-one-title {
    font-size: 80px;
  }
}

@media (max-width: 900px) {
  .desc-section-one-title {
    font-size: 60px;
  }
}

@media (max-width: 768px) {
  .desc-section-one-title {
    font-size: 45px;
  }
}

@media (max-width: 600px) {
  .desc-section-one-title {
    font-size: 35px;
  }
}

@media (max-width: 480px) {
  .desc-section-one-title {
    font-size: 28px;
  }
}

.section-one-left-image {
  position: relative;
  margin-left: -190px;
  margin-top: -3%;
  width: 148px;
  height: 100px;
  flex-shrink: 0;
}

.section-one-right-image {
  position: relative;
  margin-left: 102%;
  margin-top: -16%;
  width: 55px;
  height: 116px;
  flex-shrink: 0;
}

/* 第二部分：左右分栏布局 */
.desc-section-two {
  padding: 0px 0;
  background-color: #ffffff;
  margin-left: -16px;
  margin-top: -30px;
  margin-bottom: 100px;
}

.desc-section-two-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: -6px;
  margin-left: 30%; /* 为固定导航栏留出空间，比导航栏宽度稍大一些 */
  position: relative;
}

/* 从flex布局中移除导航栏 - 使用更具体的选择器 */
.desc-section-two .desc-section-two-container .desc-section-two-left {
  position: fixed;
  z-index: 1000;
  transform: none;
  width: 25%;
  min-width: 440px;
  max-width: 520px;
  height: auto;
  min-height: 482px;
  margin: 0;
  padding: 0;
  flex: none;
  order: -1;
  /* 确保完全脱离文档流 */
  float: none;
  clear: none;
  display: block;
  right: calc(75% - 20px); /* 向右移动，靠近中间分割线 */
}

/* 导航栏基础样式 - 位置由JavaScript控制 */
.desc-section-two-left {
  position: fixed;
  z-index: 1000;
  transform: none;
  width: 25%;
  min-width: 440px;
  max-width: 520px;
  height: auto;
  min-height: 482px;
  margin: 0;
  margin-left: 110px;
  padding: 0;
  right: calc(75% - 20px); /* 向右移动，靠近中间分割线 */
}


.desc-left-nav {
  width: 100%;
  height: auto;
  min-height: 482px;
  background-image: url('https://static.igem.wiki/teams/5736/img/desc/p2-left-nav-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* 导航下部 */
.desc-left-nav-down {
  display: flex;
  padding: 20px;
  gap: 25px;
  margin-left: 30px;
  width: calc(100% - 50px);
}


.desc-left-nav-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: -50px;
  flex: 1;
  min-width: 0; /* 允许flex项目收缩 */
}

.desc-left-content-item {
  font-size: 20px;
  line-height: 1.3;
  font-family: Arial-BoldMT;
  text-decoration: none; /* 去除下划线 */
  color: #060606; /* 默认颜色 */
  display: block; /* 使链接表现为块级元素 */
  word-wrap: break-word; /* 允许长单词换行 */
  overflow-wrap: break-word; /* 现代浏览器的换行属性 */
}

/* Edge浏览器深色模式下的颜色 */
@supports (-ms-ime-align: auto) {
  @media (prefers-color-scheme: dark) {
    .desc-left-content-item {
      color: #9d9393;
    }
  }
}

/* 二级标题样式 - 更小的字号和间距 */
.desc-left-content-item.subtitle {
  font-size: 16px; /* 比主标题小4px */
  line-height: 1.2; /* 更紧凑的行高 */
  margin-top: 0px; /* 减少上边距 */
  margin-bottom: 0px; /* 减少下边距 */
  padding-left: 20px; /* 添加左边距表示层级 */
}

/* Edge浏览器深色模式下二级标题的颜色 */
@supports (-ms-ime-align: auto) {
  @media (prefers-color-scheme: dark) {
    .desc-left-content-item.subtitle {
      color: #9d9393;
    }
  }
}

/* 二级标题锚点偏移 - 向上偏移四行 */
#design1, #build1, #test1, #learn1,
#design2, #build2, #test2, #learn2,
#design3, #build3, #test3, #learn3 {
  scroll-margin-top: 100px; /* 向上偏移约4行的高度 */
}

/* 大黑点项目符号样式 */
.bullet-point {
  font-size: 28px; /* 比正常文字大一些 */
  color: #000; /* 纯黑色 */
  font-weight: bold; /* 加粗 */
  margin-right: 8px; /* 与文字间距 */
  position: relative; /* 相对定位 */
  top: 3px; /* 向下偏移3px */
}

.anchor {
  display: block;
  position: relative;
  top: -100px; /* 调整锚点位置，考虑固定导航栏的高度 */
  visibility: hidden;
  height: 0;
}

/* 激活状态的导航项 */
.desc-left-content-item.active {
  color: #939DF7 !important;
  font-weight: bold;
}

.desc-left-content-item:hover {
  color: #939DF7;
  transition: color 0.3s ease;
}

/* 右侧三个文字框 */
.desc-section-two-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.desc-right-text-box {
  width: 966px;
  height: auto;
  min-height: auto;
  padding: 30px;
  position: relative;
  margin-left: -80px;
  margin-top: -50px;
}

.desc-right-title-bg {
  background-image: url('https://static.igem.wiki/teams/5736/img/desc/p2-right-title-bg-2.webp');
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  width: 680px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 20px;
  margin-bottom: 20px;
  margin-left: 35px;
  margin-top: 20px;
}

.desc-right-title {
  color: #FCFCFC;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  font-family: Arial, sans-serif;
  width: auto;
  height: 17px;
  line-height: 17px;
  white-space: nowrap;
}

.desc-right-content {
  width: 91.5%;
  height: auto;
  min-height: auto;
  color: #000000;
  text-align: left;
  font-family: Arial;
  font-weight: 400;
  font-size: 16px;
  color: #212020;
  line-height: 26px;
  margin-left: 45px;
}

/* To Top Button */
.to-top-container {
  position: fixed;
  bottom: 100px;
  right: 45px;
  z-index: 10000;
}

.to-top-btn {
  width: 82px;
  height: 82px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.to-top-btn:hover {
  transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .desc-section-two-container {
    margin-left: 35%;
    gap: 20px;
  }

  .desc-section-two-left {
    width: 30%;
    min-width: 420px;
    max-width: 470px;
    right: calc(70% - 15px);
  }

  .desc-right-text-box {
    width: 100%;
    max-width: 800px;
    margin-left: 0;
    min-height: auto;
  }

  .desc-right-content {
    width: 100%;
    margin-left: 0;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .desc-section-two-container {
    flex-direction: column;
    margin-left: 0;
    padding: 0 20px;
  }

  .desc-section-two-left {
    position: relative;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  .desc-left-nav {
    width: 100%;
    height: auto;
    min-height: 200px;
  }

  .desc-middle-divider {
    display: none;
  }

  .desc-right-text-box {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    min-height: auto;
  }

  .desc-right-title-bg {
    margin-left: 0;
    width: 560px;
  }

  .desc-right-content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .desc-section-one-title {
    font-size: 40px;
  }

  .section-one-left-image,
  .section-one-right-image {
    display: none;
  }

  .desc-section-two-container {
    padding: 0 15px;
  }

  .desc-left-nav-down {
    flex-direction: column;
    gap: 10px;
    margin-left: 0;
    padding: 15px;
  }


  .desc-left-nav-content {
    margin-top: 0;
  }

  .desc-left-content-item {
    font-size: 18px;
  }

  .desc-right-text-box {
    padding: 20px;
  }

  .desc-right-title {
    font-size: 20px;
  }

  .desc-right-title-bg {
    width: 510px;
  }

  .desc-right-content {
    font-size: 14px;
    line-height: 22px;
  }
}

@media (max-width: 480px) {
  .desc-section-one-title {
    font-size: 32px;
  }

  .desc-section-two-container {
    padding: 0 10px;
  }

  .desc-right-text-box {
    padding: 15px;
  }

  .desc-right-title {
    font-size: 18px;
  }

  .desc-right-title-bg {
    width: 460px;
  }

  .desc-right-content {
    font-size: 13px;
    line-height: 20px;
  }

  .to-top-container {
    bottom: 80px;
    right: 20px;
  }

  .to-top-btn {
    width: 60px;
    height: 60px;
  }
}
