*{
  margin: 0 ;
  padding: 0px;
}


#modal {
  display: none;
  position: fixed;
  top: -35%;
  left:0%;
  width: 100%; /* Full width of the viewport */
  height: 100%; /* Full height of the viewport */
  height:130vh;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  z-index: 1000;
  overflow: auto;

}
.modal-content {
  background-color: #fff;
  position: absolute; /* Use absolute positioning within the fixed modal */
  top: 10%; /* Center vertically */
  left:47%; /* Center horizontally */
  transform: translate(-50%, 10%); /* Center the modal precisely */
  padding: 20px;
  border: 1px solid #888;
  width: 700px;
  max-width: 1200px;
  max-height: 130vh;
  overflow-y: auto;
}


.close-button {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 44px;
  font-weight: bold;
  cursor: pointer;
}

.modal-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.modal-image {
  width: 180px; /* Fixed width */
  height: 180px; /* Fixed height */
  object-fit: cover; /* Maintain aspect ratio */
  border-radius: 5px;
}

@media (max-width: 600px) {
  #modal {
    width: 85%;
    height: 100%;
    margin-left: 60px;
    transform: translate(0%, 10%); /* Center the modal precisely */
  }

  .modal-content {
    width: 100%;
    margin: 14% auto; /* Adjusted for smaller screens */
    padding: 10px;
    height: 100%; /* Fill most of the modal height on smaller screens */
    max-height: none; /* Remove max-height for smaller screens */

  }

  .close-button {
    top: 5px;
    right: 10px;
    font-size: 40px;
  }

  .modal-image-row {
    gap: 10px;
  }

  .modal-image {
    width: 95%; /* Make images fill the width of their container */
    height: auto; /* Maintain aspect ratio */
    justify-content: center;
    margin: 0 auto;
  }
}
