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

/* Common styles for both media queries */

.popup {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 70%;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  z-index: 10001;
  overflow-y: scroll;
}

#popup_images {
  border: 1px solid #ccc;
  position: static;
}

#popup_images img,
#popup_images video {
  cursor: pointer;
}

#popup_information {
  font-family: Verdana, sans-serif;
}

table#popup_table {
  text-align: left;
  position: static;
  overflow-y: scroll;
}

table#popup_table tr {
  position: static;
  overflow-y: scroll;
}

table#popup_table td {
  overflow-y: scroll;
}

.background_div {
  display: none;
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: black;
  opacity: 40%;
  z-index: 10002;
}

.image_div {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 70%;
  background-color: #ffffff;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  z-index: 10003;
  overflow-y: scroll;
}

#image_div2 {
  width: 100%;
  height: 100%;
  border: 1px solid #ccc;
  position: static;
  text-align: center;
}

#image_div2 img,
#image_div2 video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.closeImage {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  font-size: 20px;
  padding: 10px 15px;
  border: none;
  position: absolute;
  width: 45px;
  height: 45px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #000;
  background-color: white;
  border: none;
  border-radius: 45px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease 0s;
  cursor: pointer;
  outline: none;
}

.closeImage:hover {
  background-color: rgb(196, 194, 194);
}

.image-grid {
  display: grid;
  gap: 10px;
}

.image-item {
  cursor: pointer;
}

/* Media query for min-width 770px */

@media (min-width: 770px) {
  #btn_close_popup,
  #btn_close_image {
    padding: 0;
    position: absolute;
    top: 5px;
    right: 10px;
  }

  .popup {
    width: 60%;
    height: 70%;
    padding: 30px 40px;
  }

  #popup_images {
    width: 100%;
    height: 55%;
    max-height: 66%;
  }

  #popup_images img,
  #popup_images video {
    width: 33%;
  }

  #popup_information {
    max-height: 40%;
  }

  table#popup_table {
    max-height: 25%;
  }

  table#popup_table tr {
    height: 25%;
  }

  table#popup_table td {
    width: 50%;
    height: 10;
    max-height: 25%;
  }
}

/* Media query for max-width 769px */

@media (max-width: 769px) {
  .popup {
    width: 100%;
    height: 100%;
    padding: 10px 15px;
    text-align: center;
  }

  #btn_close_popup,
  #btn_close_image {
    padding: 0;
    position: absolute;
    top: 5px;
    right: 10px;
  }

  #popup_images {
    width: 100%;
    height: 63%;
    max-height: 66%;
  }

  #popup_images img,
  #popup_images video {
    width: 33%;
  }

  #popup_information {
    max-height: 33%;
  }

  table#popup_table {
    height: 200px;
    max-height: 25%;
  }

  table#popup_table tr {
    height: 25%;
  }

  table#popup_table td {
    padding: 5px;
    width: 50%;
    height: 25%;
    max-height: 25%;
  }

  .image_div {
    width: 80%;
    height: auto;
  }

  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
