/* ===== 作品集整體區塊樣式 ===== */
.work-section {
  background-color: #000; /* 背景為黑色 */
  padding: 5px 2px;
}

/* ===== 標題樣式 ===== */
.main-title {
  text-align: center;
  font-size: 3rem;
  color: #fff;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.section-subtitle {
  text-align: center;
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 20px;
}

/* ===== 橫條式作品卡片樣式 ===== */
.horizontal-card {
  display: flex;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  margin: 40px auto;
  overflow: hidden;
  max-width: 1000px;
  transition: transform 0.3s ease;
}

.card-image {
  width: 50%;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-image:hover img {
  transform: scale(1.1);
  filter: brightness(85%);
}

.card-content {
  padding: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.project-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #000;
}

.card-content p {
  margin: 5px 0;
  font-size: 1rem;
  color: #333333;
}

.project-link {
  display: inline-block;
  margin-top: 3px;
  padding: 8px 16px;
  background-color: #f7c300;
  color: #000;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.project-link:hover {
  background-color: #ffda60;
}

.award {
  font-weight: bold;
  color: goldenrod;
}

/* 彈窗背景 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

/* 展開的圖片樣式 */
.modal-content {
  display: block;
  max-width: 90%;
  max-height: 80vh;
  margin: 60px auto;
  border-radius: 10px;
  object-fit: contain;
}

/* 關閉按鈕 */
.close-btn {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 100px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}



.modal-nav {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
}

.prev, .next {
  color: white;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
  transition: 0.3s;
}

.prev:hover, .next:hover {
  color: #f7c300;
}

/* 剪輯影片區塊 */
.video-section {
  padding: 60px 20px;
  background-color: #fff;
}

.video-category {
  margin-bottom: 50px;
}

.video-category h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
  display: inline-block;          /* 讓 h3 可以收合寬度 */
  border-left: 6px solid #f7c300; /* 黃線 */
  padding-left: 12px;
}

.video-category {
  text-align: center; /* 讓 h3 置中 */
}

.video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* 👈 把影片排版改成置中 */
}

.video-grid iframe {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.video-preview {
  text-align: center;
  border-radius: 30px;
  margin: 20px;
}

.video-preview img {
  width: 100%;
  max-width: 480px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.video-preview img:hover {
  transform: scale(1.03);
  border-radius: 30px;
}

.video-title {
  margin-top: 5px;
  font-size: 1.5rem;
  color: white;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}


/* 響應式排版 */

@media (max-width: 768px) {
  .horizontal-card {
    flex-direction: column;
    align-items: center; /* ✨讓圖片與內容置中 */
    text-align: center;
  }

  .card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;            /* ✨讓裡面的 img 置中 */
    justify-content: center;  /* ✨圖片水平置中 */
    align-items: center;
  }

  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .card-content {
    width: 100%;
    padding: 20px;
  }

  .card-content h4 {
    text-align: center; 
  }

    .card-content p {
    text-align: center; 
  }
    .project-link {
    text-align: center; 
  }
  
}

/* 響應式調整：手機版改直式排版 */
@media (max-width: 768px) {
  .horizontal-card {
    flex-direction: column;
  }
  .card-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* 改為橫向比例更適合手機螢幕 */
  }
  .card-content {
    width: 100%;
    padding: 20px;
  }
}
@media (max-width: 1024px) {
  .video-preview {
    width: 45%; /* 平板顯示兩個 */
  }
}

@media (max-width: 600px) {
  .video-preview {
    width: 90%; /* 手機顯示一個 */
  }
}