/* CPM Gallery: fixed row track sizing, no phantom black columns. */
.cpm-sgallery{--cpm-gallery-cols:4;--cpm-gallery-gap:12px;--cpm-gallery-height:260px;--cpm-gallery-wave-idle:1;--cpm-gallery-wave-peak:1.04;--cpm-gallery-wave-radius:560px;--cpm-gallery-wave-lift:16px;--cpm-gallery-wave-smoothing:.16;--cpm-gallery-wave-fade:.78;--cpm-gallery-shine-intensity:.16;--cpm-gallery-shine-smoothing:.2;width:100%;margin-inline:auto}
.cpm-sgallery__grid{display:grid;grid-template-columns:repeat(var(--cpm-gallery-cols),minmax(0,1fr));grid-auto-flow:dense;grid-auto-rows:var(--cpm-gallery-height);gap:var(--cpm-gallery-gap);isolation:isolate}
.cpm-sgallery__tile{--cpm-gallery-live-scale:1;--cpm-gallery-live-lift:0px;--cpm-gallery-live-opacity:1;--cpm-gallery-shine-opacity:0;--cpm-gallery-shine-x:50%;--cpm-gallery-shine-y:50%;position:relative;display:block;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden;isolation:isolate;background:transparent;transform:translate3d(0,var(--cpm-gallery-live-lift),0) scale(var(--cpm-gallery-live-scale));opacity:var(--cpm-gallery-live-opacity);transform-origin:center;will-change:transform,opacity;text-decoration:none}
.cpm-sgallery__tile img{width:100%;height:100%;display:block;object-fit:cover;object-position:center;transition:transform 650ms cubic-bezier(.2,.7,.2,1)}
.cpm-sgallery--zoom .cpm-sgallery__tile:hover img{transform:scale(1.055)}
.cpm-sgallery__tile:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:var(--cpm-gallery-shine-opacity);background:linear-gradient(110deg,transparent 12%,rgba(255,255,255,.09) 31%,rgba(255,255,255,.29) 48%,rgba(255,255,255,.05) 64%,transparent 85%);background-position:var(--cpm-gallery-shine-x) var(--cpm-gallery-shine-y);background-size:200% 200%;mix-blend-mode:screen;z-index:2}

