/* YT Modal – tweak the variables to match the theme */
.yt-modal {
  --yt-overlay: rgba(0, 0, 0, 0.8);
  --yt-max-width: 964px;
  --yt-close-color: #fff;
  --yt-speed: 0.3s;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 20px;
  opacity: 0;
  transition: opacity var(--yt-speed) ease;
}
 
.yt-modal[hidden] {
  display: none;
}
 
.yt-modal.is-open {
  opacity: 1;
}
 
.yt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--yt-overlay);
  cursor: pointer;
}
 
.yt-modal__dialog {
  position: relative;
  width: 100%;
  /* Never wider than the screen height allows at 16:9 (landscape phones) */
  max-width: min(var(--yt-max-width), calc((100vh - 100px) * 16 / 9));
  max-width: min(var(--yt-max-width), calc((100dvh - 100px) * 16 / 9));
  transform: scale(0.9);
  transition: transform var(--yt-speed) ease;
}
 
.yt-modal.is-open .yt-modal__dialog {
  transform: scale(1);
}
 
.yt-modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}
 
.yt-modal__frame iframe,
.yt-modal__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
 
/* Portrait / non-16:9 MP4s are letterboxed rather than cropped */
.yt-modal__frame video {
  object-fit: contain;
}
 
.yt-modal__error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  color: #fff;
  text-align: center;
  font: 16px/1.4 Arial, sans-serif;
}
 
.yt-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yt-close-color);
  font: 40px/44px Arial, sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
 
.yt-modal__close:focus-visible {
  outline: 2px solid var(--yt-close-color);
  outline-offset: 2px;
}
 
/* Lock page scroll while open */
html.yt-modal-active {
  overflow: hidden;
}

.wp-block-hero-block .play-video {
  position: absolute;
  bottom: 3rem;
  right: 5rem;
  width: 5.5rem;
  height: 5.5rem;
  z-index: 999;
}

.wp-block-hero-block .play-video img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: 0.1s ease;
}

.wp-block-hero-block .play-video:hover img {
  opacity: 1;
}

@media screen and (max-width: 767px) {
	
	.wp-block-hero-block a.play-video {
	  bottom: 4rem;
	  right: 3rem;
	  width: 4rem;
	  height: 4rem;
	}
	
}

@media (prefers-reduced-motion: reduce) {
  .yt-modal,
  .yt-modal__dialog {
    transition: none;
  }
}
