/* KEY MOMENTS gallery (16 Nov 2026) — the shared photo/video gallery used on chapter pages and on
   Knowledge Partner / MoU pages (Views/Shared/_KeyMoments.cshtml + js/public/key-moments.js).
   One large main area + a thumbnail strip. Shares only V4 tokens; images open in the shared viewer.
   Class names keep their original chp-gal prefix (first built for chapters). */
.dma3d .chp-gal { max-width: 100%; }
.dma3d .chp-gal__stage { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--dark) 92%, var(--green));
  box-shadow: 5px 8px 0 color-mix(in srgb, var(--saffron) 14%, transparent), 5px 8px 24px color-mix(in srgb, var(--dark) 12%, transparent); }
.dma3d .chp-gal__slide { position: absolute; inset: 0; margin: 0; animation: chpGalIn .45s ease; }
.dma3d .chp-gal__slide[hidden] { display: none; }
@keyframes chpGalIn { from { opacity: 0; } to { opacity: 1; } }
.dma3d .chp-gal__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.dma3d .chp-gal__zoom--video { position: relative; cursor: pointer; background: #000; }
.dma3d .chp-gal__img { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.dma3d .chp-gal__cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 34px 70px 14px 18px; color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1.35; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0)); }
.dma3d .chp-gal__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px;
  border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; text-decoration: none;
  background: color-mix(in srgb, var(--saffron) 90%, transparent); box-shadow: 0 6px 22px rgba(0,0,0,.4);
  transition: transform .2s ease; }
.dma3d .chp-gal__play svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }
.dma3d .chp-gal__play[hidden] { display: none; }
.dma3d .chp-gal__arrow, .dma3d .chp-gal__auto { position: absolute; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0,0,0,.5); transition: background .15s; }
.dma3d .chp-gal__arrow { top: 50%; transform: translateY(-50%); }
.dma3d .chp-gal__arrow--prev { left: 12px; }
.dma3d .chp-gal__arrow--next { right: 12px; }
.dma3d .chp-gal__arrow svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.dma3d .chp-gal__auto { top: 12px; right: 12px; width: 36px; height: 36px; }
.dma3d .chp-gal__auto[hidden] { display: none; }
.dma3d .chp-gal__auto svg { width: 16px; height: 16px; fill: currentColor; }
.dma3d .chp-gal__auto .chp-gal__ic-play { display: none; }
.dma3d .chp-gal__auto.is-paused .chp-gal__ic-play { display: block; }
.dma3d .chp-gal__auto.is-paused .chp-gal__ic-pause { display: none; }
.dma3d .chp-gal__arrow:focus-visible, .dma3d .chp-gal__auto:focus-visible, .dma3d .chp-gal__play:focus-visible,
.dma3d .chp-gal__zoom:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }

/* Thumbnail strip: scrolls sideways inside itself, never the page. */
.dma3d .chp-gal__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none;
  contain: inline-size; }
.dma3d .chp-gal__thumbs::-webkit-scrollbar { display: none; }
.dma3d .chp-gal__thumb { position: relative; flex: 0 0 132px; aspect-ratio: 16 / 9;   /* same shape as the main area, so a CMS crop reads the same (17 Nov 2026) */
   padding: 0; border-radius: 9px; overflow: hidden;
  cursor: pointer; border: 1px solid transparent; background: color-mix(in srgb, var(--dark) 85%, var(--green)); opacity: .72;   /* thin edge (DMA, 16 Nov 2026; was 3px) */
  transition: opacity .15s, border-color .15s; }
.dma3d .chp-gal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dma3d .chp-gal__thumb[aria-current="true"] { border-color: var(--saffron); opacity: 1; }
.dma3d .chp-gal__thumb:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.dma3d .chp-gal__thumbplay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.dma3d .chp-gal__thumbplay svg { width: 26px; height: 26px; padding: 6px 5px 6px 7px; box-sizing: border-box; border-radius: 50%; fill: #fff;
  background: color-mix(in srgb, var(--saffron) 88%, transparent); }
@media (hover: hover) {
  .dma3d .chp-gal__arrow:hover, .dma3d .chp-gal__auto:hover { background: rgba(0,0,0,.72); }
  .dma3d .chp-gal__play:hover, .dma3d .chp-gal__zoom--video:hover .chp-gal__play { transform: translate(-50%, -50%) scale(1.06); }
  .dma3d .chp-gal__thumb:hover { opacity: 1; }
}
@media (max-width: 600px) {
  .dma3d .chp-gal__thumb { flex-basis: 96px; }
  .dma3d .chp-gal__arrow { width: 36px; height: 36px; }
  .dma3d .chp-gal__play { width: 58px; height: 58px; }
  .dma3d .chp-gal__cap { font-size: 13px; padding: 26px 56px 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dma3d .chp-gal__slide { animation: none; }
  .dma3d .chp-gal__play, .dma3d .chp-gal__thumb { transition: none; }
}
