@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Noto+Sans+TC:wght@100..900&display=swap');

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
}

/* Navbar 基本樣式 */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  max-width: 1200px;
  height: 84px;
  margin: auto;
}

#logo a {
  text-decoration: none;
  letter-spacing: 4px;
  font-weight: 400;
  font-size: 22px;
  color: #292929;
  padding-left: 32px;
}

#nav-links{
  margin-left:auto;
}

/* 共用選單樣式 */
#nav-links ul {
  display: flex;
  /* gap: 2em; */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* #nav-links ul li {
  padding: 1em 2em;
} */

#nav-links a {
  text-decoration: none;
  color: #292929;
  font-weight: 400;
  letter-spacing: 3px;
  font-size: 16px;
  padding: 33px 24px;
}

#nav-links a:hover {
  background-color:#949494;
  color:#ffffff;
}

#nav-links li.bg_gray{
  background-color:#949494;
  color:#ffffff;
}

#nav-links a.bg_gray{
  background-color:#949494;
  color:#ffffff;
}

#nav-links li{
  cursor: pointer;
}

/* 漢堡按鈕 */
#menu-toggle {
  display: none;
  font-size: 2em;
  cursor: pointer;
  margin-left:auto;
}

#nav_language{
  padding: 32px 16px 32px 8px;
  cursor: pointer;
}

/* 手機版樣式 */
@media (max-width: 1024px) {
  #menu-toggle {
    display: block;
    padding-right: 16px;
  }

  /* 預設隱藏 nav */
  #nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  #nav-links ul {
    flex-direction: column;
    gap: 0;
  }

  #nav-links li {
    padding: 1em 2em;
    border-bottom: 1px solid #0000002e;
  }

  #nav_language{
    padding: 30px 32px 26px 0px;
  }

  #nav-links a {
    padding: 0;
  }

  #nav-links a:hover {
    border-bottom: none;
    background-color: transparent;
    color: #292929;
  }

  /* 展開狀態 */
  #nav-links.show {
    max-height: 400px;
    opacity: 1;
  }
}

@media screen and (max-width: 500px) {
  #nav_language{
    padding: 30px 16px 26px 0px;
  }
}




/* Carousel 基本樣式 */
.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  /* margin-top: 84px; */
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  background-position: center;
  background-size: cover;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* 確保圖片滿版顯示 */
.carousel-slide picture,
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 裁切保比例 */
}

/* 文字區塊 */
.carousel-caption {
  position: absolute;
  bottom: 20%;
  left: 10%;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  max-width: 600px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.carousel-caption h2 {
  font-size: 3rem;
  margin: 0 0 10px;
}

.carousel-caption p {
  font-size: 1.2rem;
}

/* 控制按鈕（透明背景） */
.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  /* 透明背景 */
  color: #ffffff;
  border: none;
  font-size: 3rem;
  padding: 0.2em 0.4em;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.carousel button:hover {
  transform: translateY(-50%) scale(1.2);
}

.carousel .prev {
  left: 20px;
}

.carousel .next {
  right: 20px;
}

/* 手機版 RWD */
@media (max-width: 768px) {
  .carousel {
    height: 95vh;
  }

  .carousel-caption {
    bottom: 12%;
    left: 5%;
    max-width: 90%;
  }

  .carousel-caption h2 {
    font-size: 1.8rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .carousel button {
    font-size: 2rem;
    /* 手機縮小按鈕 */
  }
}

/* 小圓點指示器 */
.carousel-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.carousel-dots .dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  /* transition: background 0.3s ease, transform 0.3s ease; */
}

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

/* 手機版圓點縮小 */
@media (max-width: 768px) {
  .carousel-dots {
    bottom: 15px;
  }

  .carousel-dots .dot {
    width: 10px;
    height: 10px;
  }
}

.section_title {
  display: flex;
  justify-content: center;
  margin: 50px auto;
  color: #323232;
  font-family: "Montserrat", sans-serif;
  font-size: 35px;
  font-weight: 700;
}

#portfolio {
  overflow: hidden;
  width: 100%;
  margin: 0px;
  padding: 0px;
}

.gallery {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  width: 100%;
}

.gallery li {
  position: relative;
  float: left;
  overflow: hidden;
  width: 25%;
  width: -webkit-calc(100% / 4);
  width: calc(100% / 4);
}

