/* Top Gallery Infinite Scroll Section */
.p-top-gallery {
  padding: 8px 0;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.p-top-gallery__container {
  width: 100%;
  overflow: hidden;
}

.p-top-gallery__track {
  display: flex;
  gap: 8px;
  width: fit-content;
  animation: scroll 40s linear infinite;
}

.p-top-gallery__item {
  flex-shrink: 0;
  width: 340px;
  height: 340px;
  overflow: hidden;
}

.p-top-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Infinite scroll animation */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Move exactly one set of images (50% of total width) */
    /* The gap between sets is already accounted for in the 50% calculation */
    transform: translateX(-50%);
  }
}

/* Responsive styles */
@media (max-width: 767px) {
  .p-top-gallery {
    padding: 40px 0;
  }
  
  .p-top-gallery__item {
    width: 200px;
    height: 200px;
  }
  
  .p-top-gallery__track {
    gap: 16px;
    animation-duration: 30s;
  }
}
