/* ==================== 滿版白色三角形分割線 ==================== */
.white-triangle-divider {
  position: relative;
  width: 100vw;
  height: 200px;
  overflow: visible;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -100px;
  z-index: 1;
}

.white-triangle-divider::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  background: #FFFFFF;
  width: 100vw;
  height: 100%;
  clip-path: polygon(0% 0%, 0% 100%, 100% 0%);
  margin-bottom: -239px;
  z-index: 1;
}

/* 卡片跑馬燈樣式 */
.card-carousel-section {
  width: 100%;
  margin: 40px 0 0 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, #006FBB 0%, #1F286F 100%);
}

/* 跑馬燈容器 */
.card-carousel {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
  background: transparent;
  z-index: 9;
}

.card-carousel:last-child {
  margin-bottom: 0;
}

/* 跑馬燈軌道 */
.carousel-track {
  display: flex;
  align-items: center;
  height: 100%;
  position: absolute;
  top: 0;
  min-width: 100%; /* 確保軌道有最小寬度 */
  will-change: transform; /* 優化動畫效能 */
  /* 動畫由 JavaScript requestAnimationFrame 控制 */
}

/* 跑馬燈中的卡片項目 */
.carousel-card {
  flex-shrink: 0;
  width: 180px;
  height: 100px;
  margin: 0 15px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* 卡片圖片 */
.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* 載入中的佔位符 */
.loading-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Portrait 方向卡片樣式 - 確保圖片完整顯示 */
.carousel-card.portrait-card {
  width: 120px; /* 較窄的寬度適合直向卡片 */
  height: 140px; /* 增加高度以更好地顯示直向卡片 */
}

.carousel-card.portrait-card img {
  object-fit: contain; /* 確保圖片完整顯示，不裁切 */
}

/* Hover 效果 */
.carousel-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.carousel-card:hover img {
  transform: scale(1.02);
}

.investing-warning {
  font-family: 'Noto Sans', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  margin: 20px 0 10px 0;
}

.investing-warning-text {
  font-family: 'Noto Sans', 'sans-serif';
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  line-height: 1.2;
  padding: 0 10px; 
}

.investing-warning-filtered-section {
  font-family: 'Noto Sans', 'sans-serif';
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: #5B5B5B;
  text-align: center;
  margin: 100px 0 10px 0;
}



/* 暫停動畫由 JavaScript requestAnimationFrame 控制 */

/* 響應式設計 */
@media (max-width: 834px) {
  .card-carousel-section {
    margin: 30px 0 0 0;
  }
  
  .card-carousel {
    height: 100px;
    margin-bottom: 15px;
  }
  
  .carousel-card {
    width: 150px;
    height: 80px;
    margin: 0 12px;
  }
  
  /* 平板版 Portrait 卡片樣式 */
  .carousel-card.portrait-card {
    width: 100px;
    height: 120px; /* 增加高度以更好地顯示直向卡片 */
  }
  
  .white-triangle-divider::before{
    margin-bottom: -229px;
  }
}

@media (max-width: 480px) {
  .card-carousel-section {
    margin: 20px 0 0 0;
  }
  
  .card-carousel {
    height: 170px;
    margin-bottom: 10px;
  }
  
  .carousel-card {
    width: 120px;
    height: 65px;
    margin: 0 10px;
  }
  
  /* 手機版 Portrait 卡片樣式 */
  .carousel-card.portrait-card {
    width: 80px;
    height: 100px; /* 增加高度以更好地顯示直向卡片 */
  }
  
  .white-triangle-divider {
    position: relative;
    width: 100vw;
    height: 156px;
    overflow: visible;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -100px;
    z-index: 1;
  }

  .white-triangle-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    background: #FFFFFF;
    width: 100vw;
    height: 100%;
    clip-path: polygon(0% 0%, 0% 100%, 100% 0%);
    margin-bottom: -174px;
    z-index: 1;
  }

}