/* Box Model Hack */
* {
  box-sizing: border-box;
}

/* Clear fix hack */
.clearfix:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.clear {
  clear: both;
}

/******************************************
/* BASE STYLES
/*******************************************/

body {
  font-family: "Trebuchet MS", sans-serif;
}

main {
  margin-top: 50px;
  width: 90%;
  margin: 20px auto;
  position: relative;
}

/******************************************
/* LAYOUT
/*******************************************/
.cards {
  display: grid;
  margin: auto;
  grid-template-columns: 1fr 1fr;
  font-size: 2rem;
  border: 5px solid black;
  box-shadow: 5px 5px gray;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  min-width: 411px;
  
}

.profile {
  border: 2px solid black;
  width: 100%;
  padding: 10px 5px;
  background-color: white;
}

.profile span {
  font-size: 1rem;
  color: gray;
  margin-top: 10px;
}

.race {
  display: block;
}

.img-container {
  width: 100%;
  height: 20rem;
  position: relative;
}

.image {
  position: absolute;
  height: 80%;
  margin: 20px 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Stack overflow, center an absolute elem */
}

.image:hover{
  height: 23rem;
}

.description {
  font-size: 1rem;
  padding: 10px 5px;
  background-color: white;
  border: 2px solid black;
  text-align: justify;
  padding: 20px;
  color: gray;
  display: block;
  width: 100%;
  min-height: 20rem;
}

.win {
  text-align: center;
  font-size: 2.3rem;
  margin-bottom: 10px;
}

main > div{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

button{
  font-size: 1.4rem;
  padding: 10px;
  border: 2px solid black;
  box-shadow: 5px 5px gray;
  background-color: rgb(121, 40, 40);
  color: white;
  margin-bottom: 5px;
  min-width: 10rem;
  height: fit-content;
}

@media screen and (max-width:980px) {
  .cards {
    grid-template-columns: 1fr;
    place-self: center;
  }

  main div{
    flex-direction: column;
    align-items: center;
    min-width: 415px;
  }
}