/* 🟢 FIX: Remove top margins causing white gaps */
.video-section.page-width {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
}

/* Ensure the section has no default browser margins */
.video-section {
  margin-top: -25px !important;
  padding: 0 !important;
}

/* Container for the video (keeps aspect ratio) */
.video-section__media {
  position: relative;
  padding-bottom: 56.25%; /* Default 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
}

@media only screen and (min-width: 750px) {
  /* Ensure we maintain 16:9 on desktop */
  .video-section__media {
    padding-bottom: 56.25%; 
  }
}

.video-section__media.deferred-media {
  overflow: visible;
}

.video-section__poster.deferred-media__poster:focus {
  outline-offset: 0.3rem;
}

.video-section__media iframe {
  background-color: rgba(var(--color-foreground), 0.03);
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-section__poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* === 📱 Mobile Video Logic === */
.video-wrapper-mobile {
  display: none; /* Hidden by default on desktop */
}

/* When screen is smaller than 750px (Mobile) */
@media screen and (max-width: 749px) {
  /* Hide desktop video IF mobile video exists */
  .video-wrapper-desktop.has-mobile-video {
    display: none !important;
  }
  /* Show mobile video */
  .video-wrapper-mobile {
    display: block !important;
  }
}