.gallery li>div {
  display: block;
  width: 100%;
  cursor: pointer;
}

.gallery li>div img {
  display: block;
  width: 100%;
  cursor: pointer;
  max-width: 100%;
  -webkit-transition: all 3s ease;
  -moz-transition: all 3s ease;
  -ms-transition: all 3s ease;
  -o-transition: all 3s ease;
  transition: all 3s ease;
}

.gallery li>div .workhover {
  position: absolute;
  left: 10px;
  top: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.9);
  vertical-align: center;
  -webkit-align-items: center;
  -moz-align-items: center;
  -ms-align-items: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  -webkit-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -ms-transition: all 1s ease;
  -o-transition: all 1s ease;
  transition: all 1s ease;
}

.gallery li>div p {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 20px 0;
  padding: 0px;
  text-align: center;
  display: block;
  width: 100%;
  position: relative;
  padding: 0 10px;
  color: black;
}

.gallery li>div h3 {
  width: 100%;
  color: #000;
  padding: 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.gallery li>div h3::after {
  content: "";
  width: 20px;
  margin: auto;
  height: 3px;
  margin: 20px auto;
  margin-bottom: 0px;
  background: #AEAEAE;
  display: block;
}

.gallery li>div:hover .workhover {
  opacity: 1;
}

.gallery li>div:hover img {
  -webkit-transform: scale(1.25);
  -moz-transform: scale(1.25);
  -ms-transform: scale(1.25);
  -o-transform: scale(1.25);
  transform: scale(1.25);
}

.gallery #worktext {
  margin-top: 38%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

li>a .gallery .gallery:hover {
  -webkit-transform: scale(1.25);
  -moz-transform: scale(1.25);
  -ms-transform: scale(1.25);
  -o-transform: scale(1.25);
  transform: scale(1.25);
}

@media screen and (max-width: 1300px) {
  .gallery li {
    width: 33.3333333%;
    width: -webkit-calc(100% / 3);
    width: calc(100% / 3);
  }
}

@media screen and (max-width: 900px) {
  .gallery li {
    width: 50%;
    width: -webkit-calc(100% / 2);
    width: calc(100% / 2);
  }
}

@media screen and (max-width: 500px) {
  .gallery li {
    width: 100%;
  }
}

.gallery li>div a.open-post {
  font-size: 10px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 10px;
  left: 50%;
  top: 100%;
  padding: 10px 7px 10px 15px;
  text-align: center;
  color: #000;
  border: 2px solid #000;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-transition: border-color .3s ease-in-out, top .3s ease-in-out, letter-spacing .3s ease-in-out;
  -moz-transition: border-color .3s ease-in-out, top .3s ease-in-out, letter-spacing .3s ease-in-out;
  transition: border-color .3s ease-in-out, top .3s ease-in-out, letter-spacing .3s ease-in-out;
}

.gallery li>div a.open-post:hover {
  letter-spacing: 5px;
  color: #000;
  border-color: #36393c;
}

#about {
  width: 768px;
  margin: 50px auto;
}

.about_flex {
  display: flex;
  gap: 3%;
  align-items: center;
}

.about_img img {
  width: 100%;
}

.about_text p {
  margin: 0;
}

.sns_icons {
  display: flex;
  gap: 1em;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sns_icons li:hover {
  fill: linear-gradient(45deg, #667eea, #764ba2);
  transition: right center 0.3s ease;
}

@media (max-width: 768px) {
  #about {
    width: 100%;
  }

  .about_text_bottom {
    padding: 0 4%;
  }
}

@media (max-width: 650px) {
  .about_flex {
    flex-direction: column;
  }

  .about_text_top {
    padding: 0 4%;
  }

  .about_text_bottom {
    padding: 0 4%;
  }
}

#contact {
  width: 768px;
  margin: 50px auto;
}

.contact_flex {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 5%;
}

.contact_img {
  width: 45%;
}

@media (max-width: 768px) {
  #contact {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .contact_flex {
    flex-direction: column;
    justify-content: center;
  }

  .contact_img {
    width: 100%;
  }

  .contact_info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4%;
  }

}

#site-footer {
  display: flex;
  justify-content: center;
  background-color: #4b4b4b;
  color: #ffffff;
}