* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container1 {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 290px));
  grid-gap: 1rem;
  padding: 1rem;
  justify-content: center;
  box-shadow: 0 1px 1px #000;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container1 img {
  background-position: top;
  background-size: cover;
  height: 200px;
  width: 100%; /* Make images responsive */
  max-width: 290px; /* Keep max width */
  box-shadow: 0 2px 10px #000;
  cursor: pointer;
  transition: all 0.2s;
}

/* Mobile responsiveness for screens up to 400px */
@media (max-width: 400px) {
  .container1 {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 3.5rem;
  }

  .container1 img {
    height: auto; /* Adjust height automatically */
    width: 80%;  /* Full width for mobile */
  }
}
