.motorsport-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 620px);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.motorsport-carousel {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1;
  background: #211d24;
  overflow: hidden;
}
.motorsport-carousel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.motorsport-carousel img[hidden] { display: none; }
.motorsport-controls {
  position: absolute;
  inset: auto 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}
.motorsport-controls button, .motorsport-controls span {
  background: #211d24;
  color: white;
  border-radius: 4px;
}
.motorsport-controls button {
  border: 1px solid white;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 24px;
}
.motorsport-controls span { padding: 4px 9px; }
@media (max-width: 800px) {
  .motorsport-layout { grid-template-columns: minmax(0, 1fr); }
  .motorsport-carousel { justify-self: center; }
}
.motorsport-carousel img[src$="supercar-track.webp"] { object-position: center 85%; }
.motorsport-carousel img[src$="supercar-pit.webp"] { object-position: center 75%; }
.motorsport-carousel img[src$="supercars-drivers.webp"] { object-position: center 37%; }
.motorsport-controls .motorsport-playback {
  width: auto;
  padding: 0 10px;
  font: inherit;
}

.motorsport-carousel img.motorsport-poster {
  box-sizing: border-box;
  padding-bottom: 3.5rem;
  object-fit: contain;
}

.motorsport-carousel:has(.motorsport-poster:not([hidden]))::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: #211d24 url("img/motorsport-kahlai.webp") center / cover no-repeat;
  filter: blur(20px) brightness(.55);
}

.motorsport-carousel img.motorsport-poster {
  position: relative;
}
