.card {
  max-inline-size: 12rem;
  padding: 1rem;
  background: white;
  color: black;
  border: 2px solid #1d3557;
  transition-property: box-shadow, translate;
  transition-duration: 0.25s;
}

.card:hover,
.card:focus-visible {
  border-color: tomato;
  box-shadow: 0.35rem 0.35rem 0 #e9c46a;
  translate: 0.15rem 0.1rem;
}