/**
 * JMAA Event Gallery - the public page and lightbox.
 * Uses the Brand Kit tokens where present, with plain fallbacks.
 */
.jmaa-gal { font-family: var(--jmaa-font, system-ui, sans-serif); color: var(--jmaa-ink, #121212); }
.elementor-widget-shortcode:has(.jmaa-gal) { width: 100%; }
.jmaa-gal__gallery + .jmaa-gal__gallery { margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--jmaa-grey-light, #E4E5E7); }
.jmaa-gal__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 6px; }
.jmaa-gal__title { margin: 0; font-size: 1.35rem; font-weight: 700; padding-bottom: 6px; border-bottom: 3px solid var(--jmaa-gold, #FFC20E); }
.jmaa-gal__when { color: var(--jmaa-grey, #6b6d70); font-weight: 600; }
.jmaa-gal__intro { margin: 8px 0 14px; color: var(--jmaa-grey, #6b6d70); }
.jmaa-gal__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
.jmaa-gal__item { margin: 0; }
.jmaa-gal .jmaa-gal__open { display: block; width: 100%; padding: 0; border: 0; background: var(--jmaa-off-white, #F6F6F7); border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.jmaa-gal__open img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.jmaa-gal .jmaa-gal__open:hover img { transform: scale(1.03); }
.jmaa-gal__caption { margin: 6px 0 0; font-size: .9rem; color: var(--jmaa-grey, #6b6d70); }
.jmaa-gal__empty { color: var(--jmaa-grey, #6b6d70); }

/* 1.0.1: sized to the visible screen (dvh; vh fallback) so the close button,
   arrows and caption are never behind a phone browser's toolbars. */
.jmaa-gal__box { width: min(96vw, 1000px); max-height: 96vh; max-height: 96dvh; padding: 0; border: 0; background: transparent; }
.jmaa-gal__box::backdrop { background: rgba(0,0,0,.86); }
.jmaa-gal__box-figure { margin: 0; text-align: center; }
.jmaa-gal__box-figure img { display: block; max-width: 100%; max-height: 82vh; max-height: 78dvh; height: auto; margin: 0 auto; border-radius: 6px; }
.jmaa-gal__box-figure figcaption { color: #fff; margin: 12px 0 0; font-size: 1rem; }
.jmaa-gal__box-figure figcaption:empty { display: none; }
.jmaa-gal .jmaa-gal__close, .jmaa-gal .jmaa-gal__nav {
	position: absolute; border: 0; border-radius: 50%; width: 44px; height: 44px; cursor: pointer;
	background: rgba(0,0,0,.55); color: #fff; font-size: 30px; line-height: 1;
}
.jmaa-gal .jmaa-gal__close { top: 8px; right: 8px; }
.jmaa-gal .jmaa-gal__nav { top: 50%; transform: translateY(-50%); }
.jmaa-gal .jmaa-gal__nav--prev { left: 8px; }
.jmaa-gal .jmaa-gal__nav--next { right: 8px; }
.jmaa-gal .jmaa-gal__close:hover, .jmaa-gal .jmaa-gal__nav:hover { background: var(--jmaa-gold, #FFC20E); color: #111; }
.jmaa-gal .jmaa-gal__nav[hidden] { display: none; }
body:has(.jmaa-gal__box[open]) { overflow: hidden; }
@media (max-width: 600px) { .jmaa-gal__grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* 1.1.0: each gallery's link and share buttons. */
.jmaa-gal__gallery { scroll-margin-top: 120px; outline: 3px solid transparent; outline-offset: 10px; transition: outline-color .6s ease; }
/* Opened from its link: a gold ring for a few seconds, clear of the content. */
.jmaa-gal__gallery.is-linked { outline-color: var(--jmaa-gold, #FFC20E); }
/* Older #gallery-123 links: an anchor at the very top of the section, so they land where the new ones do. */
.jmaa-gal__gallery { position: relative; }
.jmaa-gal__old-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: 120px; }
.jmaa-gal__share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 4px; font-size: .88rem; }
.jmaa-gal__share-label { color: var(--jmaa-grey, #6b6d70); font-weight: 600; margin-right: 2px; }
.jmaa-gal .jmaa-gal__share-btn {
	display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--jmaa-grey-light, #d5d6d9);
	border-radius: 16px; background: #fff; color: var(--jmaa-ink, #121212); font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.jmaa-gal .jmaa-gal__share-btn:hover, .jmaa-gal .jmaa-gal__share-btn:focus-visible { border-color: var(--jmaa-gold, #FFC20E); background: var(--jmaa-gold, #FFC20E); color: #111; }
.jmaa-gal .jmaa-gal__share-btn[hidden] { display: none; }
.jmaa-gal__share-done { color: var(--jmaa-grey, #6b6d70); font-weight: 600; word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .jmaa-gal__gallery { transition: none; } }
