.loading {
  position: absolute;
  background-color: #ffffff;
  background-image: url(/static/images/loading.gif);
  z-index: 9;
  background-size: 200px;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 500px;
  top: 300px;
  bottom: 400px;
  left: 50%;
  transform: translate(-50%, -50%);
}

.vision {
  display: flex;
  justify-content: center;
  height: 320px;
  background-image: url("/static/images/welcome.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.slogan {
  margin-top: 75px;
  width: 1200px;
  height: 169px;
}

.slogan-1 {
  display: flex;
  margin: 10px 10px 15px 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 24px;
  color: #f8f8f8;
  height: 41px;
  align-items: center;
}

.slogan-2 {
  display: flex;
  margin: 0px 10px 25px 10px;
  font-size: 16px;
  line-height: 13px;
  font-weight: 700;
  color: #f8f8f8;
  height: 22px;
  align-items: center;
}

.search-bar {
  display: flex;
  height: 46px;
  margin: 0px 10px 10px 10px;
  position: relative;
}

.search {
  border-radius: 5px 0 0 5px;
  padding: 15px;
  width: 370px;
  height: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  line-height: 13px;
  outline: none;
}

.search::placeholder {
  color: #757575;
  font-size: 16px;
  font-weight: 700;
  line-height: 13.3px;
}

.search-icon {
  width: 60px;
  height: 46px;
  border-radius: 0 5px 5px 0;
  background-color: #448899;
  background-image: url("/static/images/icon_search.png");
  background-repeat: no-repeat;
  background-size: 30px;
  background-position: center;
}

.search-icon:hover {
  cursor: pointer;
}

.categories {
  display: none; /*點開要改flex */
  flex-wrap: wrap;
  position: absolute;
  width: 400px;
  height: 120px;
  background-color: #ffffff;
  top: 51px;
  overflow: visible;
  border-radius: 5px;
  box-shadow: 0px 0px 20px #aabbcc;
  z-index: 5;
}

.categories div {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 20px;
  padding: 10px 15px 10px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20.27px;
  color: #000000;
}

.categories div:hover {
  background: #e8e8e8;
  border-radius: 5px;
  cursor: pointer;
}

.no-result {
  display: none;
  position: absolute;
  left: 50%;
  transform: translate(-50%, 8%);
  padding: 30px;
  box-sizing: border-box;
  height: 300px;
  width: 400px;
  text-align: center;
  background-image: url("/static/images/no-result.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1200px 1fr;
  grid-template-rows: auto 104px;
  grid-template-areas:
    ". gallery ."
    "footer footer footer";
}

.gallery {
  grid-area: gallery;
  display: grid;
  grid-template-columns: repeat(auto-fill, 270px);
  grid-template-rows: repeat(auto-fill, 242px);
  grid-gap: 30px;
  padding: 15px;
  margin: 40px 0;
}

.pic {
  width: 270px;
  height: 242px;
  border-radius: 5px;
  border: 1px solid #e8e8e8;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.pic-box {
  overflow: hidden;
}

.pic img {
  width: 270px;
  height: 197px;
  border-radius: 5px;
  object-fit: cover; /*防止圖片變形*/
  display: block; /*移除圖片下方的留白*/
  transition: all 0.5s;
}

.pic img:hover {
  transform: scale(1.1);
}

.pic:hover {
  box-shadow: 2px 2px 9px #aabbcc;
}

.attraction-name {
  box-sizing: border-box;
  display: flex;
  width: 270px;
  background-color: rgba(0, 0, 0, 0.6);
  position: absolute;
  left: 0;
  bottom: 45px;
  color: #ffffff;
  padding: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  align-items: center;
}

.pic-title {
  box-sizing: border-box;
  background-color: #ffffff;
  padding: 10px;
  width: 270px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pic-title div {
  width: 125px;
  height: 25px;
  color: #757575;
  font-size: 16px;
  font-weight: 500;
  line-height: 13.3px;
}

.mrt {
  display: flex;
  align-items: center;
}

.category {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.none {
  display: none;
}

@media (max-width: 1200px) {
  .topic {
    margin-left: 10px;
  }

  .slogan {
    margin-left: 10px;
  }
  .container {
    grid-template-columns: 1fr 90% 1fr;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .pic,
  .pic img,
  .pic-title,
  .attraction-name {
    width: 100%;
  }

  .pic-title div {
    width: 50%;
  }
}

@media (max-width: 600px) {
  .search {
    width: 80%;
  }

  .categories {
    width: 322px;
  }

  .categories div {
    width: 66px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}
