/* 精選展示區域 */
#featured {
  margin-top: 50px;
  padding: 20px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-color: #1f1e31;
  border-radius: 10px; /* 圓角效果 */
}

#featured.visible {
  opacity: 1;
}
.portfolioInfo {
  margin-top: 50px;
  margin-bottom: 100px;
  padding: 20px;
  background-color: #1f1e31;
  border-radius: 10px; /* 圓角效果 */
}

.portfolio-btn {
  background-color: #8d8faa; /* 按鈕背景色 */
  color: #fff; /* 按鈕文字顏色 */
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 5px; /* 圓角效果 */
  cursor: pointer; /* 顯示指針光標 */
  transition: background-color 0.3s ease, transform 0.3s ease; /* 平滑過渡效果 */
  flex: 1; /* 使按鈕擴展以佔據更多空間 */
  max-width: 150px; /* 限制按鈕的最大寬度 */
}

.portfolio-btn:hover {
  background-color: #926ccf; /* 按鈕懸停背景色 */
  transform: scale(1.05); /* 懸停時放大效果 */
}

.gallery {
  margin-top: 20px;
  background-color: #1f1e31;
  padding: 10px; /* 添加內邊距以增加空間 */
  overflow: hidden; /* 隱藏超出容器的內容 */
}

.thumbnail-gallery {
  display: flex;
  flex-wrap: wrap; /* 允許換行 */
  gap: 10px; /* 調整內邊距 */
}

.thumbnail-item {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.thumbnail-item:hover {
  transform: scale(1.05);
}
.thumbnail {
  width: 150px;
  height: auto;
  border-radius: 5px; /* 圓角效果 */
  object-fit: cover; /* 保持正方形且不變形 */
}
.case-details {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px; /* 圓角效果 */
  background-color: #1f2833; /* 背景顏色 */
  color: #c5c6c7; /* 淡灰色文字 */
  display: none;
}

.case-details a {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #8d8faa; /* 按鈕背景色 */
  color: #fff; /* 按鈕文字顏色 */
  text-decoration: none;
  border-radius: 5px; /* 圓角效果 */
  text-align: center; /* 按鈕文字置中對齊 */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.case-details a:hover {
  background-color: #926ccf; /* 按鈕懸停背景色 */
  color: #1f2833; /* 懸停文字顏色 */
  text-decoration: underline; /* 懸停時加下劃線 */
}

/* 模態視窗樣式 */
.modal-window {
  display: none; /* 預設隱藏 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
}

.modal-content {
  background-color: #3b333d; /* 背景顏色 */
  padding: 20px;
  border: 1px solid #292424; /* 邊框顏色 */
  width: 80%; /* 視窗寬度 */
  max-width: 500px; /* 最大寬度 */
  border-radius: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 垂直和水平居中 */
  overflow: hidden; /* 隱藏超出範圍的內容 */
  animation: slideIn 0.5s ease-out; /* 添加動畫效果 */
}

/* 開啟動畫 */
@keyframes slideIn {
  from {
    width: 0;
    height: 0;
    padding: 0;
    border: none;
    border-radius: 0;
  }
  to {
    width: 80%;
    height: auto;
    padding: 20px;
    border: 1px solid #292424; /* 邊框顏色 */
    border-radius: 10px;
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: #ff5c5c; /* 鼠標懸停顏色 */
}

.image-modal {
  display: none; /* 預設隱藏 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
}

.image-modal-content {
  background-color: #3b333d; /* 背景顏色 */
  padding: 20px;
  border: 1px solid #292424; /* 邊框顏色 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 垂直和水平居中 */
  display: inline-block; /* 根據內容大小調整容器大小 */
  max-width: 90vw; /* 最大寬度為視口的90% */
  max-height: 90vh; /* 最大高度為視口的90% */
  overflow: hidden; /* 隱藏超出容器的內容 */
  box-sizing: border-box; /* 包含邊框和內邊距在容器的總寬度和高度中 */
}

.image-modal-img {
  width: 100%; /* 使圖片填滿容器 */
  height: auto; /* 根據圖片的寬度自動調整高度，保持比例 */
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.image-modal-close:hover {
  color: #ff5c5c; /* 鼠標懸停顏色 */
}

/* 精選照片區域樣式 */
#selectShowcase {
  margin: 40px auto;
  padding: 20px;
  background-color: #1b1b1b;
  border-radius: 10px;
  width: 90%;
  max-width: 1800px;
  text-align: center;
}

#selectShowcase h2 {
  color: #e0e0e0;
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.selectShowcaseGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
}

.selectShowcaseItem {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.selectShowcaseItem img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.selectShowcaseItem:hover img {
  transform: scale(1.05);
}

.selectShowcaseDescription {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: #e0e0e0;
  padding: 10px;
  text-align: center;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.selectShowcaseItem:hover .selectShowcaseDescription {
  opacity: 1;
}

#about {
  display: flex;
}
