/* 開くボタン */
.button-open {
  display: block;
  margin: 0 auto;
  width: 20rem;
  padding: 1em;
  background-color: #3140c9;
  color: #eaeaea;
  border-radius: 20rem;
  cursor: pointer;
}
/* モーダルウィンドウ */
.modal-window {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 5px;
  z-index: 11;
  padding: 2rem;
}
/* 閉じるボタン */
.button-close {
  position: absolute;
  top: 0%;
  right: 0%;
  width: 50px;
  cursor: pointer;
}
/* オーバーレイ */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  z-index: 10;
}

.gallery{
  position: relative;
  max-width: 1500px;
  width: 100%;
  height:auto;
  
}

.masonry {
  margin: 20px auto;
  margin-top: 60px;
}

.item {
  width: 300px;
}

#grid {
  margin: 0 auto;
  width: 100%;
  
}

.grid-sizer,
.grid-item {
  width: 23%;
  margin-bottom: 3%;
}

.grid-item:hover{
  opacity: 0.8;
}

.grid-item.no_opacity:hover{
  opacity: 1;
}


.grid-item img {
  width: 100%;
  height: auto;
}

.gutter-sizer {
  width: 2%;
}


@media screen and (max-width: 1024px) {
  
    .modal-window img {
      max-width: 600px;
      height: auto;
      
    }
  
  }
  


@media screen and (max-width: 768px) {
.grid-sizer,
.grid-item {
    width: 48.5%;
    margin-bottom: 10px;
  }

  .modal-window img {
    max-width: 450px;
    height: auto;
    
  }

}

@media screen and (max-width: 450px) {

  .modal-window img {
    max-width: 300px;
    height: auto;
  }


}