/******************************************************************/
/*                CUSTOM EMBEDDED VIDEO CONTAINERS                */
/******************************************************************/

/*  Basically allows for:                                         */
/*      Sizing proportional to the image/text section ratio       */
/*      Filling background behind video if ratio isn't 16:9       */
/*      Custom thumbnails/play buttons to bypass initial YouTube  */
/*      iframe branding and heavy load scripts                    */
/*      Sticky video for two-column desktop scroll if the text    */
/*      column runs long (adaptable for if there's FAU alerts in  */
/*      the site header)                                          */
/*                                                                */
/*  URL PARAMETER TIPS (for iframes ):                            */
/*    autoplay=1   : Starts playback immediately upon clicking    */
/*    rel=0        : Limits end-screen video suggestions to our   */
/*                   channel's videos                             */
/*    controls=0   : Hides the bottom scrub bar and controls      */
/*    cc_load_policy=1 Forces CC to start on                      */
/*    cc_lang_pref=en Forces CC in English/es for Spanish, use    */
/*                    with above                                  */
/*    loop=1&playlist=VIDEO_ID   Loops vid infinitely             */
/*    mute=1         Mutes on load, use with autplay=1 to prevent */
/*                   browser blocking                             */
/*    start=X, end=Y Clips                                        */
/*    youtube-nocookie.com  Does what it says on the tin          */
/*    playsinline=1  Prevents video expanding to fullsized player */
/*                   on mobile                                    */
/*    color=white    Changes scrub bar to white                   */
/* enablejsapi=1&origin=YOUR_DOMAIN                               */
/*                   Allows JS API tracking via goople analytics  */
/*                                                                */
/*  THUMBNAIL CDN FORMAT (https://img.youtube.com/vi/[ID]/):      */
/*  - maxresdefault.jpg (Full HD 1080p cover frame)               */
/*  - hq1.jpg, hq2.jpg, hq3.jpg (High-res video timeline stills)  */
/******************************************************************/

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(136deg, var(--fau-red, #cc0000) 0%, #002142 112.25%);
}
.video-embed img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.video-embed:hover img { transform: scale(1.03); }
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* custom play button */
.video-embed .play-btn {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-grid;
  place-items: center;
  background: var(--fau-red, #cc0000);
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  padding: 0;
  cursor: pointer;
  z-index: 6;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.video-embed .play-btn svg {
  width: 36px;
  height: 36px;
  display: block;
  pointer-events: none;
}
.video-embed .play-btn:hover { transform: translate(-50%, -50%) scale(1.1); background: var(--fau-blue, #003366); }
.video-embed .play-btn:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.55); }
/* override theme heading spacing in split rows */
/* flag for like maybe generic stylesheet */
.video-embed-split h2 {
  margin-top: 0 !important;
  margin-bottom: 0.75rem !important;
}
/* optional sticky video while reading longer bios on desktop */
@media screen and (min-width: 992px) {
  .content:has(.sticky-video) {
    overflow-x: clip !important;
    overflow-y: clip !important;
  }
  .video-embed.sticky-video { 
    position: sticky;
    top: calc(var(--dynamic-header-height, 132px) + var(--alert-height, 0px) + 1.5rem);
  }
}
body, main, .page-wrapper {
  overflow-x: clip;
}
/* mobile handling */
@media (prefers-reduced-motion: reduce) {
  .video-embed img,
  .video-embed .play-btn { transition: none;}
  .video-embed:hover img {transform: none; }
  .video-embed .play-btn:hover {transform: translate(-50%, -50%); }
}
/* and a slightly smaller play button */
@media screen and (max-width: 991px) {
  .video-embed { width: calc(100% - 4rem); margin: 0 auto; }
  .video-embed .play-btn { width: 56px; height: 56px; }
  .video-embed .play-btn .material-symbols-rounded { font-size: 28px; }
}