/* Rolling one-page build: gallery section */
.gallery-section {
  scroll-margin-top: 28px;
  position: relative;
  overflow: hidden;
  padding: 82px 0 88px;
  background:
    radial-gradient(circle at 15% 0%, rgba(237,28,36,.08), transparent 26%),
    linear-gradient(180deg, #08090b 0%, #0c0e11 50%, #08090b 100%);
  border-top: 1px solid #202226;
}
.gallery-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 1px, transparent 1px 9px);
}
.gallery-shell { position: relative; }
.gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.gallery-heading .section-heading { margin-bottom: 34px; }
.gallery-controls { display: flex; gap: 10px; margin-bottom: 34px; flex: 0 0 auto; }
.gallery-control {
  width: 46px;
  height: 46px;
  border: 1px solid #3a3d42;
  border-radius: 50%;
  background: #0d0f12;
  color: #f4f5f6;
  font: 300 30px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.gallery-control:hover { border-color: var(--red); background: #15171a; transform: translateY(-1px); }
.gallery-control:focus-visible { outline: 3px solid rgba(237,28,36,.45); outline-offset: 3px; }
.gallery-viewport { overflow: hidden; width: 100%; }
.gallery-track {
  display: flex;
  gap: 18px;
  transform: translate3d(0,0,0);
  transition: transform .78s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.gallery-track.no-transition { transition: none !important; }
.gallery-slide {
  flex: 0 0 calc((100% - 54px) / 4);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #2a2d31;
  border-radius: 10px;
  background: #0a0b0d;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
}
.gallery-slide img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform .5s ease, filter .5s ease;
}
.gallery-slide:hover img { transform: scale(1.018); filter: brightness(1.04); }

@media (max-width: 1100px) {
  .gallery-slide { flex-basis: calc((100% - 36px) / 3); }
}
@media (max-width: 900px) {
  .gallery-section { padding: 66px 0 70px; }
  .gallery-slide { flex-basis: calc((100% - 18px) / 2); }
}
@media (max-width: 640px) {
  .gallery-section { padding: 54px 0 58px; scroll-margin-top: 12px; }
  .gallery-heading { align-items: flex-start; gap: 14px; }
  .gallery-heading .section-heading { margin-bottom: 24px; }
  .gallery-controls { margin-bottom: 24px; }
  .gallery-control { width: 42px; height: 42px; font-size: 27px; }
}
@media (max-width: 520px) {
  .gallery-heading { display: block; }
  .gallery-controls { justify-content: flex-end; margin-top: -12px; }
  .gallery-slide { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-track { transition-duration: .01ms; }
  .gallery-slide img, .gallery-control { transition: none; }
}
