/* Reset default margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Home Page Banner Section */
.home-banner {
  height: 613px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p1-banner-bg.webp');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 10px;
}

.home-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  padding: 0 20px;
  transform: translateX(-100px);
}

/* Left section */
.banner-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 122px;
  width: 122px;
  transform: translate(10px, 60px);
}

.left-image {
  height: 100%;
  width: auto;
  object-fit: contain;
  transform: translateY(-100px) translateX(40px);
}

/* Middle section */
.banner-middle {
  flex: 0 0 60%;
  height: 613px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p1-bg2.webp');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0 0px;
}

.middle-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 0px;
  margin-top: 150px;
  margin-left: 20px;
}

.text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  width: 768px;
  margin-left: 90px;
}

.main-title {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #020202;
  line-height: 1.4;
  margin: 0 0 20px 0;
  text-align: center;
}

.sub-title {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #939DF7;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.main-image {
  width: 311px;
  height: 383px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: -20px;
}

.bottom-images {
  position: absolute;
  bottom: -25px;
  left: 36%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  align-items: center;
}

.bottom-img1 {
  width: 139px;
  height: 100px;
  object-fit: contain;
}

.bottom-img2 {
  width: 76px;
  height: 73px;
  object-fit: contain;
  margin-left: 430px;
}

/* Right section */
.banner-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 20px;
  position: relative;
  min-width: 200px;
  transform: translateX(105px);
}

.small-image {
  width: 59px;
  height: 59px;
  object-fit: contain;
  transform: translateX(-200px) translateY(320px);
  transition: none;
  position: relative;
  z-index: 0;
}


/* Responsive design */
@media (max-width: 1400px) {
  .home-banner-content {
    max-width: 100%;
    padding: 0 15px;
  }

  .banner-middle {
    flex: 0 0 70%;
  }

  .main-title,
  .sub-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  }
}

@media (max-width: 1200px) {
  .home-banner-content {
    max-width: 100%;
    padding: 0 10px;
  }

  .banner-middle {
    flex: 0 0 65%;
    margin: 0 10px;
  }

  .main-title,
  .sub-title {
    font-size: 40px;
    line-height: 60px;
  }

  .main-image {
    width: 250px;
    height: 300px;
  }
}

