@import url('https://fonts.googleapis.com/css2?family=Rock Salt&display=swap');

figure {
    /* background-color: orange;*/
    width: 250px;
    height: auto;
    float: left;

    padding: 1em 1em 3em 1em;
    border: 1px solid #444444;
    background-color: #222222;
    margin: 0 2em 2em 2em;
    box-shadow: 5px 5px 10px #555;
    /* transform: rotate(1deg); */
}

figure img {
    width: 100%;
    height: auto;
}

figcaption {
    font-family: 'Cambria', cursive;
    font-size: 20px;
    color: #cc3300;
    padding-top: 1em;
    line-height: 1.2em;
    text-align: center;
}

/* ***************************************************************** */

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

.card {
    background-color: #333;
    color: #cc3300;
    display: grid;
    grid-template-rows: max-content 250px 1fr;
    border: 1px solid #222222;
    border-radius: 3px;
    box-shadow: 5px 5px 10px #555;
}

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

.card h2 {
    margin: 0;
    padding: .5rem;
    min-height: 3em;
}

.card .content {
    padding: .5rem;
    color: #dddddd00;
}

.card footer {
    font-family: 'Cambria', cursive;
    font-size: 20px;
    padding: .5rem;
    line-height: 1.2em;
    text-align: center;
    min-height: 1em;
}

/* ***************************************************************** */

.container {
  display: inline-block;
  position: relative;
  width: 8em; height: 10em;
}
.container img {
  position: absolute;
  top: 50%; left: 50%;
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  transform: translate(-50%, -50%);
}
