@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&family=Oooh+Baby&display=swap');

.bg {
  background-image: url(/assets/brick-2cb3355f74b71eb183494b38f69c4019ec488c98a5354bb3b6c0dece7ff3f22e.jpg);
  background-size: cover;
  background-repeat: repeat-y;
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: -10000;
}

.wrapper {
  width: 100%;
  text-align: center;
}

.polaroid {
  background: #fff;
  box-shadow: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.5);
}
.polaroid > img {
  max-width: 100%;
  height: auto;
}
.caption {
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  font-family: 'Noto Sans', sans-serif;
}

.item:hover .caption {
  overflow-y: scroll;
  display: block;
}
.caption::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 7px;
}

.caption::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, .5);
  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}


.signature {
  position: relative;
  color: #fff;
  font-family: "Oooh Baby", cursive;
  text-align: right;
  text-shadow: -1px 1px 5px rgba(120, 110, 40, 0.7),
    1px 1px 5px rgba(120, 110, 40, 0.7), 1px -1px 5px rgba(120, 110, 40, 0.7),
    -1px -1px 5px rgba(120, 110, 40, 0.7);
}
.item {
  display: inline-block;
  filter: grayscale(40%);
  z-index: 1;
}
/* shadow */
.item .polaroid:before {
  content: "";
  position: absolute;
  z-index: -1;
  transition: all 0.2s;
  height: 10%;
  width: 47%;
  bottom: 30px;
}

.item:nth-of-type(4n + 1) {
  transform: scale(0.8, 0.8) rotate(5deg);
  transition: all 0.2s;
}
.item:nth-of-type(4n + 1) .polaroid:before {
  transform: rotate(6deg);
  box-shadow: 0 2.1rem 2rem rgba(0, 0, 0, 0.4);
}
.item:nth-of-type(4n + 2) {
  transform: scale(0.8, 0.8) rotate(-5deg);
  transition: all 0.2s;
  right: 12px;
}
.item:nth-of-type(4n + 2) .polaroid:before {
  transform: rotate(-6deg);
  left: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0, 0, 0, 0.4);
}
.item:nth-of-type(4n + 4) {
  transform: scale(0.8, 0.8) rotate(3deg);
  transition: all 0.2s;
}
.item:nth-of-type(4n + 4) .polaroid:before {
  transform: rotate(4deg);
  right: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0, 0, 0, 0.3);
}
.item:nth-of-type(4n + 3) {
  transform: scale(0.8, 0.8) rotate(-3deg);
  transition: all 0.2s;
}
.item:nth-of-type(4n + 3) .polaroid:before {
  transform: rotate(-4deg);
  left: 12px;
  box-shadow: 0 2.1rem 2rem rgba(0, 0, 0, 0.3);
}
.item:hover {
  filter: none;
  position: relative;
  transform: scale(1.8, 1.8) rotate(0deg) !important;
  transition: all 0.2s;
  z-index: 10000;
}

/* shadow effect  */
.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.2s;
}

/* Mobile Portrait (<576px) */
.polaroid {
  padding: .7rem;
}

.title {
  margin: 10px;
  font-size: 22px;
  margin-top: 10px;
}
.wrapper {
  padding: 0;
}
.signature {
  font-size: 11px;
  margin-right: 10px;
  margin-top: -18px;  
}
.caption {
  height: 34px;
  margin-top: 5px;
  font-size: 8px;
  line-height: 12px; 
}
.item {
  width: 43vw;
  margin-top: .5rem;
}

.item:hover  {
  transform: scale(1.5, 1.5) rotate(0deg) !important;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .wrapper {
    padding: 0;
  }
  .signature {
    font-size: 18px;
    margin-right: 13px;
    margin-top: -26px;  
  }
  .caption {
    height: 48px;
    margin-top: 5px;
    font-size: 10px;
    line-height: 15px; 
  }
  .item {
    width: 45vw;
    margin-top: .7rem;
  }
  
  .item:hover  {
    transform: scale(1.3, 1.3) rotate(0deg) !important;
  }
}

/* Medium devices (tablets, 768px and up) */

@media (min-width: 768px) {
  .polaroid {
    padding: 1rem;
  }
  .wrapper {
    padding: 0 1vw;
  }
  .signature {
    font-size: 16px;
    margin-right: 13px;
    margin-top: -25px;  
  }
  .caption {
    height: 50px;
    margin-top: 10px;
    font-size: 11px;
    line-height: 16px; 
  }
  .item {
    width: 29vw;
    margin-top: 1.5rem;
  }

  .item:hover  {
    transform: scale(1.5, 1.5) rotate(0deg) !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .wrapper {
    padding: 0;
  }
  .signature {
    font-size: 16px;
    margin-right: 13px;
    margin-top: -28px;  
  }
  .caption {
    height: 50px;
    margin-top: 10px;
    font-size: 11px;
    line-height: 16px; 
    
  }
  .item {
    width: 22vw;
    margin-top: 2rem;
  }

  .item:hover  {
    transform: scale(1.6, 1.6) rotate(0deg) !important;
  }
}

/* Extra large devices (large desktops, 1200px and up) */

@media (min-width: 1200px) {
  .title {
    margin-top: 160px;
  }
  .wrapper { 
    padding: 0 3rem;
  }
  .item {
    width: 17.5vw;
    margin-top: 2rem;
  }
  .item:hover  {
    transform: scale(1.8, 1.8) rotate(0deg) !important;
  }
  .signature {
    font-size: 17px;
    margin-right: 13px;
    margin-top: -28px;  
  }
  .caption {
    height: 58px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 18px; 
  }
}


