/* Reset + 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: transparent;
  color: #fff;
}

body {
  background-image: url("image/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 頁首 */
header {
  background-color: #353434;
  height: 80px;
  width: 100%;
  color: #fdfbee;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  flex-wrap: wrap;
}

h1 {
  font-weight: bold;
  font-size: 24px;
  text-align: center;
  line-height: 80px;
  text-decoration: none;
  white-space: nowrap;
}

header ul {
  display: flex;
  gap: 4vw;
  list-style: none;
  margin: 0;
  padding: 0;
}

header li {
  display: inline-block;
}

header a {
  color: #fdfbee;
  text-decoration: none;
  font-size: 16px;
}

header a:hover {
  text-decoration: underline;
}
/* 輪播區 */
.carousel {
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  gap: 20px;
}

.carousel-item {
  flex: 0 0 calc(33.33% - 20px);
  text-align: center;
}

.carousel-item img {
  width: 100%;
  height:450px; /* 或你想要的固定高度 */
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.carousel-item img:hover {
  transform: scale(1.05);
}

.arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  font-size: 40px;
  background-color: rgba(0,0,0,0.4);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  z-index: 10;
}

.arrow.right {
  right: 10px;
}

.arrow.left {
  left: 10px;
}

/* 搜尋區 */
.product-slider-search {
  background-color: #000;
  padding: 40px 20px 60px;
  margin-top: -40px;
  text-align: center;
  color: #fff;
}

.slider-text h2 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.slider-text p {
  font-size: 18px;
  color: #ccc;
  margin-bottom: 30px;
}

.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  background: #000000a5;
  border-radius: 50px;
  padding: 10px 20px;
  border: 2px solid #4bcccd;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  outline: none;
}

.search-bar input::placeholder {
  color: #888;
}

.search-bar input:focus {
  border-bottom: 1px solid #4bcccd;
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  padding-left: 10px;
}

.search-bar svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}
.product-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
}

.nav-btn {
  background: #333;
  color: white;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 60px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s;
}
.nav-btn:hover {
  background: #4bcccd;
}

.product-slide {
  display: flex;
  background-color: #00000081;
  border: 1px solid #4bcccd;
  border-radius: 20px;
  overflow: hidden;
  width: 800px;
  max-width: 95%;
  transition: all 0.4s ease;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);

}

.product-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50%;
  border-right: 1px solid #4bcccd;
  padding: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);

}
.product-image img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.product-info {
  flex: 1;
  padding: 40px 30px;
  color: #fff;
  font-size: 18px;
}



/* 跑馬燈 */
.hashtag-marquee {
  overflow: hidden;
  background-color: #00000000;
  padding: 10px 0;
}

.hashtag-track {
  display: flex;
  gap: 40px;
  animation: scroll-hashtag 25s linear infinite;
  width: max-content;
}

.item {
  position: relative; /* 文字要疊上去的基礎 */
}

.item img {
  height: 36px;  /* 圖片高度可調 */
  object-fit: contain;
  flex-shrink: 0;
}

.item .text {
  position: absolute;
  top: 45%;       /* 垂直置中 */
  left: 50%;      /* 水平置中 */
  transform: translate(-50%, -50%);
  color: black;   /* 文字顏色 */
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}


@keyframes scroll-hashtag {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}

/* 聯絡我們 */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  background-color: #000;
  color: #fff;
  padding: 60px 0;
}

.contact-info {
  width: 50%;
  padding-left: 120px;
  padding-right: 40px;
}

.contact-info h2 {
  color: #4bcccd;
  font-size: 32px;
  margin-bottom: 20px;
}

.contact-info p {
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.6;
  color: #eaeaea;
}

.contact-map {
  width: 50%;
  height: 400px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* footer 與社群 icon */
footer {
  text-align: center;
  padding: 40px 20px 20px;
  background-color: #00000017;
  color: #888;
  font-size: 14px;
}

.social-icons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-block;
}

.icon img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.icon .hover {
  opacity: 0;
}

