.gmg-gallery{position:relative;max-width:var(--gmg-max);margin-inline:auto;box-sizing:border-box}.gmg-gallery *{box-sizing:border-box}.gmg-items,.gmg-track{gap:var(--gmg-gap)}.gmg-item{margin:0;min-width:0}.gmg-item img,.gmg-item video{display:block;width:100%;height:auto}.gmg-item video{background:#000}.gmg-item figcaption{margin-top:6px;font-size:.9em;line-height:1.4}.gmg-lightbox-trigger,.gmg-thumb-button{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer}.gmg-layout-grid .gmg-items{display:grid;grid-template-columns:repeat(var(--gmg-cols-d),minmax(0,1fr))}.gmg-layout-column .gmg-items{display:flex;flex-direction:column}.gmg-layout-column .gmg-item img,.gmg-layout-column .gmg-item video{height:auto;object-fit:contain}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-d);column-gap:var(--gmg-gap)}.gmg-layout-masonry .gmg-item{break-inside:avoid;margin:0 0 var(--gmg-gap)}.gmg-layout-justified .gmg-items{display:flex;flex-wrap:wrap;align-items:stretch}.gmg-layout-justified .gmg-item{flex:1 1 240px}.gmg-layout-justified .gmg-item img,.gmg-layout-justified .gmg-item video{height:220px;object-fit:cover}.gmg-layout-horizontal .gmg-track,.gmg-layout-carousel .gmg-track,.gmg-layout-carousel-thumbs .gmg-track{display:flex;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain}.gmg-layout-horizontal .gmg-track::-webkit-scrollbar,.gmg-layout-carousel .gmg-track::-webkit-scrollbar,.gmg-layout-carousel-thumbs .gmg-track::-webkit-scrollbar{display:none}.gmg-layout-horizontal .gmg-item{flex:0 0 var(--gmg-scroll-w);scroll-snap-align:start}.gmg-layout-carousel .gmg-item,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item{flex:0 0 100%;scroll-snap-align:start}.gmg-layout-carousel .gmg-item img,.gmg-layout-carousel .gmg-item video,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item img,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item video{max-height:80vh;object-fit:contain}.gmg-fit-cover.gmg-ratio-1x1 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-1x1 .gmg-item>img{aspect-ratio:1/1;object-fit:cover}.gmg-fit-cover.gmg-ratio-4x3 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-4x3 .gmg-item>img{aspect-ratio:4/3;object-fit:cover}.gmg-fit-cover.gmg-ratio-16x9 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-16x9 .gmg-item>img{aspect-ratio:16/9;object-fit:cover}.gmg-fit-cover.gmg-ratio-3x4 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-3x4 .gmg-item>img{aspect-ratio:3/4;object-fit:cover}.gmg-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 2px 12px rgba(0,0,0,.12);font-size:28px;line-height:1;cursor:pointer}.gmg-prev{left:10px}.gmg-next{right:10px}.gmg-dots{display:flex;justify-content:center;gap:7px;padding-top:10px}.gmg-dots button{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:currentColor;opacity:.25}.gmg-dots button.is-active{opacity:1}.gmg-thumbs{display:flex;gap:8px;overflow-x:auto;padding-top:10px;scrollbar-width:thin}.gmg-thumbs-top{order:-1;padding-top:0;padding-bottom:10px}.gmg-thumb{flex:0 0 88px}.gmg-thumb img,.gmg-video-thumb{width:88px;height:66px;object-fit:cover}.gmg-video-thumb{display:grid;place-items:center;background:#111;color:#fff;font-size:20px}.gmg-thumb{opacity:.65}.gmg-thumb.is-active{opacity:1}.gmg-lightbox{position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,.92);display:grid;place-items:center;padding:40px}.gmg-lightbox-inner{max-width:min(95vw,1600px);max-height:90vh}.gmg-lightbox img{display:block;max-width:100%;max-height:90vh;width:auto;height:auto}.gmg-lightbox-close{position:fixed;top:14px;right:18px;border:0;background:none;color:#fff;font-size:42px;cursor:pointer}.gmg-lightbox-open{overflow:hidden}@media(max-width:900px){.gmg-layout-grid .gmg-items{grid-template-columns:repeat(var(--gmg-cols-t),minmax(0,1fr))}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-t)}.gmg-layout-justified .gmg-item{flex-basis:180px}.gmg-layout-justified .gmg-item img,.gmg-layout-justified .gmg-item video{height:180px}}@media(max-width:600px){.gmg-layout-grid .gmg-items{grid-template-columns:repeat(var(--gmg-cols-m),minmax(0,1fr))}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-m)}.gmg-layout-horizontal .gmg-item{flex-basis:min(88%,var(--gmg-scroll-w))}.gmg-arrow{width:34px;height:34px;font-size:24px}.gmg-lightbox{padding:20px}}


/* v0.3.3 — natural-width continuous column.
   Do not depend on intrinsic-size fallbacks or responsive image auto-sizes here:
   each figure receives its real attachment width as max-width inline. */
.gmg-layout-column .gmg-items{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.gmg-layout-column figure.gmg-item{
  flex:none;
  max-width:100%;
  margin-inline:auto;
}
.gmg-layout-column button.gmg-lightbox-trigger{
  display:block;
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
}
.gmg-layout-column figure.gmg-item img{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  object-fit:contain;
}
.gmg-layout-column figure.gmg-item video{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit:contain;
}

/* Lightbox uses a fresh image element with the original attachment URL only.
   No srcset/sizes, no lazy-loading auto-size containment, and no enlargement
   beyond the source image's intrinsic dimensions. */
.gmg-lightbox{
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease, visibility .2s ease;
}
.gmg-lightbox.is-open{
  opacity:1;
  visibility:visible;
}
.gmg-lightbox-inner{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.gmg-lightbox img.gmg-lightbox-media{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-width:94vw !important;
  max-height:90vh !important;
  object-fit:contain;
  opacity:0;
  transform:translateY(5px);
  transition:opacity .2s ease, transform .2s ease;
  contain:none !important;
  contain-intrinsic-size:none !important;
}
.gmg-lightbox img.gmg-lightbox-media.is-ready{
  opacity:1;
  transform:none;
}
.gmg-lightbox-close{
  opacity:.82;
  transition:opacity .15s ease;
}
.gmg-lightbox-close:hover,
.gmg-lightbox-close:focus-visible{opacity:1}
@media (prefers-reduced-motion: reduce){
  .gmg-lightbox,.gmg-lightbox img,.gmg-lightbox-close{transition:none!important}
}
\n\n/* v0.3.4 — each continuous-column item uses its own attachment width. */
.gmg-layout-column figure.gmg-item{
  width:min(100%,var(--gmg-natural-w,100%)) !important;
  max-width:var(--gmg-natural-w,100%) !important;
}
.gmg-layout-column figure.gmg-item > .gmg-lightbox-trigger,
.gmg-layout-column figure.gmg-item > img{
  width:100% !important;
  max-width:100% !important;
}
/* The lightbox receives a per-image max width/height from JS so small images
   are never enlarged beyond their intrinsic pixel dimensions. */
.gmg-lightbox img.gmg-lightbox-media{
  width:auto !important;
  height:auto !important;
}

/* v0.4.0 — restrained interaction treatment. Theme button hover/focus styles
   are neutralised so gallery images get a gentle lift instead of a coloured stroke. */
.gmg-gallery .gmg-lightbox-trigger{
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  transition:transform .22s ease, filter .22s ease !important;
  will-change:transform;
}
.gmg-gallery .gmg-lightbox-trigger:hover{
  transform:translateY(-3px);
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.12));
}
.gmg-gallery .gmg-lightbox-trigger:focus-visible{
  outline:0 !important;
  box-shadow:0 0 0 2px rgba(30,30,30,.18) !important;
  transform:translateY(-2px);
}
@media (prefers-reduced-motion: reduce){
  .gmg-gallery .gmg-lightbox-trigger{transition:none!important}
  .gmg-gallery .gmg-lightbox-trigger:hover,
  .gmg-gallery .gmg-lightbox-trigger:focus-visible{transform:none}
}


/* v0.6.2 — Horizontal Scroller: justified-style row, visible scrollbar, quieter arrows */
.gmg-layout-horizontal .gmg-track{
  align-items:stretch;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  padding-bottom:10px;
}
.gmg-layout-horizontal .gmg-track::-webkit-scrollbar{
  display:block;
  height:8px;
}
.gmg-layout-horizontal .gmg-track::-webkit-scrollbar-thumb{
  border-radius:999px;
}
.gmg-layout-horizontal figure.gmg-item{
  flex:0 0 auto !important;
  width:auto !important;
  height:var(--gmg-scroll-h,420px);
  scroll-snap-align:start;
}
.gmg-layout-horizontal figure.gmg-item > .gmg-lightbox-trigger,
.gmg-layout-horizontal figure.gmg-item > img{
  display:block;
  width:auto !important;
  height:100% !important;
  max-width:none !important;
}
.gmg-layout-horizontal figure.gmg-item img{
  width:auto !important;
  height:100% !important;
  max-width:none !important;
  object-fit:contain;
}
.gmg-layout-horizontal figure.gmg-item video{
  width:auto !important;
  height:100% !important;
  max-width:none !important;
  aspect-ratio:16/9;
  object-fit:cover;
}
.gmg-layout-horizontal .gmg-arrow{
  width:30px;
  height:30px;
  font-size:22px;
  background:rgba(255,255,255,.68);
  box-shadow:none;
  border:1px solid rgba(0,0,0,.08);
  opacity:.5;
  transition:opacity .18s ease, transform .18s ease, background .18s ease;
}
.gmg-layout-horizontal:hover .gmg-arrow,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  opacity:.9;
}
.gmg-layout-horizontal .gmg-arrow:hover{
  background:rgba(255,255,255,.92);
}
.gmg-layout-horizontal .gmg-prev{left:6px}
.gmg-layout-horizontal .gmg-next{right:6px}
@media(max-width:600px){
  .gmg-layout-horizontal figure.gmg-item{height:min(var(--gmg-scroll-h,420px),64vw)}
  .gmg-layout-horizontal .gmg-arrow{width:28px;height:28px;font-size:20px;opacity:.42}
}

