/* Home页面专用样式 */

/* Home Banner */
.s2_div {
  background-image: url('https://static.igem.wiki/teams/5721/img/home-bg-xia.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 987px;
  padding: 0 !important;
  margin: 0 !important;
}

.s2_2_div {
  width: 100%;
  height: 368px;
  background: linear-gradient(82deg, #90B3C8 0%, #A87779 100%);
  box-shadow: 0px 6px 21px 3px rgba(0,0,0,0.35);
}

.s3_div {
  background-image: url('https://static.igem.wiki/teams/5721/img/home-juxing1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 639px;
  padding: 0 !important;
  margin: 0 !important;
}

.s3_2_div {
  width: 662px;
  height: 85px;
  font-family: Arial;
  font-weight: bold;
  font-size: 40px;
  color: #333333;
}

.s4_div {
  background-image: url('https://static.igem.wiki/teams/5721/img/home-s4-juxing.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 434px;
  position: relative;
  width: 80%;
  margin: 0 auto;
  top: 3%;
}

/* 海洋清理队标题样式 */
.ocean-cleanup-title {
  padding-left: 110px;
  padding-right: 40px;
  height: 219px;
}

.ocean-cleanup-title h1 {
  display: block;
  margin-top: 90px;
  font-family: Arial-BoldMT;
  font-weight: bold;
  font-size: 40px;
  color: #FFFFFF;
  text-align: left;
  margin-bottom: 0;
}

.ocean-cleanup-description {
  display: block;
  margin-top: 30px;
  font-size: 22px;
  font-family: ArialMT;
  color: #FFFFFF;
  line-height: 1.4;
}

/* 彩色鱼图片容器 */
.color-fish-container {
  position: absolute;
  top: 175px;
  width: 300px;
  height: 100px;
  right: -1%;
}

.color-fish-container img {
  max-height: 100%;
  width: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .s4_div {
    width: 95%;
    top: 1%;
  }

  .ocean-cleanup-title {
    padding-left: 20px;
    padding-right: 20px;
    height: auto;
  }

  .ocean-cleanup-title h1 {
    font-size: 32px;
    margin-top: 40px;
  }

  .ocean-cleanup-description {
    font-size: 18px;
    margin-top: 20px;
  }

  .color-fish-container {
    position: relative;
    top: 20px;
    width: 200px;
    height: 80px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 576px) {
  .ocean-cleanup-title h1 {
    font-size: 28px;
    margin-top: 30px;
  }

  .ocean-cleanup-description {
    font-size: 16px;
    margin-top: 15px;
  }

  .color-fish-container {
    width: 150px;
    height: 60px;
  }
}

/* 圆形轮播样式 */
.circular-carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: translateX(-150px);
}

/* 强制覆盖所有可能的CSS规则 */
.circular-carousel-container .carousel-item {
    position: absolute !important;
    bottom: 0 !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

/* 调试：确保所有轮播项都有正确的定位 */
.circular-carousel-container .carousel-item[data-index] {
    position: absolute !important;
}

/* 强制覆盖所有可能的CSS规则 - 最高优先级 */
.circular-carousel-container .carousel-item,
.circular-carousel-container .carousel-item[data-index="0"],
.circular-carousel-container .carousel-item[data-index="1"],
.circular-carousel-container .carousel-item[data-index="2"],
.circular-carousel-container .carousel-item.active,
.circular-carousel-container .carousel-item.left-item,
.circular-carousel-container .carousel-item.center-item,
.circular-carousel-container .carousel-item.right-item {
    position: absolute !important;
}

.circular-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}


/* 左侧图片 */
.circular-carousel-container .carousel-item.left-item {
    position: absolute !important;
    left: 10% !important;
    right: auto !important;
    width: 25% !important;
    height: 60% !important;
    z-index: 1 !important;
    transform: translateY(10px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
}

/* 中间图片（激活状态） */
.circular-carousel-container .carousel-item.center-item.active {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    width: 35% !important;
    height: calc(80% + 20px) !important;
    z-index: 3 !important;
    transform: translateX(-50%) translateY(-4.5cm) translateY(-40px) !important;
}

/* 右侧图片 */
.circular-carousel-container .carousel-item.right-item {
    position: absolute !important;
    left: 65% !important;
    right: auto !important;
    width: 25% !important;
    height: 60% !important;
    z-index: 1 !important;
    transform: translateY(10px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.carousel-item:hover .carousel-img {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

/* 非激活状态的图片稍微透明 */
.carousel-item:not(.active) {
    opacity: 0.7;
}

.carousel-item:not(.active):hover {
    opacity: 0.9;
}

/* 轮播控制箭头 */
.carousel-arrow {
    position: absolute;
    width: 84px;
    height: 70px;
    z-index: 10;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.carousel-arrow-left {
    left: 17%;
    top: 52%;
    background-image: url('https://static.igem.wiki/teams/5721/img/home-left-arrow.webp');
}

.carousel-arrow-right {
    left: 81%;
    top: 52%;
    background-image: url('https://static.igem.wiki/teams/5721/img/home-right-arrow.webp');
}

/* 轮播指示点 */
.carousel-dots {
    position: absolute;
    width: 75px;
    height: 11.9px;
    margin-top: 30%;
    margin-left: 63%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-dot {
    width: 11.9px;
    height: 11.9px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background-color: #999;
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: #333;
    transform: scale(1.3);
}

/* Home页面响应式适配 */
@media (max-width: 1200px) {
    .s2_div {
        height: 800px;
    }

    .s2_2_div {
        height: 300px;
    }

    .s3_div {
        height: 550px;
    }

    .s4_div {
        height: 350px;
    }

    .s3_2_div {
        width: 500px;
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .s2_div {
        height: 700px;
    }

    .s2_2_div {
        height: 250px;
    }

    .s3_div {
        height: 500px;
    }

    .s4_div {
        height: 300px;
    }

    .s3_2_div {
        width: 400px;
        font-size: 28px;
    }

    /* 圆形轮播区域适配 */
    .circular-carousel-container {
        height: 500px;
    }

    .carousel-item[data-index="0"],
    .carousel-item[data-index="2"] {
        position: absolute !important;
        width: 20% !important;
        height: 50% !important;
        transform: translateY(10px) !important;
    }

    .carousel-item.active {
        position: absolute !important;
        width: 50% !important;
        height: 70% !important;
    }
}

@media (max-width: 768px) {
    .s2_div {
        height: 600px;
    }

    .s2_2_div {
        height: 200px;
    }

    .s3_div {
        height: 450px;
    }

    .s4_div {
        height: 250px;
    }

    .s3_2_div {
        width: 300px;
        font-size: 24px;
    }

    /* 圆形轮播区域适配 */
    .circular-carousel-container {
        height: 400px;
    }

    .carousel-item[data-index="0"],
    .carousel-item[data-index="2"] {
        position: absolute !important;
        width: 15% !important;
        height: 40% !important;
        transform: translateY(10px) !important;
    }

    .carousel-item.active {
        position: absolute !important;
        width: 60% !important;
        height: 60% !important;
    }

    /* 项目目标卡片适配 */
    .project-goals-container {
        flex-direction: column;
        align-items: center;
    }

    .project-goals-container > div {
        width: 90% !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .s2_div {
        height: 500px;
    }

    .s2_2_div {
        height: 150px;
    }

    .s3_div {
        height: 400px;
    }

    .s4_div {
        height: 200px;
    }

    .s3_2_div {
        width: 250px;
        font-size: 20px;
    }

    /* 圆形轮播区域适配 */
    .circular-carousel-container {
        height: 350px;
    }

    .carousel-item[data-index="0"],
    .carousel-item[data-index="2"] {
        position: absolute !important;
        width: 10% !important;
        height: 30% !important;
        transform: translateY(10px) !important;
    }

    .carousel-item.active {
        position: absolute !important;
        width: 70% !important;
        height: 50% !important;
    }

    /* 文字大小适配 */
    .s2_2_div span {
        font-size: 50px !important;
    }

    .s4_div span {
        font-size: 30px !important;
    }

    .s4_div span:last-child {
        font-size: 18px !important;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .s2_2_div span,
    .s4_div span {
        color: #FDFBFB !important;
    }

    .s2_div,
    .s3_div,
    .s4_div {
        filter: brightness(0.8) contrast(1.1);
    }

    .s2_2_div {
        background: linear-gradient(82deg, #6a8fa8 0%, #8a5d5f 100%);
    }

    .s3_2_div,
    .s3_3_div span,
    .s5_div_cards span {
        color: #6e6969 !important;
    }

    /* 轮播图片深色模式 */
    .carousel-img {
        filter: brightness(0.9);
    }

    /* 项目目标卡片深色模式 */
    .project-goals-container > div {
        filter: brightness(0.8);
    }
}