.icon:hover .default {
  opacity: 0;
}

.icon:hover .hover {
  opacity: 1;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 20px;
  display: none; /* 預設不顯示，滑動才出現 */
  z-index: 999;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
}
.back-to-top img {
  width: 100%;
  height: auto;
}

.more-gallery {
  padding: 60px 20px;
  background-color: #00000000;
  text-align: center;
}

.more-gallery h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #4bcccd;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  width: 100%;
  max-width: 200px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  background: white;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

#loadMoreBtn {
  margin-top: 30px;
  padding: 10px 30px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background-color: #4bcccd;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

#loadMoreBtn:hover {
  background-color: #3aaeb5;
}
/* 初始隱藏效果 */
.more-gallery {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 進入畫面後觸發動畫 */
.more-gallery.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 滑入動畫效果 - 更多作品區 */
.more-gallery {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.more-gallery.visible {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.more-gallery.visible .gallery-item {
  opacity: 1;
  transform: translateY(0);
}

.case-share-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 5vw;
  background-color: #00000039;
  color: #fff;
  flex-wrap: wrap;
}

.case-share-text {
  flex: 1;
  min-width: 280px;
}

.case-share-text h2 {
  font-size: 36px;
  color: #4bcccd;
  margin-bottom: 16px;
}

.case-share-text h3 {
  font-size: 22px;
  color: #eee;
  margin-bottom: 16px;
}

.case-share-text p {
  font-size: 18px;
  color: #ddd;
  line-height: 1.8;
}

.case-share-images {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px; 
  flex-wrap: wrap;
  min-width: 800px;
  padding-right: 0;   
  margin-right: 0;   
}

.case-img {
  width: 30%;
  border-radius: 4px;
  max-width: 4000px;
  height: 400px;
  object-fit: cover;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.8s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.case-img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
/* 初始動畫狀態 */
.slide-down {
  transform: translateY(-80px);
}
.slide-up {
  transform: translateY(80px);
}

/* 加入 visible 時觸發動畫 */
.case-img.visible {
  opacity: 1;
  transform: translateY(0);
}
.case-img.static.visible {
  transform: scale(1);
}

@media (max-width: 1024px) {
  .case-share-images {
    min-width: 100%;
    justify-content: center;
  }

  .case-img {
    width: 45%;
    height: 300px;
  }
}

@media (max-width: 600px) {
  .case-img {
    width: 100%;
    height: 250px;
  }
}

/* 響應式設計 */
@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 calc(50% - 20px);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-info {
    padding-left: 40px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 20px;
    height: auto;
  }

  header ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
  }

  h1 {
    font-size: 22px;
    line-height: 1.4;
  }

  .carousel-item {
    flex: 0 0 100%;
  }

  .carousel-track {
    gap: 10px;
  }

  .slider-text h2 {
    font-size: 22px;
  }

  .slider-text p {
    font-size: 14px;
  }

  .search-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .search-bar input {
    font-size: 14px;
    width: 100%;
  }

  .product-slide {
    flex-direction: column;
  }

  .product-image {
    border-right: none;
    border-bottom: 1px solid #4bcccd;
  }

  .product-info {
    padding: 20px;
  }

  .contact-info,
  .contact-map {
    width: 100%;
    padding: 20px;
    height: auto;
  }

  .contact-map {
    height: 300px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .more-gallery h2 {
    font-size: 20px;
  }

  #loadMoreBtn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .slider-text h2 {
    font-size: 18px;
  }

  .slider-text p {
    font-size: 13px;
  }

  .search-bar input {
    font-size: 13px;
  }

  .product-info h3 {
    font-size: 16px;
  }

  .product-info p {
    font-size: 14px;
  }

  .more-gallery {
    padding: 40px 10px;
  }

  .more-gallery h2 {
    font-size: 18px;
  }

  #loadMoreBtn {
    font-size: 14px;
    padding: 10px;
  }
}

/* 縮圖滑入動畫平滑處理 */
.gallery-item img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
