/* GSM mobile / responsive overrides on top of the legacy theme. */

/* Responsive video embeds — overrides fixed width/height attrs on YouTube/Vimeo iframes */
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="vimeo.com"],
iframe[src*="player.vimeo.com"] {
  display: block;
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border: 0;
  margin: 0 auto;
}

/* Generic responsive iframe fallback when wrapped in .embed-responsive (Bootstrap 3 utility) */
.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}
.embed-responsive::before {
  display: block;
  content: "";
  padding-top: 56.25%; /* 16:9 */
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Ensure images inside legacy body content never overflow on small screens */
@media screen and (max-width: 768px) {
  #page img {
    max-width: 100%;
    height: auto;
  }
  /* Long tables become horizontally scrollable instead of overflowing */
  .table-responsive,
  #page table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Hamburger toggle: hide on desktop, show on mobile */
.js-fh5co-nav-toggle {
  display: none;
}
@media screen and (max-width: 768px) {
  .js-fh5co-nav-toggle {
    display: block;
  }
}
