/* MW Project Photos - front end (inherits the theme's fonts and colors) */
.mwpp-wrap { margin: 0 0 28px; }
.mwpp-wrap:empty { display: none; }
.mwpp-title { margin: 8px 0 16px; }

/* Gallery */
.mwpp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mwpp-item { display: block; position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; background: #eef1f4; }
.mwpp-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.mwpp-item:hover img, .mwpp-item:focus-visible img { transform: scale(1.04); }
.mwpp-item:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* Before / after */
.mwpp-ba { margin: 0; }
.mwpp-ba-stage { position: relative; overflow: hidden; border-radius: 6px; user-select: none; touch-action: pan-y; }
.mwpp-ba-after img, .mwpp-ba-before img { display: block; width: 100%; height: auto; }
.mwpp-ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--mwpp-pos, 50%)) 0 0); }
.mwpp-ba-before img { width: 100%; height: 100%; object-fit: cover; }
.mwpp-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--mwpp-pos, 50%); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; }
.mwpp-ba-handle::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: #111; font-size: 22px; line-height: 44px; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.mwpp-ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.mwpp-ba-tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 3px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.mwpp-ba-tag--before { left: 12px; }
.mwpp-ba-tag--after { right: 12px; }
.mwpp-ba figcaption { margin-top: 8px; font-size: 14px; opacity: .8; }
.mwpp-recent { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.mwpp-recent-link { display: inline-block; margin-top: 8px; font-weight: 600; }

/* Lightbox */
.mwpp-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(10, 14, 20, .94); display: flex; align-items: center; justify-content: center; }
.mwpp-lb img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.mwpp-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 48px; cursor: pointer; padding: 0; }
.mwpp-lb button:hover, .mwpp-lb button:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.mwpp-lb-close { top: 16px; right: 16px; }
.mwpp-lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.mwpp-lb-next { right: 16px; top: 50%; margin-top: -24px; }
.mwpp-lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .mwpp-item img { transition: none; } }
