.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
}

/* 모달 박스: 화면 중앙, 최대 높이 제한 */
.modal-content {
  background: #fff;
  width: 92%;
  max-width: 900px;
  height: 90vh;                 /* ✅ 고정 “최대” 높이 컨셉 */
  margin: 5vh auto 0;           /* ✅ 위에서 5vh 내려오게 */
  border: 1px solid #888;
  border-radius: 12px;
  position: relative;
  overflow: hidden;             /* ✅ 내부(iframe)만 스크롤 */
}

/* 닫기 버튼 */
.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 28px;
  font-weight: bold;
  z-index: 10;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* iframe: 모달 박스 내부를 꽉 채우되, 닫기 버튼 영역만큼 위 여백 */
#modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 닫기 버튼이 내용 가리는 것 방지: iframe에 상단 패딩 대신 wrapper를 쓰는 게 정석인데,
   CSS만으로 최소한 확보하려면 close 버튼을 흰 배경 위에 올려둠 */

   .video-wrapper {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 비율 */
  height: 0;
  margin-bottom: 20px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}