@IMPORT <link href="https://fonts.googleapis.com/css?family=Poor+Story" rel="stylesheet">

* {
box-sizing: border-box;
}

#modal_polaroid{width: 90vw; height: 90vh; margin: 0 auto;}
.modal-dialog {width: 80vw; height: 80vh; margin: 0; padding: 0;}

.modal-header {height: 0; border: none; margin: 0; padding: 0; }
.modal-content {
  width: 100%; height: 80vh;
  background-color: transparent;
  box-shadow: none; border: none}

.polaroid-wrapper {
  font-family: 'Poor Story', cursive;
  width: 100%;
  padding: 0 2rem;
  text-align: center;
  position: relative;
  top: 10vh;
}
.polaroid-wrapper .polaroid {
  background: #fff;
  padding: 1rem;
  box-shadow: 0 0.2rem 1.2rem rgba(0,0,0,0.2);

}
.polaroid-wrapper .polaroid > img{
  max-width: 100%;
  height: auto;
}
.polaroid-wrapper .caption {
  font-size: 1.8rem;
  text-align: center;
  line-height: 2em;
}
.polaroid-wrapper .item {
  width: 33%;
  left: -25%;
  display: inline-block;
  margin-top: 2rem;
  filter: grayscale(100%);
}
.polaroid-wrapper .item .polaroid:before {
  content: '';
  position: absolute;
  z-index: -1;
  transition: all 0.35s;
}
.polaroid-wrapper .item:nth-of-type(4n+1) {
  transform: scale(0.8, 0.8) rotate(5deg);
  transition: all 0.35s;
}
.polaroid-wrapper .item:nth-of-type(4n+1) .polaroid:before {
  transform: rotate(6deg);
  height: 20%;
  width: 47%;
  bottom: 30px;
  right: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0,0,0,0.4);
}
.polaroid-wrapper .item:nth-of-type(4n+2) {
  transform: scale(0.8, 0.8) rotate(-5deg);
  transition: all 0.35s;
}
.polaroid-wrapper .item:nth-of-type(4n+2) .polaroid:before {
  transform: rotate(-6deg);
  height: 20%;
  width: 47%;
  bottom: 30px;
  left: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0,0,0,0.4);
}
.polaroid-wrapper .item:nth-of-type(4n+4) {
  transform: scale(0.8, 0.8) rotate(3deg);
  transition: all 0.35s;
}
.polaroid-wrapper .item:nth-of-type(4n+4) .polaroid:before {
  transform: rotate(4deg);
  height: 20%;
  width: 47%;
  bottom: 30px;
  right: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0,0,0,0.3);
}
.polaroid-wrapper .item:nth-of-type(4n+3) {
  transform: scale(0.8, 0.8) rotate(-3deg);
  transition: all 0.35s;
}
.polaroid-wrapper .item:nth-of-type(4n+3) .polaroid:before {
  transform: rotate(-4deg);
  height: 20%;
  width: 47%;
  bottom: 30px;
  left: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0,0,0,0.3);
}
.polaroid-wrapper .item:hover {
  filter: none;
  transform: scale(1, 1) rotate(0deg) !important;
  transition: all 0.35s;
}
.polaroid-wrapper .item:hover .polaroid:before {
  content: '';
  position: absolute;
  z-index: -1;
  transform: rotate(0deg);
  height: 90%;
  width: 90%;
  bottom: 0%;
  right: 5%;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.2);
  transition: all 0.35s;
}

#modal_polaroid button.close {
  position: relative !important; 
  top: 15vh !important; 
  border-radius: 50% !important; 
  background-color: red !important; 
  color: white !important;
  opacity: 1;
  z-index: 1000;
}

.polaroid-thumb {max-height: 30vh !important;}


@media screen and (min-width: 1024px) {
  .polaroid-wrapper .item {
    width: 30%;
    /* margin-top: 0; */
  }
}  

@media screen and (min-width: 1200px) {
  #modal_polaroid{width: 70vw; height: 80vh; margin: 0 auto; top: 10vh;}
  .modal-dialog {width: 70vw; height: 80vh;}

  .polaroid-wrapper .item {
    width: 28%;
    margin-top: 0;
  }

}


