.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.gallery-item {
  flex: 0 0 calc(33.33% - 20px); /* Adjust the width of each item */
  margin-bottom: 20px;
}

.gallery-item img {
  width: 100%;
  height: 200px; /* Adjust the height as needed */
  object-fit: cover; /* Ensure the image covers the entire container */
  display: block;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05); /* Add a hover effect to scale the image */
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 80%;
  max-height: 80%;
  border: 5px solid #fff; /* White border */
  border-radius: 10px; /* Rounded corners */
  transition: transform 0.3s ease; /* Smooth transition effect */
}

.modal-content:hover {
  transform: scale(1.1); /* Zoom effect on hover */
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.close:hover {
  color: #ccc;
}

@media screen and (max-width: 768px) {
  .gallery-item {
      flex: 0 0 calc(50% - 20px); /* Adjust the width of each item for smaller screens */
  }
}
