.fish-2 {
  display: none;
}

.timeline {
  position: relative;
  margin-bottom: 6rem;
}

.waterfall-div {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  z-index: 0;
  margin: 0 auto;
}

.waterfall {
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.fish-1 {
  position: absolute;
  top: 0;
  left: 50%;
  width: 320px;
  transform: translateX(-50%);
  animation: moveFish 10s forwards;
  animation-timing-function: linear;
}

@keyframes moveFish {
  0% {
    top: 0;
    transform: translateX(-50%) rotate(0deg);
  }
  25% {
    top: 18%;
    transform: translateX(-50%) rotate(10deg);
  }
  50% {
    top: 36%;
    transform: translateX(-50%) rotate(-10deg);
  }
  75% {
    top: 54%;
    transform: translateX(-50%) rotate(10deg);
  }
  100% {
    top: 75%;
    transform: translateX(-50%) rotate(-50deg);
  }
}

.timeline-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 0 15vw;
  z-index: 1;
  pointer-events: none; /* Ensure the text doesn't interfere with the fish animation */
  > h1 {
    grid-column: 2;
    grid-row: 1;
    padding-top: 4rem;
    padding-bottom: 9rem;
    height: fit-content;
    color: var(--black);
    font-weight: bold;
    font-size: 2.25rem;
  }
  > div {
    width: 35vw;
    pointer-events: all; /* Allow interaction with text */
    height: fit-content;
    /* padding-bottom: 1rem; */
    > h2 {
      color: var(--green);
    }
    > p {
      font-size: 1.25rem;
    }
  }

  > .text-2021 {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
  }
  > .text-2022 {
    grid-column: 2;
    grid-row: 3;
  }
  > .text-2023 {
    grid-column: 1;
    grid-row: 4;
    justify-self: end;
  }
  > .text-2024 {
    grid-column: 2;
    grid-row: 5;
  }
  > .text-2025 {
    grid-column: 1;
    grid-row: 6;
    justify-self: end;
  }
  > .text-2026 {
    grid-column: 2;
    grid-row: 7;
  }
}

.explanation,
.unique {
  margin: 0 6rem;
}

.explanation {
  padding: 0 0 8rem 0;
  > h2 {
    color: var(--orange);
    padding-bottom: 1rem;
  }
  > p {
    width: 60vw;
    font-size: 2rem;
    border: 1px solid var(--orange);
    background-color: var(--orange);
    color: var(--grey);
    padding: 1rem;
  }
}

.unique {
  display: grid;
  gap: 2rem 0;
  > h2 {
    color: var(--blue);
    text-align: right;
  }
  > div {
    width: 65vw;
    > p {
      font-size: 2rem;
      border: 1px solid var(--blue);
      background-color: var(--blue);
      color: var(--grey);
      padding: 1rem;
    }
  }
}

.first-div {
  justify-self: end;
  text-align: right;
}

.second-div {
  justify-self: start;
  text-align: left;
}

.third-div {
  justify-self: center;
  text-align: center;
}

/* Responsive */
@media (max-width: 1425px) {
  .explanation,
  .unique {
    margin: 0;

    > p,
    > div > p {
      font-size: 1.5rem;
    }
  }
}

@media (max-width: 1260px) {
  .timeline-text > h1 {
    padding-bottom: 10rem;
  }
  .timeline-text > div {
    width: 100%;
    padding-bottom: 0;
  }
}

@media (max-width: 1140px) {
  .timeline-text {
    gap: 0;

    > h1 {
      padding-bottom: 4rem;
    }

    > div > p {
      font-size: 1.1rem;
      padding-bottom: 1.5rem;
    }

    > .text-2021 {
      grid-column: 2;
      justify-self: start;
    }
    > .text-2023,
    > .text-2025 {
      grid-column: 2;
      justify-self: start;
    }
  }

  .waterfall {
    margin: 0;
    padding: 0 4rem 0 0;
  }

  .waterfall-div {
    right: 15rem;
    overflow: visible;
  }
}

@media (max-width: 855px) {
  .fish-1 {
    display: none;
  }

  .waterfall {
    display: none;
  }

  .waterfall-div {
    display: none;
  }

  .fish-2 {
    display: block;
    z-index: 2;
    width: 200px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: moveFish2 10s forwards;
    animation-timing-function: linear;
  }

  @keyframes moveFish2 {
    0% {
      top: 0;
      transform: translateX(-50%) rotate(0deg);
    }
    25% {
      transform: translateX(-50%) rotate(10deg);
    }
    50% {
      transform: translateX(-50%) rotate(-10deg);
    }
    75% {
      transform: translateX(-50%) rotate(10deg);
      opacity: 100%;
    }
    100% {
      top: 175%;
      transform: translateX(-50%) rotate(-50deg);
      opacity: 0;
    }
  }

  .timeline {
    margin-bottom: 0;
  }

  .timeline-text {
    display: block;
    padding: 0 0 1rem 0;
    position: relative;
    z-index: 0;
  }

  .timeline-text > h1 {
    grid-column: 1;
    grid-row: auto;
    padding: 2rem 0;
    font-size: 2rem;
  }

  .timeline-text > div {
    margin: 0 auto;
    margin-bottom: 1rem;
    padding: 0.5rem;
    color: var(--grey);

    > h2 {
      color: var(--grey);
    }

    > p {
      font-size: 1rem;
      padding-bottom: 0;
    }
  }

  .timeline-text > .text-2021,
  .timeline-text > .text-2022,
  .timeline-text > .text-2023,
  .timeline-text > .text-2024,
  .timeline-text > .text-2025,
  .timeline-text > .text-2026 {
    grid-column: 1;
    justify-self: center;
    background-color: var(--green);
  }

  .explanation > p,
  .unique > div > p {
    width: 100%;
    font-size: 1.25rem;
  }

  .unique {
    display: block;
    > h2 {
      padding-bottom: 1rem;
    }
  }

  .unique > div {
    width: 100%;
    margin-bottom: 1rem;
  }

  .explanation {
    padding-bottom: 2rem;
  }
}
