/** Body Styles */
.container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
}

.card {
  height: 250px;
  position: relative;
  transition: all 0.5s ease-in-out;
  background-color: var(--background);
  border: 1px solid #F0F0F0;
  border-radius: 8px;
  padding: 8px;
  margin: 8px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  color: var(--background);
  transition: all 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay:hover {
  background: linear-gradient(
    45deg,
    var(--teal) 30%,
    var(--blue) 100%
  );
  border-radius: 8px;
  transition: all 0.5s ease-in-out;
  opacity: 0.3;
}

.card img {
  height: 100%;
}

.card .contents {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.card.expanded {
  width: 100%;
  height: 400px;
  transition: all 0.5s ease-in-out;
}

.card.expanded .overlay {
  width: 0;
  height: 0;
}

.card.expanded .overlay:hover {
  opacity: 0;
}

.card.expanded .details {
  padding: 1em;
  display: flex;
  flex-direction: column;
}

.card.expanded .details .close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 16px;
  cursor: pointer;
}

.card:not(.expanded) .details {
  width: 0;
  opacity: 0;
  overflow: hidden;
}

.desc {
  flex-grow: 1;
}

@media screen and (max-width: 600px) {
  .container {
    height: fit-content;
  }

  .card {
    height: auto;
  }

  .card .contents {
    width: 100%;
    height: auto;
  }

  .card.expanded .contents {
    flex-direction: column;
  }

  .card:not(.expanded) .details {
    height: 0;
    width: 0;
    opacity: 0;
    overflow: hidden;
  }

  .card .contents > img {
   width: 100%;
  }

  .card.expanded {
    height: auto;
    transition: all 0.5s ease-in-out;
  }
}