/* Mountaineer Maintenance job gallery: everything scoped to #mm-gallery / .mmg-* */
#mm-gallery { --mmg-gap: 12px; --mmg-radius: 6px; --mmg-accent: currentColor; width: 100%; }
#mm-gallery.mmg-loading { min-height: 240px; }
#mm-gallery .mmg-job { margin: 0 0 40px; }
/* Job headings sit under the page's own "Recent Jobs" h6, so keep them subordinate to it. */
#mm-gallery .mmg-title { margin: 0 0 12px; font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: .02em; opacity: .85; }
#mm-gallery .mmg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--mmg-gap);
}
#mm-gallery .mmg-tile {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  border: 0; border-radius: var(--mmg-radius); overflow: hidden; cursor: pointer;
  background: #ddd; aspect-ratio: 4 / 3; line-height: 0;
}
#mm-gallery .mmg-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
#mm-gallery .mmg-tile:hover img, #mm-gallery .mmg-tile:focus-visible img { transform: scale(1.04); }
#mm-gallery .mmg-tile:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
#mm-gallery .mmg-play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(0, 0, 0, .6); box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
#mm-gallery .mmg-play::after {
  content: ""; position: absolute; left: 22px; top: 17px;
  border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff;
}

.mmg-noscroll { overflow: hidden; }
dialog.mmg-lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0;
  border: 0; background: rgba(0, 0, 0, .94); color: #fff;
}
dialog.mmg-lightbox::backdrop { background: rgba(0, 0, 0, .94); }
dialog.mmg-lightbox .mmg-stage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 16px;
}
dialog.mmg-lightbox .mmg-stage img,
dialog.mmg-lightbox .mmg-stage video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
dialog.mmg-lightbox .mmg-nav,
dialog.mmg-lightbox .mmg-close {
  position: absolute; z-index: 2; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; border-radius: 50%;
  width: 48px; height: 48px; font-size: 34px; line-height: 46px; text-align: center;
}
dialog.mmg-lightbox .mmg-nav:hover, dialog.mmg-lightbox .mmg-close:hover { background: rgba(255, 255, 255, .25); }
dialog.mmg-lightbox .mmg-prev { left: 12px; top: 50%; margin-top: -24px; }
dialog.mmg-lightbox .mmg-next { right: 12px; top: 50%; margin-top: -24px; }
dialog.mmg-lightbox .mmg-close { right: 12px; top: 12px; font-size: 30px; }
dialog.mmg-lightbox [hidden] { display: none; }

@media (max-width: 600px) {
  #mm-gallery .mmg-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  dialog.mmg-lightbox .mmg-nav { top: auto; bottom: 12px; margin-top: 0; }
  dialog.mmg-lightbox .mmg-stage { padding: 64px 0 72px; }
}
@media (prefers-reduced-motion: reduce) {
  #mm-gallery .mmg-tile img { transition: none; }
}
