@charset "UTF-8";

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin: 2rem 1rem;
}

.gallery img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  cursor: pointer;
}

.hidden {
  display: none;
}

#loadMore {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  padding: 20px;
}

.modal img {
  width: 30%;
  height: auto;
  object-fit: cover;
  margin: auto;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px;
}

@media screen and (min-width:375px) and (max-width:430px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .modal img {
    width: 100%;
  }

  .close {
    top: -43px;
  }
  
  .rightbottom-box {
    right: 13px;
  }
}

@media screen and (min-width:768px) and (max-width:960px) {
  .modal img {
    width: 90%;
  }
}