.card-img {
  width: 240px;
  overflow: hidden;
  border-radius: 10px;
}

.small-img {
  width: 240px;
  cursor: pointer;
  transition: 0.5s;
}

.small-img:hover {
  transform: scale(1.2);
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.modal-img {
  width: 50vw;
}

.modal {
  z-index: 2;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s linear, opacity 0.3s linear;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close {
  cursor: pointer;
  color: white;
  background-color: rgba(0, 0, 0, 0.8);
  position: absolute;
  right: 30px;
  top: 30px;
  padding: 5px 15px;
  font-size: 2rem;
  border: 1px solid white;
  transition: 0.5s;
}

.close:hover {
  transform: scale(1.3);
  background-color: red;
}

.modal-active {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 1000px) {
  .row {
    display: grid;
    grid-template-columns: 240px 240px;
    justify-content: center;
    gap: 10px;
  }
}

@media (max-width: 700px) {
  .modal-img {
    width: 70vw;
  }
}

@media (max-width: 500px) {
  .card-img {
    max-width: 180px;
  }
  .small-img {
    max-width: 180px;
  }
  .row {
    grid-template-columns: 180px 180px;
  }
  .modal-img {
    width: 90vw;
  }
  .modal {
    left: 0;
    width: 100%;
    height: 100%;
  }
  .small-img:hover {
    transform: scale(1);
  }
}
