/* .css/featureimg.css */

/* Main container for the scroller */
.featureimg {
  display: flex;
  flex-direction: row !important;
  overflow: hidden;

  /*
   * CORRECTED: Replaced margins with padding and made the container full-width.
   * This is the key to hiding the images correctly on both sides.
  */
  width: 100%;
  padding-left: 50px;
  padding-right: 50px;
  box-sizing: border-box; /* This important line includes padding inside the 100% width */
}

/* Inner wrapper that holds all images and is animated */
.scroller-inner {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll 40s linear infinite;
}

/* The animation definition */
@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

/* Pause the animation on hover */
.featureimg:hover .scroller-inner {
  animation-play-state: paused;
}

/* Styling for each image's container */
.featureimg figure {
  flex-shrink: 0;
  width: 250px;
  text-align: center;
  margin: 5px;
  padding: 5px;
}

/* Styling for the image itself to enforce a standard size and ratio */
.featureimg figure img {
  width: 100%;
  height: 333px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
  padding: 0;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
  .featureimg {
    /* Adjust padding for mobile */
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .featureimg figure {
    width: 200px;
  }

  .featureimg figure img {
    height: 267px;
  }
}