/* Compact project previews and the shared PhotoSwipe viewer, adapted from droblenie.pro. */
.gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 20px}
.gallery-preview{height:auto;aspect-ratio:4/3;background:#e5eef2;border:0;border-radius:4px;overflow:hidden}
.gallery-preview img,.gallery-card[data-device=phone] .gallery-preview img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;margin:0;transition:transform .2s ease}
.gallery-card .screen-open:hover .gallery-preview img{transform:scale(1.025)}
.gallery-card .screen-open:focus-visible{outline:3px solid #235d74;outline-offset:5px}
.gallery-zoom{position:absolute;right:10px;bottom:10px;width:32px;height:32px;display:grid;place-items:center;background:#0e2238;color:#f0f6f8;border-radius:50%;font-size:22px;line-height:1}
.gallery-title{font-size:15px;line-height:1.4;margin-top:16px}.gallery-card figcaption{font-size:12px;line-height:1.6}
body.case-gallery-open{overflow:hidden}
.pswp{--pswp-bg:#071727;--pswp-placeholder-bg:#152e44;--pswp-icon-color:#f0f6f8;--pswp-icon-color-secondary:#486073;--pswp-icon-stroke-color:#486073;font-family:Onest,Arial,sans-serif}
.pswp__top-bar{height:60px;background:linear-gradient(#071727,transparent)}
.pswp__button:focus-visible,.pswp__case-thumb:focus-visible{outline:2px solid #99d5e8;outline-offset:-4px}
.pswp__button--original{display:grid;place-items:center;flex-shrink:0}
.pswp__button--original svg{width:24px;height:24px;fill:none;stroke:#f0f6f8;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pswp__case-footer{position:absolute;left:0;right:0;bottom:0;padding:10px 24px 14px;background:#071727;color:#f0f6f8}
.pswp__case-caption{margin:0 auto 10px;max-width:1000px;min-height:20px;font-size:13px;line-height:1.5;text-align:center;max-height:40px;overflow:auto}
.pswp__case-thumbs{display:flex;gap:8px;max-width:1100px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#486073 #071727;margin:0 auto;padding:4px 0;justify-content:safe center}
.pswp__case-thumb{border:2px solid transparent;border-radius:4px;padding:0;flex:0 0 68px;height:52px;background:#e5eef2;overflow:hidden;opacity:.55;cursor:pointer}
.pswp__case-thumb img{display:block;width:64px;height:48px;max-width:none;object-fit:cover}
.pswp__case-thumb:hover{opacity:1}.pswp__case-thumb[aria-pressed=true]{border-color:#99d5e8;opacity:1}
@media(max-width:1100px){.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 14px}.gallery-card[data-device=phone] .gallery-preview{height:auto}.gallery-title{font-size:13px}.gallery-card figcaption{font-size:11px}.gallery-zoom{width:28px;height:28px;font-size:20px;right:8px;bottom:8px}.pswp__case-footer{padding:10px 12px 12px}.pswp__case-caption{font-size:12px;max-height:54px;min-height:36px}.pswp__case-thumbs{gap:6px}.pswp__case-thumb{flex-basis:58px;height:44px}.pswp__case-thumb img{width:54px;height:40px}}
@media(prefers-reduced-motion:reduce){.gallery-preview img{transition:none!important}}
