@import "_style.scss";
@import url('https://fonts.googleapis.com/css2?family=Kreon:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  width: 100%;
  background-color: $light_blue;
  font-family: 'Kreon', serif;
  zoom: 1.5;
  @media (max-width: 1140px) {
    zoom: 1.2;
  }
  @media (max-width: 768px) {
    zoom: 1;
  }
}
// 位置顯示屬性 display , float , position
// 盒模型  width , height , padding , margin ,border

// css書寫順序 位置顯示屬性 > 盒模型 > 文字屬性 > 背景 > ...
#logo {
  position: absolute;
  top: 35px;
  left: 60px;

  width: 70px;
  height: 70px;

  img {
    width: 100%;
  }
}

.wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 55.5vh;
  @media (max-width: 768px) {
    height: 85vh;
  }

  .container {
    max-width: 1140px;
    height: 100%;
    @media (max-width: 576px) {
      width: 100%;
    }

    &.change_border {
      max-width: 100%;
      @media (max-width: 576px) {
        max-height: 100vh;
        overflow: hidden;
      }
    }
    @media (max-width: 1140px) {
      max-width: 768px;
    }
    @media (max-width: 768px) {
      max-width: 576px;
    }
    @media (max-width: 576px) {
      max-width: 100%;
    }

    .title_group {
      width: 100%;

      .title_box {
        display: flex;
        justify-content: center;

        #title_news {
          display: inline-block;
          padding-top: 80px;
          margin: 0;
          font-size: $title;
        }
      }

      span {
        display: flex;
        justify-content: center;

        .tab-btn {
          padding: 0 20px;
          font-weight: 500;
          color: $light_grey;
          margin-top: 10px;
          font-size: 18px;

          &:hover {
            cursor: pointer;
            color: $black;
          }

          &.active {
            color: $dark_blue;
          }
        }
      }
    }

    .content {
      position: relative;
      width: 100%;
      height: 80%;

      .content_group {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 97%;
        background-color: $light_blue;
        opacity: 0;
        @media (max-width: 768px) {
          height: 100%;
        }

        &#news {
          margin-top: 30px;
          @media (max-width: 768px) {
            margin-top: 50px;
          }


          &.active {
            opacity: 1;
            pointer-events: unset;
          }

        }
        &#activies {
          margin-top: 0px;
          @media (max-width: 576px) {
            width: 95%;
          }

        }

        .news_list {
          display: flex;
          align-items: center;
          margin: 10px;
          width: 30%;
          height: 40px;
          background-color: $white;
          font-weight: 400;
          border-radius: 5px;
          @media (max-width: 1670px) {
            margin-left: 200px;
            width: 20%;
            height: 60px;
          }
          @media (max-width: 1140px) {
            height: 60px;
            width: 30%;
            margin-left: 50px;
          }
          @media (max-width: 820px) {
            height: 60px;
            width: 25%;
            margin-left: 100px;
          }
          @media (max-width: 768px) {
            height: 60px;
            width: 40%;
            margin-left: 0px;
          }
          @media (max-width: 576px) {
            margin: 0 auto;
            width: 95%;
          }

          .news {
            width: 90%;
            .news_title {
              text-align: center;
              font-weight: 700;
            }

            .news_date {
              text-align: right;
              margin-right: 40px;
              color: $grey;
              font-size: 12px;
            }

            .icon {
              width: 10%;
            }
          }
        }

        .news_info {
          position: absolute;
          right: 1%;
          top: 15px;
          display: flex;
          flex-direction: column;
          align-items: center;
          width: 65%;
          opacity: 0;
          pointer-events: none;
          height: 0; //強制取消高度
          @media (max-width: 1670px) {
            width: 40%;
            right: 20%;
          }
          // 改到這裡，改寬度
          @media (max-width: 1140px) {
            width: 50%;
            right: 10%;
          }
          @media (max-width: 768px) {
            width: 50%;
            right: 5%;
          }
          @media (max-width: 576px) {
            position: unset;
            width: unset;
            margin: 10px;
          }

          &.active {
            opacity: 1;
            height: unset;
          }

          .img {
            width: 50%;

            img {
              width: 100%;
            }
          }
        }
      }



      #activities {
        position: relative;
        opacity: 0;
        pointer-events: none;

        &.active {
          opacity: 1;
          pointer-events: unset;
        }

        .swiper-container {
          width: 100%;
          height: 100%;
          display: flex;
          --swiper-pagination-color: #000000;

          .swiper-wrapper {
            align-items: flex-end;
            .swiper-slide {
              display: flex;
              flex-wrap: wrap;
              justify-content: center;
              align-items: flex-end;
              height: 100%;
              padding-bottom: 10px;
              transition: 0.3s;
              // background-color: $blue;
              border-top-left-radius: 5px;
              border-top-right-radius: 5px;
              // @include shadow();
              &:hover {
                cursor: pointer;
              }

              &.swiper-slide-prev {
                width: 40% !important;
                @media (max-width: 768px) {
                  width: 50% !important;
                }
                @media (max-width: 576px) {
                  width: 100% !important;
                }
                p {
                  transition: 0.3s;
                  opacity: 1;
                }

                .img {
                  img {
                    max-height: unset;
                  }
                }
              }

              &.swiper-slide-active {
                width: 35% !important;
                @media (max-width: 768px) {
                  width: 70% !important;
                  p {
                    transition: 0.3s;
                    opacity: 1;
                  }
                }
                @media (max-width: 576px) {
                  width: 95% !important;
                }

                .img {
                  img {
                    max-height: 350px;
                    @media (max-width: 768px) {
                      max-height: unset;
                    }
                  }
                }
              }
              &.swiper-slide-next {
                width: 25% !important;
                @media (max-width: 768px) {
                  width: 30% !important;
                }
                @media (max-width: 576px) {
                  width: 100% !important;
                }
                .img {
                  img {
                    max-height: 220px;
                  }
                }
              }
            }

            .event_title {
              font-size: 20px;
            }

            .event_date {
              font-size: 12px;
              color: #555
            }

            p {
              padding-left: 10px;
              text-align: left;
              opacity: 0;
              font-size: 16px;
              // border: solid 1px black;
              box-sizing: border-box;
              width: 700px;
            }

            .img {
              width: 100%;
              padding: 0 15px;
              img {
                max-height: 220px;
                width: 100%;
              }
            }
          }

          .swiper-pagination-bullets {
            bottom: -4px;
          }
        }
      }

      .activities_info {
        position: absolute;
        top: 0px;
        right: 35px;
        z-index: 2;
        width: 30%;
        background-color: $white;
        border-radius: 5px;
        @include shadow();
        opacity: 0;
        @media (max-width: 768px) {
          top: 0px;
          right: 39px;
          width: 37%;
          max-height: 100vh;
        }
        @media (max-width: 576px) {
          top: 0px;
          right: 39px;
          width: 42%;
          max-height: 100vh;
        }

        .fa-times-circle {
          position: absolute;
          right: -5px;
          top: -5px;
          font-size: 30px;
        }

        &.active {
          opacity: 1;
        }

        p {
          padding: 10px;
        }
      }
    }
  }
}

