/* body rules included when showing the example as a live example 
body {
  background-color: #fff;
  color: #333;
  font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
  padding: 0;
  margin: 0;
}
*/

/*
img {
  max-width: 100%;
}
*/

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-template-rows: auto 1fr auto;
  grid-gap: 20px;
  /*max-width: 800px;*/
  margin: 1em auto;
  height: 100%;
}

 /* Responsive columns */
 @media screen and (max-width: 600px) {
  .cards {
    width: 100%;
    display: block;
    margin-bottom: 20px;
  }
}

.card {
  display: grid;
  grid-template-rows: max-content 200px 1fr;
  /*border: 0px solid #999;
  border-radius: 3px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  padding: 16px;*/
  text-align: center;
  /*background-color: #f1f1f1;*/
  background-color: transparent;
  perspective: 1000px; /* Remove this if you don't want the 3D effect */
}

.card img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.card h3 {
  margin: 0;
  padding: .5rem;
  color: black;
}

.card .content {
  padding: .5rem;
  background-color: #f1f1f1;
}

.card .body {
  background-color: #f1f1f1;
}

.card footer {
  background-color: #f1f1f1;
  color: #f1f1f1;
  padding: .5rem;
}

.card header {
  background-color: #009485;
  color: #fff;
  padding: .5rem;
}

/*
.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
*/

/* W3 schools flip cards: https://www.w3schools.com/howto/howto_css_flip_card.asp
/* The flip card container - set the width and height to whatever you want. We have added the border property to demonstrate that the flip itself goes out of the box on hover (remove perspective if you don't want the 3D effect */
.flip-card {
  background-color: transparent;
  width: 300px;
  height: 200px;
  border: 1px solid #f1f1f1;
  perspective: 1000px; /* Remove this if you don't want the 3D effect */
}

/* This container is needed to position the front and back side */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* This container is needed to position the front and back side */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* Do an horizontal flip when you move the mouse over the flip box container */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Do an horizontal flip when you move the mouse over the flip box container */
.card:hover .card-inner  {
  transform: rotateY(180deg);
}

/* Position the front and back side */
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
}

/* Style the front side (fallback if image is missing) */
.flip-card-front {
  background-color: #bbb;
  color: black;
}

/* Style the front side (fallback if image is missing) */
.card-front {
  background-color: #bbb;
  color: black;
}

/* Style the back side */
.flip-card-back {
  background-color: dodgerblue;
  color: black;
  transform: rotateY(180deg);
}

/* Style the back side */
.card-back {
  background-color: dodgerblue;
  color: black;
  transform: rotateY(180deg);
}
