.video-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: .5rem;
  background: #252c2c;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(8.5rem, 7vw, 5rem);
  aspect-ratio: 1.56;
  place-items: center;
  border-radius: .7rem;
  color: #fff;
  background: rgba(12, 16, 16, .46);
  transform: translate(-50%, -50%);
  transition: background .2s ease;
}

.video-play::after {
  margin-left: .2rem;
  border-block: clamp(.42rem, 1vw, .64rem) solid transparent;
  border-left: clamp(.72rem, 1.5vw, 1.03rem) solid currentColor;
  content: "";
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
}

.video-card:is(:hover, :focus-visible) .video-play {
  background: rgba(12, 16, 16, .63);
}

.video-card:focus-visible {
  border-radius: .5rem;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.video-library {
  align-self: center;
  width: min(100% - 2 * clamp(1.15rem, 4vw, 3.5rem), 51rem);
  margin: clamp(1.25rem, 4vw, 3rem) auto;
}

.video-library-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.video-library-grid {
  display: grid;
  gap: clamp(.85rem, 2vw, 1.65rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

body:has(.video-lightbox[open]) {
  overflow: hidden;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  width: min(calc(100% - 1.25rem), 62rem);
  max-width: none;
  max-height: calc(100% - 1.25rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: .8rem;
  color: #222927;
  background: #f7f7f5;
  box-shadow: 0 1rem 3.5rem rgba(23, 28, 27, .24);
}

.video-lightbox[open] {
  animation: video-lightbox-in .22s ease-out;
}
h2#video-lightbox-title {
    color: black !important;
    font-weight: 200 !important;
}
.video-lightbox::backdrop {
  background: rgba(231, 236, 233, .58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.video-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .45rem .65rem .45rem clamp(.8rem, 3vw, 1.35rem);
}

.video-lightbox-head h2 {
  margin: 0;
  font-size: clamp(.95rem, 2.5vw, 1.2rem);
  line-height: 1.25;
  font-weight: 300 !important;
  color: black !important;
}

.video-lightbox-close {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid #d2d6d1;
  border-radius: 50%;
  color: inherit;
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.video-lightbox-stage {
  position: relative;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-lightbox-loading {
  position: absolute;
  inset: 50% auto auto 50%;
  width: max-content;
  margin: 0;
  color: #fff;
  font-size: .95rem;
  transform: translate(-50%, -50%);
}

.video-lightbox-player {
  position: absolute;
  inset: 0;
}

.video-lightbox-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
}

.video-lightbox-foot {
  padding: clamp(.8rem, 2.25vw, 1.25rem) clamp(.8rem, 3vw, 1.35rem);
  text-align: right;
}

.video-lightbox-youtube {
  color: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@keyframes video-lightbox-in {
  from { opacity: 0; transform: translateY(.35rem) scale(.99); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .video-lightbox[open] { animation: none; }
  .video-play { transition: none; }
}