#nav {
  position: fixed;
  bottom: 10px;
  margin: 0;
  width: 100%;
  height: 8vh;
  // background-color: $light_blue;
  @media (max-width: 1140px) {
    bottom: unset;
    height: 15vh;
  }
  @media (max-width: 576px) {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 2;
    display: flex;
    margin: 0;
    width: 80%;
    height: unset;
    background-color: rgba(255,255,255,0.8);
    border-radius: 5px;
  }

  .fa-bars {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    color: $light_grey;
    transition: 0.4s;
    font-size: 50px;
    @media (max-width: 576px) {
      display: block;
    }

    &:hover {
      color: $grey;
    }
  }

  ul {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    margin-right: 50px;
    @media (max-width: 768px) {
      justify-content: center;
      margin-right: 0px;
    }
    @media (max-width: 576px) {
      display: none;
      width: 100%;
      margin-top: 10px;
      margin-bottom: 25px;
      padding-left: 0;

      &.active {
        display: block;
      }
    }

    li {
      position: relative;
      margin-top: 30px;
      margin-right: 20px;
      list-style: none;
      font-weight: 500;

      @media (max-width: 768px) {
        margin-right: 5px;
      }
      @media (max-width: 576px) {
        color: $white;
        position: relative;
        text-align: center;

        &:hover {
          color: $black;
        }
      }

      a {
        text-decoration: none;
        color: $grey;
        font-size: 16px;
        @media (max-width: 860px) {
          font-size: 16px;
        }
        @media (max-width: 768px) {
          font-size: 14px;
        }
        @media (max-width: 576px) {
          font-size: 22px;
        }

        &:hover {
          color: $dark_blue;
        }
        .bubble {
          position: absolute;
          top: -60px;
          z-index: 3;
          display: none;

          @media (max-width: 576px) {
            top: -60px;
            left: 192px;
          }
        }

        &:hover .bubble {
          display: block;
        }
      }
    }
  }
}

// extra-setting
.fa-minus-circle {
  color: $grey;
  cursor: pointer;

  &:hover {
    color: $black;
  }
}

.fa-plus-circle {
  color: $black;
}

//  sea urchin svg
.st0 {
  fill: #ffffff;
}
.st1 {
  fill: #232020;
}

.sea_life {
  position: absolute;
  bottom: 80px;
  left: 10%;
  z-index: 0;
  width: 100px;
  animation-name: movement;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  @media (max-width: 576px) {
    display: none;
  }
}

@keyframes movement {
  0% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-15deg);
  }
}

// ugly fish
.st0 {
  fill: none;
  stroke: #231815;
  stroke-miterlimit: 10;
}

.ugly_fish {
  position: absolute;
  width: 200px;
  top: 70px;
  right: 60px;
  z-index: 0;
  animation-name: moveforward;
  animation-duration: 2s;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  @media (max-width: 768px) {
    display: none;
  }
}

@keyframes moveforward {
  0% {
    right: 70px;
  }
  50% {
    right: 75px;
  }
  100% {
    right: 80px;
  }
}

.ugly_fish_text {
  position: absolute;
  display: inline-block;
  top: 50px;
  right: 70px;
  font-weight: 500;
  font-size: 14px;
  @media (max-width: 768px) {
    display: none;
  }
}