@media (max-width: 900px) {
  .home-banner {
    height: 500px;
  }

  .banner-middle {
    height: 500px;
    flex: 0 0 70%;
  }

  .middle-content {
    flex-direction: column;
    padding: 20px;
  }

  .main-title,
  .sub-title {
    font-size: 32px;
    line-height: 50px;
    text-align: center;
  }

  .main-image {
    width: 200px;
    height: 250px;
    margin-top: 20px;
  }

  .bottom-images {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .home-banner {
    height: 400px;
  }

  .banner-middle {
    height: 400px;
    flex: 0 0 80%;
  }

  .main-title,
  .sub-title {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    line-height: 1.4;
  }

  .main-image {
    width: 150px;
    height: 180px;
  }

  .bottom-img1 {
    width: 100px;
    height: 70px;
  }

  .bottom-img2 {
    width: 60px;
    height: 55px;
  }

  .small-image {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 320px) {
  .home-banner {
    height: 350px;
  }

  .banner-middle {
    height: 350px;
    flex: 0 0 85%;
  }

  .main-title,
  .sub-title {
    font-size: clamp(1rem, 5vw, 1.2rem);
  }

  .main-image {
    width: 120px;
    height: 150px;
  }

  .bottom-img1 {
    width: 80px;
    height: 60px;
  }

  .bottom-img2 {
    width: 50px;
    height: 45px;
  }

  .small-image {
    width: 35px;
    height: 35px;
  }
}

/* Home Content Sections */
.home-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 0;
}

.content-section {
  width: 120%;
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

/* Part 1: Background Section */
.part1 {
  margin-top: 20px;
  margin-bottom: 30px;
  transform: translateX(-9px);
}

.part1-container {
  width: 70%;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.part1-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 38px;
  margin-top: 2px;
}

.title-section {
  display: flex;
  flex-direction: column;
}

.title-bg {
  width: 280px;
  height: 65px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p2-title-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #FCFCFC;
  margin: 0;
  text-align: center;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.section-title.animate {
  opacity: 1;
  transform: translateX(0);
}

.subtitle {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #010101;
  margin: 0;
  width: auto;
  height: auto;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.subtitle.animate {
  opacity: 1;
  transform: translateX(0);
}

.content-text {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.9rem, 1.5vw, 1.125rem);
  color: #010101;
  line-height: 1.6;
  margin: 0;
  width: auto;
  height: auto;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.content-text.animate {
  opacity: 1;
  transform: translateX(-70px);
}

.part1-image {
  flex: 0 0 auto;
}

.bg-image {
  width: 679px;
  height: 247px;
  object-fit: contain;
}

/* Part 2: Description Section */
.part2 {
  margin-bottom: 100px;
}

.part2-container {
  width: 80%;
  display: flex;
  justify-content: center;
  margin-left: -10px;
}

.description-text {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: clamp(1.2rem, 2.5vw, 1.56rem);
  color: #010101;
  line-height: 1.5;
  margin: 0;
  width: 89%;
  height: auto;
  text-align: left;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.description-text.animate {
  opacity: 1;
  transform: translateX(0);
}

.highlight {
  color: #DB4AAD;
}

/* Part 3: Project Significance Section */
.part3 {
  margin-bottom: 0;
  width: 138%;
  justify-content: right;
  transform: translateX(5%);
}

.part3-container {
  width: 93.5%;
  height: 319px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p3-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0px;
}

.part3-left {
  flex: 0 0 auto;
  transform: translateX(90px) translateY(-70px);
}

.project-image {
  width: 135px;
  height: 139px;
  object-fit: contain;
}

.part3-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(2%);
}

.project-title {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #FCFCFC;
  margin: 0;
  width: auto;
  height: auto;
  margin-left: 55%;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.project-title.animate {
  opacity: 1;
  transform: translateX(0);
}

.project-description {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.08rem);
  color: #FFFFFF;
  line-height: 1.6;
  margin: 0;
  width: auto;
  height: auto;
  text-align: right;
  white-space: nowrap;
  margin-right: 360px;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.project-description.animate {
  opacity: 1;
  transform: translateX(0px);
}

/* Responsive design for content sections */
@media (max-width: 1200px) {
  .part1-container {
    width: 80%;
    flex-direction: column;
    align-items: center;
  }

  .part2-container {
    width: 80%;
  }

  .part3-container {
    width: 99%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .bg-image {
    width: 100%;
    max-width: 679px;
    height: auto;
  }

  .description-text {
    width: 100%;
    height: auto;
  }

  .project-description {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .home-content {
    padding: 30px 0;
  }

  .content-section {
    margin-bottom: 30px;
  }

  .part1-container {
    width: 90%;
    gap: 20px;
  }

  .part1-text {
    gap: 20px;
  }

  .section-title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 18px;
    width: auto;
    height: auto;
  }

  .content-text {
    font-size: 18px;
    width: auto;
    height: auto;
  }

  .description-text {
    font-size: 20px;
    line-height: 32px;
  }

  .project-title {
    font-size: 28px;
    width: auto;
    height: auto;
  }

  .project-description {
    font-size: 18px;
    width: auto;
    height: auto;
  }
}

/* Part 4: Project Goal Section */
.part4 {
  margin-bottom: 0;
  margin-top: 50px;
  transform: translateX(-7%);
}

.part4-container {
  width: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Header section */
.part4-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.goal-title {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #020202;
  margin: 0;
  width: auto;
  height: auto;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.goal-title.animate {
  opacity: 1;
  transform: translateX(0);
}

.goal-bug {
  width: 73px;
  height: 68px;
  object-fit: contain;
  transform: translateX(50px);
}

/* Goal cards grid */
.goal-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 40px;
}

.goal-card {
  width: 284.1px;
  height: 361px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p4-goal-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.card-icon {
  width: 65px;
  height: 67px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 65px;
  height: 67px;
  object-fit: contain;
}

.card-title {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: clamp(1.2rem, 2.5vw, 1.56rem);
  color: #FFFFFF;
  line-height: 1.4;
  margin: 0 0 20px 0;
  width: auto;
  height: auto;
  text-align: center;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.card-content {
  width: 284.1px;
  height: 207.5px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p4-goal-rectangle.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  left: 0;
}

.card-text {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.9rem, 1.8vw, 1.25rem);
  color: #000000;
  line-height: 1.5;
  margin: 0;
  width: auto;
  height: auto;
  text-align: center;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.card-title.animate {
  opacity: 1;
  transform: translateX(0);
}

.card-text.animate {
  opacity: 1;
  transform: translateX(0);
}

/* To Top Button */
.to-top-container {
  position: fixed;
  bottom: 100px;
  right: 45px;
  z-index: 1000;
  display: block;
  visibility: visible;
}

.to-top-btn {
  width: 82px;
  height: 82px;
  object-fit: contain;
  cursor: url('https://static.igem.wiki/teams/5736/img/home/p1-img6-unclick.webp') 39 28, pointer;
  transition: transform 0.3s ease;
  display: block;
  visibility: visible;
}

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

/* Responsive design for part 4 */
@media (max-width: 1200px) {
  .part4-container {
    width: 80%;
  }

  .goal-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .goal-card {
    width: 100%;
    max-width: 284.1px;
  }

  .to-top-container {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
  }
}

@media (max-width: 768px) {
  .part4-container {
    width: 90%;
  }

  .part4-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .goal-title {
    width: auto;
    height: auto;
    font-size: 28px;
  }

  .goal-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .goal-card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .card-title {
    font-size: 22px;
    width: auto;
    height: auto;
  }

  .card-text {
    font-size: 18px;
    width: auto;
    height: auto;
  }
}

/* Part 5: Our Team Section */
.part5 {
  margin-top: 70px;
  margin-bottom: 0;
  height: 943px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p5-bg.webp');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.part5-container {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px;
  position: relative;
}

.team-top-image {
  width: 63px;
  height: 73px;
  object-fit: contain;
  position: absolute;
  top: 50px;
  left: 0;
  transform: translateX(-100px);
  z-index: 2;
}

.part5-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin-top: -20px;
  position: relative;
}

.team-title {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #020202;
  margin: 0 0 30px 0;
  text-align: center;
  white-space: nowrap;
  width: auto;
  height: auto;
}

.team-description {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #020202;
  line-height: 1.5;
  margin: 0 0 40px 0;
  text-align: center;
  max-width: 850px;
}

.photo-section {
  width: 1119px;
  height: 660px;
  background-image: url('https://static.igem.wiki/teams/5736/img/home/p5-photo-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  display: block;
  box-sizing: border-box;
}

.photo-carousel {
  position: relative;
  width: 100%;
  height: 631px;
  padding: 20px;
  overflow: hidden;
}

.team-photo {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 98%;
  height: 615px !important;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

.team-photo.active {
  opacity: 1;
  z-index: 2;
}

.photo-dots {
  display: flex;
  gap: 10px;
  justify-content: right;
  width: 100%;
  margin-left: -35px;
  margin-top: 5px;
}

.dot {
  width: 15.5px;
  height: 15.5px;
  object-fit: contain;
  transition: opacity 0.3s ease;
  opacity: 0.5;
}

.dot.active {
  opacity: 1;
}

/* Responsive design for part 5 */
@media (max-width: 1200px) {
  .part5-container {
    padding: 20px;
  }

  .team-title {
    font-size: 32px;
    width: auto;
    height: auto;
  }

  .photo-section {
    width: 90%;
    max-width: 1119px;
    height: auto;
    aspect-ratio: 1119/660;
  }

  .photo-carousel {
    height: auto;
    aspect-ratio: 1119/660;
  }

  .team-photo {
    width: 1296px !important;
    height: 631px !important;
    max-width: none;
  }

  .team-description {
    max-width: 500px;
  }
}

@media (max-width: 600px) {
  .team-title {
    font-size: 24px;
  }
}

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

  .part5-container {
    padding: 20px 10px;
  }

  .team-top-image {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 20px;
  }

  .part5-content {
    padding-top: 20px;
  }

  .team-title {
    font-size: 28px;
    width: auto;
    height: auto;
  }

  .team-description {
    font-size: 18px;
    max-width: 100%;
  }

  .photo-section {
    width: 100%;
    height: auto;
    aspect-ratio: 1119/660;
  }

  .photo-carousel {
    height: auto;
    aspect-ratio: 1119/660;
  }

  .team-photo {
    width: 1296px !important;
    height: 631px !important;
  }

  .photo-dots {
    gap: 5px;
  }

  .dot {
    width: 12px;
    height: 12px;
  }
}
