
.cards {
    display: flex;
    flex-direction: row;
    padding: 0px;
}

.flip-card {
    background-color: transparent;
    perspective: 1000px;
    margin: 1em 1.4em 1em 0;
    cursor: pointer;
    position: relative;
    display: inline-block;
    width: 350px;
    height: 50vh;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.flip-card-front {
    justify-content: flex-start;
    align-items: baseline;
}

.flip-card-back {
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
}

.flip-card-front,
.flip-card-back {
    display: flex;
    position: absolute;
    backface-visibility: hidden;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
    padding: 15px;
    color: #222;
    background: whitesmoke;
    /* border: 1px solid rgba(0, 0, 0, 0.2); */
    z-index: 1;
    /* Ensure unflipped card stays at the back */
    overflow-y: auto;
    /* makes it so there's no extra whitespace under image */
}

.flip-card:focus {
    box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

.flip-card h3 a:focus,
.flip-card p a:focus,
.flip-card small a:focus {
    text-decoration: underline;
}

.flip-card h3:focus-within~.cta,
.flip-card p:focus~.cta,
.flip-card small:focus-within~.cta {
    box-shadow: 0 0 0 0.125rem;
}

.flip-card:focus-within h3 a:focus,
.flip-card:focus-within small a:focus,
.flip-card:focus p a:focus {
    text-decoration: none;
}

/* for screen readers */
.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

small {
    color: #00467f;
}

@media screen and (max-width: 600px) {
    .cards {
        flex-direction: column;
    }

    .flip-card {
        margin: 1em 0 1em 1em;
        width: 400px;
        height: 50vh;
    }
}


/* other styles on the page */

.hanging-indentation {
    padding-left: 3em;
    text-indent: -3em;
}

.panel-danger {
    margin-top: 3em;
}

.note,
.panel-danger>.panel-heading {
    color: #741F11;
    font-weight: 600;
}

figcaption {
    border-left: none;
    color: black;
}

.transcription {
    font-size: .9em;
    margin-top: 2em;
}

/* for map image */
@media screen and (min-width: 768px) {
    .row.vessel {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
}