.cards {
    display: flex;
    padding: var(--space-smaller);

    flex-wrap: wrap;
}

.cards--in-column {
    flex-direction: column;
}

.cards--centered {
    justify-content: center;
}

.card {
    position: relative;

    display: flex;
    width: 100%;
    max-width: 100%;
    margin-bottom: var(--space-medium);

    flex-direction: column;
    flex-grow: 1;

    box-shadow: 0 0 3px 0 var(--color-grey-3);
    border-radius: var(--border-radius);

    transition:
        background-color 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out;
}

.card:focus-within {
    box-shadow: 0 1px 4px 1px var(--color-grey-3);
}

@media (min-width: 800px) {
    .card {
        margin-right: 1%;
        margin-left: 1%;
    }

    .card:not(.card--fluid) {
        max-width: 31%;
    }
}

.card--shadow {
    background-color: var(--color-grey-1);
    box-shadow: none;
}

.card--shadow:focus-within {
    box-shadow: none;
}

.card--showcase {
    padding: var(--space-small);

    align-items: center;
    justify-content: center;

    text-align: center;

    box-shadow: none;
}

.card--illustrated {
    min-height: 150px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.card__button {
    min-height: 150px;
    padding: var(--space-medium) var(--space-small);

    flex: 1;

    color: var(--color-white);

    background-color: var(--color-accent-text);
    border: none;
    border-radius: var(--border-radius);
}

.card__button:hover,
.card__button:focus {
    background: var(--color-accent-text-contrast);
}

@media (min-width: 800px) {
    .card__button--link {
        min-height: 300px;
    }
}

.card__image {
    display: block;
    width: 100%;
    min-height: 156px;
}

.card__body {
    padding: var(--space-small);

    flex-grow: 1;

    background-color: var(--color-white);
}

.card__body:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card__body:last-child,
.card__footer {
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.card--illustrated .card__body {
    padding-top: calc(25px + var(--space-small));

    color: var(--color-white);
    text-decoration: none;
    text-shadow:
        -1px 1px 1px var(--color-grey-text-contrast),
        1px 1px 1px var(--color-grey-text-contrast),
        1px -1px 0 var(--color-grey-text-contrast),
        -1px -1px 0 var(--color-grey-text-contrast);

    background-color: rgb(0, 0, 0, 30%);
    background-image:
        linear-gradient(
            to bottom,
            transparent 0,
            rgb(0, 0, 0, 40%) 25px,
            rgb(0, 0, 0, 60%) 45px,
            rgb(0, 0, 0, 80%)
        );

    transition: background-color 0.3s ease-in-out;
}

.card--illustrated .card__body--large {
    padding-top: calc(70px + var(--space-small));

    background-image:
        linear-gradient(
            to bottom,
            transparent 30px,
            rgb(0, 0, 0, 40%) 70px,
            rgb(0, 0, 0, 60%) 90px,
            rgb(0, 0, 0, 80%)
        );
}

.card--illustrated .card__body--larger {
    padding-top: calc(156px + var(--space-small));

    background-image:
        linear-gradient(
            to bottom,
            transparent 110px,
            rgb(0, 0, 0, 40%) 150px,
            rgb(0, 0, 0, 60%) 170px,
            rgb(0, 0, 0, 80%)
        );
}

.card--illustrated a.card__body:hover,
.card--illustrated a.card__body:focus {
    color: var(--color-white);

    background-color: transparent;
}

.card--illustrated .sticker {
    text-shadow: none;
}

.card__title {
    margin-top: 0;
    margin-bottom: var(--space-medium);

    font-size: var(--size-normal);
    font-weight: bold;
    line-height: 1.25;
}

.card__title a {
    display: block;

    text-decoration: none;
}

.card__title-ellipsis {
    overflow: hidden;

    text-overflow: ellipsis;
}

.card__text {
    margin-top: var(--space-small);
    margin-bottom: var(--space-small);

    color: var(--color-text-secondary);
    font-size: var(--size-small);
    overflow-wrap: anywhere;
}

.card--illustrated .card__text {
    color: var(--color-white);

    opacity: 0.8;
}

.card__text--oneline {
    display: flex;

    align-items: baseline;

    white-space: nowrap;
}

.card__text--extend {
    flex: 1;
}

.card__ellipsis {
    overflow: hidden;

    text-overflow: ellipsis;
}

.card__footer {
    display: flex;
    padding: var(--space-small);

    align-items: center;
    justify-content: space-between;

    background-color: var(--color-pampas);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.card--illustrated .card__footer {
    color: var(--color-white);

    background-color: rgb(0, 0, 0, 90%);
    background-image: none;
    box-shadow: none;
}

.card--illustrated .card__footer button {
    color: var(--color-white);

    background-color: var(--color-grey-9);
    border-color: var(--color-grey-5);
}

.card--illustrated .card__footer button:hover {
    background-color: var(--color-grey-8);
}

.card__footer--centered {
    justify-content: center;
}

.card__footer-group {
    display: flex;

    align-items: center;
}

.card__footer-group > * + * {
    margin-left: var(--space-small);
}
