/* Job photo galleries.
   The old .imgrow was a masonry column layout: images kept their native
   aspect ratio and stacked at whatever height they happened to be, so a
   row of mixed portrait and landscape shots read as a ragged wall.

   These are fixed-height filmstrips instead. Every photo is scaled to one
   shared height and keeps its own width, so nothing is cropped and every
   card sits on a common top and bottom edge. Rows that overflow scroll
   horizontally with snap points; rows that fit just sit there and the
   arrows stay hidden.

   Scoped to .jobgal so styles-v2.css and styles-v3.css are untouched. */
.jobgal{--jobgal-h:420px;--jobgal-gap:14px;position:relative;margin:26px 0}

.jobgal-track{
  display:flex;gap:var(--jobgal-gap);overflow-x:auto;overscroll-behavior-x:contain;
  /* proximity, not mandatory: cards vary in width here, so mandatory
     snapping can fight a free swipe near the end of a track whose final
     resting point is not a snap point. */
  scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;-ms-overflow-style:none;padding:2px 0 4px}
.jobgal-track::-webkit-scrollbar{display:none}

.jobgal-track figure{flex:0 0 auto;margin:0;scroll-snap-align:start}
.jobgal-track img{
  display:block;height:var(--jobgal-h);width:auto;max-width:none;border-radius:16px;
  background:var(--bg-soft,#f4f2ee);border:1px solid var(--line,#e6e3dd)}
/* width:0 + min-width:100% keeps a long caption from widening its card:
   the caption renders at the photo's width but contributes nothing to it. */
.jobgal-track figcaption{
  width:0;min-width:100%;font-size:13px;color:#6b6b6b;margin-top:8px;
  font-family:'Didact Gothic',sans-serif}

.jobgal-btn{
  position:absolute;top:calc(var(--jobgal-h) / 2);transform:translateY(-50%);
  width:40px;height:40px;padding:0;border-radius:50%;border:1px solid var(--line,#e6e3dd);
  background:#fff;color:#1a1a1a;font-size:20px;line-height:1;cursor:pointer;
  display:none;place-items:center;z-index:2;
  box-shadow:0 2px 10px rgba(10,10,10,.14)}
.jobgal-btn:hover{background:#f6f4f0}
.jobgal-btn:focus-visible{outline:2px solid #1a1a1a;outline-offset:2px}
.jobgal-btn[disabled]{opacity:.3;cursor:default;box-shadow:none}
.jobgal-prev{left:10px}
.jobgal-next{right:10px}
/* Only shown once the script confirms the track actually overflows. */
.jobgal.is-scrollable .jobgal-btn{display:grid}

@media(max-width:900px){.jobgal{--jobgal-h:340px}}
/* Touch devices swipe. No arrows. */
@media(max-width:720px){
  .jobgal{--jobgal-h:290px;--jobgal-gap:10px}
  .jobgal.is-scrollable .jobgal-btn{display:none}}
@media(prefers-reduced-motion:reduce){.jobgal-track{scroll-behavior:auto}}
