.youtube-gallery {
  width: min(1120px, 100%);
  margin: 64px auto 10px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.youtube-gallery-heading {
  max-width: 680px;
  margin: 0 auto 28px;
}

.youtube-gallery-heading h3 {
  margin-bottom: 10px;
}

.youtube-gallery-heading p {
  margin: 0;
  line-height: 1.55;
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 18px;
  align-items: start;
  text-align: left;
}

.youtube-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #466b7a;
  border-radius: 5px;
  background: linear-gradient(155deg, #0a2431, #04151f);
  box-shadow: 0 15px 35px #0004;
}

.youtube-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020b10;
}

.youtube-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-launch {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #020b10;
  color: white;
  cursor: pointer;
}

.youtube-launch.youtube-thumbnail-missing {
  background: radial-gradient(circle at 50% 38%, #1f5368, #061923 68%);
}

.youtube-launch img {
  display: block;
  width: 100%;
  height: 100%!important;
  object-fit: cover;
  transition: transform .28s ease, filter .28s ease;
}

.youtube-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, #01080dbd);
  pointer-events: none;
}

.youtube-play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  padding-left: 3px;
  border: 1px solid #ffffffc9;
  border-radius: 10px;
  background: #ff2c22e8;
  box-shadow: 0 5px 22px #000a;
  font-size: 20px;
  line-height: 1;
}

.youtube-launch:hover img,
.youtube-launch:focus-visible img {
  transform: scale(1.035);
  filter: brightness(1.08);
}

.youtube-launch:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: -3px;
}

.youtube-card-copy {
  display: grid;
  gap: 7px;
  padding: 15px 16px 17px;
}

.youtube-card-copy h4 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.35;
}

.youtube-card-copy time {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.youtube-channel-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--blue);
  font-size: 13px;
}

@media (max-width: 900px) {
  .youtube-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .youtube-gallery {
    margin-top: 46px;
  }

  .youtube-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .youtube-launch img {
    transition: none;
  }
}
