.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width = 9 / 16 = 0.5625) */
  /* For 4:3 aspect ratio, use padding-bottom: 75%; (height / width = 3 / 4 = 0.75) */
  height: 0;
  overflow: hidden;
  max-width: 100%; /* Ensures it doesn't overflow its parent */
  background: #000; /* Optional: Black background while loading or if video fails */
}

.video-container video,
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}