/* 한 행에 두 콘텐츠 동일폭 배치 */

.row.justify-content-center.align-items-center.g-4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* 각각 동일한 너비로 강제, position: relative */

.row.justify-content-center.align-items-center.g-4 > div {
  flex: 1 1 45%;
  max-width: 45%;
  position: relative;
}

/* 썸네일 이미지 16:9, 동일크기 */

.video-thumb img.img-fluid {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0.375rem;
}

/* iframe도 16:9 */

#iframe-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
  max-width: 853px;
}

#iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 모바일 반응형 */

@media (max-width: 900px) {
  .row.justify-content-center.align-items-center.g-4 {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .row.justify-content-center.align-items-center.g-4 > div {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* youtube */

#video-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.88);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

#video-popup.active {
  display: flex;
}

#video-popup .modal-content {
  position: relative;
  width: 92vw;
  max-width: 900px;
  background: #111;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
}

#popup-iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: none;
  background: #000;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: #fff;
  color: #333;
  font-weight: bold;
  border: none;
  font-size: 1.4rem;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 썸네일 버튼 */

.yt-thumb-btn {
  display: inline-block;
  cursor: pointer;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.16);
  position: relative;
}

.yt-thumb-btn .thumb-img-1 {
  width: 700px;
  height: 450px;
  background: #222 center center/cover no-repeat;
}

.yt-thumb-btn .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 80px;
  height: 80px;
  /*background: url('https://img.icons8.com/ios-filled/100/ff0000/circled-play.png') center/cover no-repeat;*/
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle fill="white" cx="50" cy="50" r="50"/><polygon fill="red" points="40,30 70,50 40,70"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.88;
  pointer-events: none;
}

@media (max-width:700px) {
  #popup-iframe {
    height: 210px;
  }
}

@media (max-width:700px) {
  #video-popup .modal-content {
    width: 98vw;
  }
}

@media (max-width:620px) {
  .yt-thumb-btn .thumb-img-1 {
    width: 90vw;
    height: calc(98vw * 0.5625);
    min-width: 180px;
    min-height: 110px;
  }
}

@media (max-width:620px) {
  .yt-thumb-btn .play-icon {
    width: 60px;
    height: 60px;
  }
}

