.portfolio-gallery { --gallery-columns: 1; position: relative; min-width: 0; max-width: 100%; margin-bottom: 50px; }
.portfolio-gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--gallery-columns) - 1) * 20px) / var(--gallery-columns));
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.portfolio-gallery__track > .swiper-slide { min-width: 0; scroll-snap-align: start; }
.portfolio-gallery__controls { display: flex; gap: 6px; justify-content: center; align-items: center; height: 48px; }
.portfolio-gallery__controls button {
  width: 44px; height: 44px; cursor: pointer; border: 0; background: transparent;
  display: grid; place-items: center; color: inherit; font: inherit;
}
.portfolio-gallery__controls button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.portfolio-gallery__controls img { width: 26px; height: 26px; display: block; }
.portfolio-gallery__toggle span { font: bold 18px/1 sans-serif; }
@media (min-width: 600px) {
  .portfolio-gallery { --gallery-columns: 2; }
  .portfolio-gallery:has(.portfolio-gallery__track > :last-child:nth-child(-n+2)) .portfolio-gallery__controls { display: none; }
}
@media (min-width: 1000px) {
  .portfolio-gallery { --gallery-columns: 3; }
  .portfolio-gallery:has(.portfolio-gallery__track > :last-child:nth-child(-n+3)) .portfolio-gallery__controls { display: none; }
}
