#page-video {
  margin-bottom: 50px;
  padding-bottom: 50px;
  background-color: aliceblue;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#page-video h1 {
  color: black;
  margin-top: 10px;
  margin-bottom: 10px;
}

.youtube-wrapper {
  z-index: 3;
  position: relative;
  width: 96%;
  max-width: 800px;
  aspect-ratio: 16/9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

.video-thumbnails {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  width: 96%;
  max-width: 800px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.video-thumbnails button {
  flex: 0 0 calc(20% - 8px);
  max-width: calc(20% - 8px);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}

.video-thumbnails button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.video-thumbnails button:hover img,
.video-thumbnails button:focus-visible img {
  transform: scale(1.05);
}

.video-thumbnails button:hover,
.video-thumbnails button:focus-visible {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.video-thumbnails button:focus-visible {
  outline: 2px solid dodgerblue;
  outline-offset: 2px;
}

.video-thumbnails::-webkit-scrollbar {
  display: none;
}
.video-thumbnails {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@media (max-width: 768px) {
    .video-thumbnails {
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow-x: hidden;
    }

    .video-thumbnails button {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }
}
