/* 影片輪播樣式 */
.p-video-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.p-video-carousel__container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 比例 */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.p-video-carousel__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: none;
}

.p-video-carousel__item.is-active {
  opacity: 1;
  display: block;
}

.p-video-carousel__item .p-video-card {
  width: 100%;
  height: 100%;
  margin: 0;
  box-shadow: none;
}

.p-video-carousel__item .p-video-embed {
  height: 100%;
  padding-bottom: 0;
}

.p-video-carousel__item .p-video-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
  padding: 10px 15px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between; /* 左右兩端對齊 */
  align-items: center; /* 垂直居中 */
  height: 60px; /* 固定高度 */
  z-index: 5; /* 確保在其他元素上方 */
}

.p-video-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #231815;
  flex: 1; /* 讓標題佔據剩餘空間 */
  text-align: left; /* 標題靠左對齊 */
  padding-right: 15px; /* 與按鈕保持距離 */
}

/* 輪播導航按鈕 */
.p-video-carousel__nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
}

.p-video-carousel__nav-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #231815;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.p-video-carousel__nav-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.p-video-carousel__nav-btn:active {
  transform: scale(0.95);
}

/* 輪播指示器 */
.p-video-carousel__indicators {
  position: absolute;
  bottom: 70px; /* 調整底部距離，放在按鈕上方 */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.p-video-carousel__indicator {
  width: 12px;
  height: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.p-video-carousel__indicator.is-active {
  background: #ee4d2d;
  transform: scale(1.2);
}

.p-video-carousel__indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* 前往頻道按鈕樣式 */
.p-video-cta-btn {
  white-space: nowrap; /* 防止按鈕文字換行 */
  padding: 8px 16px;
  min-width: 100px; /* 確保按鈕有最小寬度 */
  text-align: center; /* 文字居中 */
}

/* 手機版輪播調整 */
@media (max-width: 767px) {
  .p-video-carousel__nav-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .p-video-carousel__indicators {
    bottom: 70px;
  }
  
  .p-video-carousel__indicator {
    width: 10px;
    height: 10px;
  }
  
  .p-video-title {
    font-size: 14px;
    line-height: 1.3;
    max-width: 65%; /* 限制標題寬度，避免擠壓按鈕 */
  }
  
  .p-video-carousel__item .p-video-actions {
    padding: 10px 12px;
  }
  
  .p-video-cta-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 90px;
  }
}
