body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

.container {
  max-width: 1140px; /* Adjust width for 3 thumbnails with margins */
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

h1 {
  margin-bottom: 20px;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; /* Center thumbnails horizontally */
  margin-bottom: 15px;
}

.thumbnail-container {
  display: flex; /* New styles for title and image pair */
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px; /* Adjust spacing between items */
}

.thumbnail-title {
  text-align: center; /* Center text horizontally */
  width: 100%; /* Match image width */
  margin-bottom: 6px; /* Adjust spacing between title and image */
  font-family: Arial, sans-serif;
  font-size: 11pt;
  color: #5094ac;
}

/* 
  KEY CHANGE: We apply the same styling to the thumbnail 'img' AND any 'video'
  that might replace it. This keeps the layout consistent.
*/
.thumbnail-container img,
.thumbnail-container video {
  width: 300px;
  height: 169px;
  border-radius: 15px;
  box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.5);
  margin: 9px;
  object-fit: cover; /* Ensures video/poster fills the space */
}

/* We only want the cursor and hover effect on the image, not the video */
.thumbnail-container img {
  cursor: pointer;
  transition: transform 0.2s ease-in-out; /* Defines smooth transition for 0.2s */
}

.thumbnail-container img:hover {
  transform: scale(1.05); /* Increase size by 5% */
}


/* Media queries for responsive layout (Unchanged) */
@media (max-width: 991px) and (min-width: 768px) {
  .container {
    max-width: 740px;
  }
  .thumbnail-container img, .thumbnail-container video {
    width: calc(100% - 20px);
  }
}

@media (max-width: 767px) and (min-width: 576px) {
  .container {
    max-width: 300px;
  }
  .thumbnail-container img, .thumbnail-container video {
    width: 300px;
  }
}

@media (max-width: 575px) {
  .container {
    max-width: 300px;
  }
  .thumbnail-container img, .thumbnail-container video {
    width: 100%;
  }
}

/* DELETED: All styles for .video-popup, .video-container, and .close-btn are removed. */