/* v0.6.3 — Horizontal Scroller: fill-column height option + minimal edge chevrons */
.gmg-layout-horizontal{
  --gmg-scroll-effective-h:var(--gmg-scroll-h,420px);
}
.gmg-layout-horizontal figure.gmg-item{
  height:var(--gmg-scroll-effective-h, var(--gmg-scroll-h,420px));
}

/* Fixed mode remains predictable; fill mode is sized by view.js when the gallery
   lives in a Gutenberg Columns row. Outside a column it gracefully uses the fixed fallback. */
.gmg-layout-horizontal.gmg-horizontal-height-fixed{
  --gmg-scroll-effective-h:var(--gmg-scroll-h,420px);
}

/* Arrows are intentionally only a navigation hint; the visible scrollbar is primary. */
.gmg-layout-horizontal .gmg-arrow{
  width:34px;
  height:54px;
  padding:0;
  border:0;
  border-radius:5px;
  background:transparent;
  box-shadow:none;
  color:rgba(255,255,255,.92);
  text-shadow:0 1px 5px rgba(0,0,0,.58);
  font-size:31px;
  font-weight:300;
  line-height:1;
  opacity:.34;
  transition:opacity .18s ease, transform .18s ease, background-color .18s ease;
}
.gmg-layout-horizontal:hover .gmg-arrow,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  opacity:.78;
}
.gmg-layout-horizontal .gmg-arrow:hover,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  background:rgba(0,0,0,.10);
  opacity:1;
  transform:translateY(-50%) scale(1.06);
}
.gmg-layout-horizontal .gmg-prev{left:4px}
.gmg-layout-horizontal .gmg-next{right:4px}

@media(max-width:600px){
  .gmg-layout-horizontal figure.gmg-item{
    height:min(var(--gmg-scroll-effective-h, var(--gmg-scroll-h,420px)),68vw);
  }
  .gmg-layout-horizontal .gmg-arrow{
    width:30px;
    height:46px;
    font-size:27px;
    opacity:.28;
  }
}


/* v0.6.5 — Match Horizontal Scroller to sibling Gutenberg column height; 420px fallback/default.
   JS sets --gmg-scroll-effective-h only while the columns are side-by-side;
   stacked/mobile layouts naturally fall back to the configured row height. */
.gmg-layout-horizontal.gmg-horizontal-height-fill .gmg-track{
  min-height:0;
}
