/* GridMotion w sekcji galerii — pełna szerokość, stała wysokość bloku */
#gallery-section {
  width: 100%;
  max-width: none;
}

#gallery-grid-motion.grid-motion-root {
  position: relative;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  height: 80vh;
  min-height: 28rem;
  max-height: 56rem;
  overflow: hidden;
  z-index: 0;
  touch-action: none;
  border-radius: 0.75rem;
}

@media (max-width: 640px) {
  #gallery-grid-motion.grid-motion-root {
    height: 70vh;
    min-height: 22rem;
    border-radius: 0;
  }
}

#gallery-grid-motion.grid-motion-root .gm-noscroll {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#gallery-grid-motion.grid-motion-root .gm-intro {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gallery-grid-motion.grid-motion-root .gm-intro::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 250px;
  pointer-events: none;
  z-index: 4;
}

#gallery-grid-motion.grid-motion-root .gridMotion-container {
  gap: 1.357rem;
  flex: none;
  position: relative;
  width: 203.643vw;
  height: auto;
  min-height: 100%;
  display: grid;
  grid-template-rows: repeat(4, auto);
  grid-template-columns: 100%;
  transform: rotate(-15deg);
  transform-origin: center center;
  z-index: 2;
}

#gallery-grid-motion.grid-motion-root .gm-row {
  display: grid;
  gap: 1.357rem;
  grid-template-columns: repeat(7, 1fr);
  will-change: transform, filter;
}

#gallery-grid-motion.grid-motion-root .gm-row__item {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

#gallery-grid-motion.grid-motion-root .gm-row__item-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 13.574px;
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(0.75rem, 1.5vw, 1.5rem);
}

#gallery-grid-motion.grid-motion-root .gm-row__item-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: 50% 50%;
  position: absolute;
  top: 0;
  left: 0;
}

#gallery-grid-motion.grid-motion-root .gm-row__item-content {
  padding: 1rem;
  text-align: center;
  z-index: 1;
}

#gallery-grid-motion.grid-motion-root .gm-fullview {
  position: relative;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

#gallery-grid-motion.grid-motion-root .gm-fullview .gm-row__item-inner {
  border-radius: 0;
}