.cpm-sgallery__caption{position:absolute;z-index:3;bottom:0;left:0;right:0;padding:18px 16px;font-size:13px;line-height:1.35;background:#121719;color:white;pointer-events:none}
.cpm-sgallery__tile--hover .cpm-sgallery__caption{opacity:0;transform:translateY(100%);transition:opacity .3s,transform .3s}
.cpm-sgallery__tile--hover:hover .cpm-sgallery__caption,.cpm-sgallery__tile--hover:focus-visible .cpm-sgallery__caption{opacity:1;transform:none}
.cpm-sgallery__tile--below .cpm-sgallery__caption{top:auto;bottom:0;background:rgba(15,18,20,.9);color:#fff;padding:9px 12px}
.cpm-sgallery--packery .cpm-sgallery__tile:nth-child(7n + 1){grid-column:span 2;grid-row:span 2}
.cpm-sgallery--packery .cpm-sgallery__tile:nth-child(7n + 4){grid-row:span 2}
.cpm-sgallery--stacked .cpm-sgallery__tile:nth-child(5n + 1){grid-column:span 2}
.cpm-sgallery--stacked .cpm-sgallery__tile:nth-child(6n + 4){grid-row:span 2}
.cpm-sgallery--strip .cpm-sgallery__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.cpm-sgallery--strip .cpm-sgallery__tile:nth-child(3n + 1){grid-column:span 2;grid-row:span 2}
.cpm-sgallery--featured .cpm-sgallery__featured{height:clamp(280px,48vw,700px);background:#15191b;margin-bottom:var(--cpm-gallery-gap);position:relative;overflow:hidden}
.cpm-sgallery--featured .cpm-sgallery__featured img{width:100%;height:100%;object-fit:cover;display:block}
.cpm-sgallery--featured .cpm-sgallery__featured button{position:absolute;top:50%;transform:translateY(-50%);border:0;border-radius:50%;background:#111c;color:#fff;font-size:25px;width:42px;height:42px;cursor:pointer;z-index:4}
.cpm-sgallery--featured .cpm-sgallery__featured .prev{left:12px}.cpm-sgallery--featured .cpm-sgallery__featured .next{right:12px}
.cpm-sgallery--featured .cpm-sgallery__grid{display:flex;overflow-x:auto;gap:var(--cpm-gallery-gap);scroll-snap-type:x mandatory;padding:4px}
.cpm-sgallery--featured .cpm-sgallery__tile{flex:0 0 140px;width:140px;height:90px;scroll-snap-align:start;opacity:.65}
.cpm-sgallery--featured .cpm-sgallery__tile.is-active{opacity:1;outline:2px solid #e30613;outline-offset:-2px}
.cpm-sgallery--cascade .cpm-sgallery__grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:0;padding:45px 35px}
.cpm-sgallery--cascade .cpm-sgallery__tile{flex:0 0 min(34%,420px);width:min(34%,420px);height:var(--cpm-gallery-height);margin:-20px -18px;--cpm-gallery-rotation:0deg;transform:translate3d(0,var(--cpm-gallery-live-lift),0) rotate(var(--cpm-gallery-rotation)) scale(var(--cpm-gallery-live-scale));box-shadow:0 8px 28px #0003}
.cpm-sgallery--cascade .cpm-sgallery__tile:nth-child(3n+1){--cpm-gallery-rotation:-4deg}.cpm-sgallery--cascade .cpm-sgallery__tile:nth-child(3n+2){--cpm-gallery-rotation:3deg}.cpm-sgallery--cascade .cpm-sgallery__tile:nth-child(3n){--cpm-gallery-rotation:-1deg}
.cpm-sgallery--justified .cpm-sgallery__grid{display:flex;flex-wrap:wrap;gap:var(--cpm-gallery-gap)}
.cpm-sgallery--justified .cpm-sgallery__tile{flex:1 1 calc(var(--cpm-gallery-height)*1.5);height:var(--cpm-gallery-height)}
.cpm-sgallery--justified .cpm-sgallery__tile:last-child{flex-grow:0;min-width:25%}
@media(max-width:1024px){.cpm-sgallery--packery .cpm-sgallery__tile:nth-child(7n + 1),.cpm-sgallery--stacked .cpm-sgallery__tile:nth-child(5n + 1){grid-column:span min(2,var(--cpm-gallery-cols))}}
@media(max-width:767px){.cpm-sgallery--packery .cpm-sgallery__tile,.cpm-sgallery--stacked .cpm-sgallery__tile,.cpm-sgallery--strip .cpm-sgallery__tile{grid-column:auto!important;grid-row:auto!important}.cpm-sgallery--strip .cpm-sgallery__grid{grid-template-columns:repeat(var(--cpm-gallery-cols),minmax(0,1fr))}.cpm-sgallery--cascade .cpm-sgallery__tile{flex-basis:75%;width:75%;margin:-10px -12px}.cpm-sgallery--featured .cpm-sgallery__tile{flex-basis:100px;width:100px;height:70px}}
@media(hover:none),(pointer:coarse),(prefers-reduced-motion:reduce){.cpm-sgallery__tile{transform:none!important;opacity:1!important;will-change:auto}.cpm-sgallery__tile:after{display:none}.cpm-sgallery__tile img{transition:none!important}}

/* 6.27.11: Make the image an independent full-bleed layer; Elementor/global img
   height:auto rules must never create a short image and empty tile underneath. */
.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile {position:relative!important;align-self:stretch;justify-self:stretch;box-sizing:border-box;line-height:0;}
.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile > img {
 position:absolute!important;inset:0!important;top:0!important;left:0!important;
 width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;
 max-width:none!important;max-height:none!important;object-fit:cover!important;
 display:block!important;margin:0!important;padding:0!important;border:0!important;
}
.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile > .cpm-sgallery__caption {line-height:1.35;}
/* Spanning two rows when the user selects two columns makes disproportionate blocks.
   Preserve alternating widths but avoid the giant tall cards at narrow editor widths. */
.cpm-sgallery[data-effective-cols="1"] .cpm-sgallery__tile,
.cpm-sgallery[data-effective-cols="2"] .cpm-sgallery__tile {grid-row:span 1!important;}
.cpm-sgallery[data-effective-cols="1"] .cpm-sgallery__tile {grid-column:span 1!important;}
.cpm-sgallery--featured .cpm-sgallery__grid > .cpm-sgallery__tile {height:90px;}
@media(max-width:767px){.cpm-sgallery--featured .cpm-sgallery__grid > .cpm-sgallery__tile {height:70px;}}

/* 6.27.12 — Tiles occupy their full allocated grid footprint at rest.
   Folio wave animates the entire frame, not the image within it. */
.cpm-sgallery .cpm-sgallery__tile > img,
.cpm-sgallery--zoom .cpm-sgallery__tile:hover > img {transform:none!important;transition:none!important;}
.cpm-sgallery .cpm-sgallery__grid {align-items:stretch;justify-items:stretch;}

/* 6.27.13: Configurable frame shadow. Never clip the shadow or zoom the image.
   A separate image-opacity transition allows fade without affecting Folio frame wave maths. */
.cpm-sgallery{--cpm-gallery-shadow-color:#000;--cpm-gallery-shadow-opacity:.25;--cpm-gallery-shadow-x:0px;--cpm-gallery-shadow-y:20px;--cpm-gallery-shadow-blur:55px;--cpm-gallery-shadow-spread:0px;--cpm-gallery-shadow-in:250ms;--cpm-gallery-shadow-out:450ms;--cpm-gallery-image-opacity-idle:1;--cpm-gallery-image-opacity-hover:1;--cpm-gallery-image-fade-in:300ms;--cpm-gallery-image-fade-out:350ms}
.cpm-sgallery .cpm-sgallery__tile{box-shadow:0 0 0 0 transparent;transition:box-shadow var(--cpm-gallery-shadow-out) ease;overflow:hidden}
.cpm-sgallery--shadow .cpm-sgallery__tile:is(:hover,:focus-visible,.is-wave-focus){box-shadow:var(--cpm-gallery-shadow-x) var(--cpm-gallery-shadow-y) var(--cpm-gallery-shadow-blur) var(--cpm-gallery-shadow-spread) color-mix(in srgb,var(--cpm-gallery-shadow-color) calc(var(--cpm-gallery-shadow-opacity) * 100%),transparent);transition-duration:var(--cpm-gallery-shadow-in)}
.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile > img{opacity:var(--cpm-gallery-image-opacity-idle);transition:opacity var(--cpm-gallery-image-fade-out) ease!important}
.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile:is(:hover,:focus-visible,.is-wave-focus) > img{opacity:var(--cpm-gallery-image-opacity-hover);transition-duration:var(--cpm-gallery-image-fade-in)!important}
@media (hover:none),(pointer:coarse),(prefers-reduced-motion:reduce){.cpm-sgallery .cpm-sgallery__tile{box-shadow:none!important;transition:none!important}.cpm-sgallery .cpm-sgallery__grid > .cpm-sgallery__tile > img{opacity:1!important;transition:none!important}}

/* v6.27.16: Animated gallery lightbox, independent of Elementor's global popup. */
.cpm-sgallery-lightbox{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;background:rgba(8,12,15,.95);opacity:0;visibility:hidden;transition:opacity var(--cpm-lb-open,350ms) ease,visibility 0s linear var(--cpm-lb-open,350ms);color:#fff;box-sizing:border-box;padding:65px 82px 48px}
.cpm-sgallery-lightbox.is-visible{opacity:1;visibility:visible;transition:opacity var(--cpm-lb-open,350ms) ease,visibility 0s}
.cpm-sgallery-lightbox.is-closing{transition:opacity var(--cpm-lb-close,300ms) ease,visibility 0s linear var(--cpm-lb-close,300ms)}
.cpm-sgallery-lightbox__stage{max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-width:0;min-height:0;transform:none;opacity:0;transition:transform var(--cpm-lb-open,350ms) cubic-bezier(.22,.8,.24,1),opacity var(--cpm-lb-open,350ms) ease}
.cpm-sgallery-lightbox.is-visible .cpm-sgallery-lightbox__stage{opacity:1;transform:none}
.cpm-sgallery-lightbox.is-closing .cpm-sgallery-lightbox__stage{transition-duration:var(--cpm-lb-close,300ms)}
.cpm-sgallery-lightbox--zoom .cpm-sgallery-lightbox__stage{transform:scale(.92)}
.cpm-sgallery-lightbox--slide .cpm-sgallery-lightbox__stage{transform:translateY(32px)}
.cpm-sgallery-lightbox__image{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:calc(100vh - 160px)!important;object-fit:contain!important;box-shadow:0 20px 70px #0008}
.cpm-sgallery-lightbox__caption{font:500 13px/1.5 inherit;text-align:center;max-width:72ch}
.cpm-sgallery-lightbox__count{font:500 12px/1.5 sans-serif;color:#aaa}
.cpm-sgallery-lightbox button{position:absolute;z-index:2;background:rgba(255,255,255,.1);border:1px solid #fff4;border-radius:50%;color:white;width:42px;height:42px;display:grid;place-items:center;cursor:pointer;font:400 23px/1 sans-serif;padding:0;transition:background .2s}
.cpm-sgallery-lightbox button:hover,.cpm-sgallery-lightbox button:focus-visible{background:rgba(255,255,255,.28)}
.cpm-sgallery-lightbox__close{right:24px;top:24px}
.cpm-sgallery-lightbox__previous{left:22px;top:50%;transform:translateY(-50%)}
.cpm-sgallery-lightbox__next{right:22px;top:50%;transform:translateY(-50%)}
@media(max-width:767px){.cpm-sgallery-lightbox{padding:70px 15px 50px}.cpm-sgallery-lightbox__previous{left:6px;top:auto;bottom:9px}.cpm-sgallery-lightbox__next{right:6px;top:auto;bottom:9px}.cpm-sgallery-lightbox__close{right:14px;top:14px}.cpm-sgallery-lightbox__image{max-height:calc(100vh - 180px)!important}}
@media(prefers-reduced-motion:reduce){.cpm-sgallery-lightbox,.cpm-sgallery-lightbox__stage{transition:none!important}}

/* Editor-only image review actions; not rendered for site visitors. */
.cpm-sgallery__hide-image{position:absolute;right:9px;top:9px;z-index:40;display:flex;align-items:center;gap:5px;padding:6px 10px;border-radius:4px;background:rgba(19,25,28,.93);color:#fff;font:600 12px/1.4 Arial,sans-serif;opacity:0;cursor:pointer;transition:opacity .2s ease;pointer-events:auto;}
.cpm-sgallery__tile:hover .cpm-sgallery__hide-image,.cpm-sgallery__hide-image:focus-visible{opacity:1;}
.cpm-sgallery__hide-image:hover{background:#e30613;}
