/* Sunny Video — 풀페이지 배경 동영상 섹션 (rem 베이스: html 10px) */
.sunny-video {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #000000;
  box-sizing: border-box;
}

.sunny-video *,
.sunny-video *::before,
.sunny-video *::after {
  box-sizing: border-box;
}

/* ★ 핵심수정: 비디오가 뜨기 전 스테이지 자체에 썸네일 포스터 배경화 */
.sunny-video__stage {
  position: static;
  width: 100%;
  height: 100%;
  overflow: hidden;
  
  /* PHP단에서 넘겨받은 썸네일 경로(--video-poster)를 배경으로 처리 */
  background-image: var(--video-poster);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* ★ 핵심수정: Vimeo iframe 비율 고정 및 여백 터짐 방어 */
.sunny-video__player {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  display: block;
  
  /* 16:9 비율을 유지하면서 100vh/100vw 전체를 어떤 해상도든 꽉 채우도록 스케일 계산 */
  width: 177.78vh; /* 16/9 = 1.7778 */
  height: 56.25vw; /* 9/16 = 0.5625 */
  
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%); /* 화면 한가운데 정렬 */
  
  /* 비메오 내부 로드가 완료되면 이 배경색이 투명해지면서 뒷배경의 포스터를 가리고 자연스럽게 재생됨 */
  background-color: transparent; 
  pointer-events: none; /* 영상 위 클릭 차단하여 배경화 유지 */
}

#previewContent .sunny-video__player {
  pointer-events: auto;
}

.sunny-video--empty .sunny-video__player {
  opacity: 0;
}

.sunny-video__placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111111;
  pointer-events: none;
}

.sunny-video__placeholder-label {
  color: rgba(255, 255, 255, 0.35);
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .sunny-video {
    height: auto;
    min-height: 100%;
    aspect-ratio: 16/9;
  }

  .sunny-video__player {
    width: 100%;
    height: 100%;
    transform: none;
    top: 0;
    left: 0;
  }

  .sunny-video__placeholder-label {
    font-size: 2rem;
    line-height: 1.4;
  }
}