.listings-container {
  padding: 20px;
  width: 80%;
  margin: 0 auto; /* Ensure the container takes up 80% of the screen width */
}

.listing-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.listing {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  width: calc(33.333% - 20px); /* 3 columns on desktop */
  box-sizing: border-box;
  text-align: center;
}

.listing img {
  max-width: 100%;
  max-height: 200px; /* Set a maximum height for the images */
  height: auto;
  border-radius: 10px 10px 0 0;
}

.listing h3 {
  margin: 10px 0;
}

.listing p {
  font-size: 1rem;
  color: #666;
}

.listing button {
  margin: 10px;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.listing button:hover {
  background-color: #555;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
  padding-bottom: 60px;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.modal-content img {
  max-width: 100%;
  height: auto;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 0px;
  right: 3px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive styling */
@media (max-width: 768px) {
    .listing {
        width: 100%; /* Full width on mobile */
    }

    .modal-content {
        width: 90%; /* Slightly narrower on mobile */
    }
}
