/**** YouTube Video Modal *****/
.program-promo-video-wrapper {
  background-color: #f4f4f8;
  padding-bottom: 2em;
}

.program-promo-video {
  background: url("/academics/culinary/images/culinary-video-poster5.jpg");
  background-size: cover;
  background-position: bottom center;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.program-promo-video__text {
	position: absolute;
	top: 0;
	font-size: 1.125rem;
	font-size: clamp(1.125rem, 0.592rem + 2.667vw, 2.625rem);
	text-align: center;
	text-shadow: 0 0 15px rgba(0,0,0,0.75);
	font-weight: bold;
	color: white;
	background-color: rgba(0,0,0,0.25);
	width: 100%;
	padding: 1rem;
	backdrop-filter: blur(5px);
}

@media screen and (min-width: 768px) {
  .program-promo-video {
    height: 450px;
  }
}

@media screen and (min-width: 942px) {
  .program-promo-video-wrapper {
    padding-top: 4rem;
    padding-bottom: 0;
  }
}

/* YT Modal Specific Styles */
.yt-modal-open {
  background: #ff3232;
  border: none;
  display: block;
  width: 4em;
  height: 4em;
  border-radius: 50%;
  font-size: 1.5em;
  color: #fff;
  transition: 0.3s;
  cursor: pointer;
  box-shadow: 0 0 20px black;
}

/* Better visual alignment for the play button  */
.yt-modal-open .fa-play {
  padding-left: 6px;
}

.yt-modal-open:hover {
  background: #fff;
  color: #ff3232;
}

/* Modal Background */
.yt-modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  width: 100dvw;
  height: 100dvh;
  backdrop-filter: blur(5px);
  overflow-y: scroll;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: opacity 0.4s ease-in-out;
  z-index: 20;
}

/* Hide the modal */
.yt-modal-bg {
  display: none;
  opacity: 0;
}

/* Close Button */
.yt-modal-close {
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  line-height: 1;
  position: fixed;
  top: 4px;
  left: 4px;
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  opacity: 0.8;
}

.yt-modal-close:focus,
.yt-modal-close:hover {
  opacity: 1;
}

/* Modal Container */
.yt-modal {
  width: 90vw;
  position: relative;
  padding-top: 56.25%;
  margin: 3em 0;
}

.yt-modal iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Limit the video growth at larger screen sizes. */
@media screen and (min-width: 1000px) {
  .yt-modal {
    padding-top: 0;
    width: 960px;
    aspect-ratio: 16/9;
  }
}