/* Molecule */
.m-card-b {
    display: grid;
    align-items: center;
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;

    @media (width >=768px) {
        min-height: 294px;
        height: 100%;
    }

    & .a-heading {
        font-family: var(--font-family-heading);
        color: var(--color-black);
        font-size: 28px;
        line-height: 1.142;
        text-transform: uppercase;
    }

    & .a-button.a-button--secondary{
        &:hover {
            background-color: var(--color-red-hover);
            color: var(--color-white);
            border-color: var(--color-red-hover);
        }
    }
}

.m-card-b__media {
    width: 100%;
    height: auto;
    aspect-ratio: unset;
    /*aspect-ratio: 1/1;*/

    @media (width >=768px) {
        height: 100%;
    }
}

.m-card-b__media img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.m-card-b__content {
    padding-top: 2.5rem;
    padding-bottom: 1.6rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.m-card-a__heading {
    margin-bottom: 1.25rem;

    @media (width > 768px) {
        margin-bottom: .9rem;
    }
}

.m-card-b__content a {
    align-self: center;
}

.m-card-b__text {
    font-family: var(--font-family-primary);
    color: var(--color-grey);
    font-size: var(--font-size-h5);
    line-height: 1.277;
    margin-top: 0;
    margin-bottom: .25rem;

    @media (width > 768px) {
        max-width: calc(423px + 30px);
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
    }
}

.m-card-b.reverse {
    @media (width >=768px) {
        grid-template-columns: 50% 50%;
    }
}

.m-card-b.reverse .m-card-b__content {
    @media (width >=768px) {
        order: -1;
    }
}

@media (width >=768px) {
    .m-card-b:not(.reverse) {
        grid-template-columns: 50% 50%;
    }
}

/* Organism */
.o-cards-b {
    padding-top: 30px;
    padding-bottom: 65px;

    @media (width > 768px) {
        padding-top: 69px;
        padding-bottom: 101px;
    }

    & .container {
        @media (width<=768px) {
            max-width: 88%;
        }
    }

    & .a-heading {
        font-size: clamp(var(--title-md), 1.25rem + 3vw, var(--title-lg));
    }

    & .a-button {
        padding: .9rem 1.75rem;

        @media (width > 768px) {
            padding: 0.86rem 1.7em;
        }
    }

    & .m-card-b__text {
        line-height: 1.5em;
    }
}

.o-cards-b__header {
    margin-bottom: 2.5rem;

    @media (width >= 768px) {
        margin-bottom: 3.5rem;
    }
}

.o-cards-b__title {
    font-size: clamp(2.25rem, 2.125rem + 0.5vw, 2.5rem);
    margin-bottom: 1rem;
}

.o-cards-b__description {
    font-family: var(--font-family-primary);
    line-height: 1.35;
    width: 90%;
    max-width: 674.53px;
    margin-left: auto;
    margin-right: auto;
}

.o-cards-b__items {
    margin-top: 1rem;

    @media (width >=768px) {
        margin-top: 40px;
    }

    @media (width < 768px) {
        display: flex;
        flex-direction: column;
        gap: 50px;
    }
}

.o-cards-b__additional-info {
    width: 94%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 92px;
    font-family: var(--font-family-primary);
    font-size: 1.125rem;
    line-height: 1.35;
    text-align: center;
    color: var(--color-grey);

    @media (width > 768px) {
        width: 83%;
        margin-top: 60px;
    }
}