@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300&display=swap');

* {
  -webkit-transition: all 1s ease-in-out;
  -moz-transition: all 1s ease-in-out;
  -ms-transition: all 1s ease-in-out;
  -o-transition: all 1s ease-in-out;
  transition: all 1s ease-in-out;
}

h1 {
  margin-top: 30px;
  text-transform: uppercase;
  font-family: 'Work Sans', sans-serif;
  text-align: center;
}

.block {
  max-width: 900px;
  background: rgb(245, 244, 244);
  padding: 20px;
  margin: 30px auto;
  column-count: 4;
  column-gap: 1em;
  height: auto;
}


.item {
  display: inline-block;
  margin: 0 0 1em;
  background-color: #bcbdbd;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(34, 25, 35, 0.2);
  border-radius: 3px;
  vertical-align: top;
  width: 100%;
  overflow: hidden;
  -webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
  backface-visibility: hidden;
  position: relative;
}

.like {
  position: absolute;
  display: inline-block;
  background-image: url(img/heart-gray.svg);
  background-repeat: no-repeat;
  background-size: cover;
  width: 17px;
  height: 15px;
  z-index: 5;
  right: 10px;
  top: 10px;
  object-fit: cover;
  transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.like:hover {
  -webkit-transform: scale(1.3);
  -moz-transform: scale(1.3);
  -ms-transform: scale(1.3);
  -o-transform: scale(1.3);
  transform: scale(1.2);
}

.like.active {
  background-image: url(img/heart-pink.svg);
  -webkit-transform: scale(1.3);
  -moz-transform: scale(1.3);
  -ms-transform: scale(1.3);
  -o-transform: scale(1.3);
  transform: scale(1.2);
}

img {
  max-width: 100%;
  vertical-align: middle;
}

img:hover {
  -webkit-transform: scale(1.3);
  -moz-transform: scale(1.3);
  -ms-transform: scale(1.3);
  -o-transform: scale(1.3);
  transform: scale(1.3);
}


@media screen and (max-width: 1000px) {
  .block {
    column-count: 3;
    column-gap: 1em;
  }
}

@media screen and (max-width: 750px) {
  .block {
    column-count: 2;
    column-gap: 1em;
  }
}

@media screen and (max-width: 500px) {
  .block {
    column-count: 1;
    column-gap: 1em;
  }
}
