/* ========================================
   COM/Basic_video - 영상 썸네일 + 모달 위젯
   img1(대체이미지) = iframe 영상소스
   img2(첨부이미지) = 썸네일
======================================== */

/* ===== 영상 영역 ===== */
.Basic_video .wg_img_box {
  position: relative;
  overflow: hidden;
  border-radius: clamp(8px, calc(0.625vw + 6px), 16px);
  cursor: pointer;
  background: #000;
  aspect-ratio: 16 / 9;
}

/* 썸네일 이미지 (img2) */
.Basic_video .wg_img2 {
  width: 100%;
  height: 100%;
  position: relative;
}

.Basic_video .wg_img2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.Basic_video .wg_box_in:hover .wg_img2 img {
  transform: scale(1.06);
}

/* 정지 프레임 iframe (img1 - 썸네일 없을 때) */
.Basic_video .wg_img1 {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 어두운 오버레이 */
.Basic_video .bv_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 2;
  transition: background 0.4s ease;
  pointer-events: none;
}

.Basic_video .wg_box_in:hover .bv_overlay {
  background: rgba(0, 0, 0, 0.1);
}

/* 플레이 버튼 */
.Basic_video .bv_play_btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.Basic_video .bv_play_btn i {
  font-size: clamp(44px, calc(2.5vw + 36px), 68px);
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease;
}

.Basic_video .wg_box_in:hover .bv_play_btn {
  transform: translate(-50%, -50%) scale(1.15);
}

.Basic_video .wg_box_in:hover .bv_play_btn i {
  color: var(--primary, #f0473e);
}

/* ===== 이미지 위 텍스트 오버레이 ===== */
.Basic_video .bv_img_overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 4;
  pointer-events: none;
  border-radius: 0 0 clamp(8px, calc(0.625vw + 6px), 16px) clamp(8px, calc(0.625vw + 6px), 16px);
}

.Basic_video .bv_img_txt {
  color: #fff;
  font-size: clamp(1.3rem, calc(0.16vw + 12.5px), 1.6rem);
  font-weight: 500;
  line-height: 1.5;
  pointer-events: auto;
  position: relative;
  z-index: 5;
}

/* ===== 모달 ===== */
.bv_modal_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bv_modal_overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.bv_modal_wrap {
  width: 90%;
  max-width: 1060px;
  position: relative;
}

.bv_modal_video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.bv_modal_video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.bv_modal_close {
  position: absolute;
  top: -44px;
  right: 0;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 10px;
  line-height: 1;
  transition: color 0.2s;
}

.bv_modal_close:hover {
  color: var(--primary, #f0473e);
}
