/*
 * MDS - WPBakery Card
 * Version 1.1.0
 *
 * Completely plugin-specific class namespace: mdswpc-
 * The whole .mdswpc-card is an <a> when a Card Link is supplied.
 */

.mdswpc-card,
#Content .mdswpc-card {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    float: none;
    position: relative;

    background: #fff;
    border: 1px solid rgba(0, 151, 178, 0.18);
    border-radius: 14px;
    padding: 30px;

    color: inherit;
    text-decoration: none !important;
    cursor: pointer;

    transition:
        box-shadow 0.22s ease,
        transform 0.22s ease,
        border-color 0.22s ease;
}

/* If no URL has been entered, WP renders a div instead of an anchor. */
div.mdswpc-card,
#Content div.mdswpc-card {
    cursor: default;
}

/* Subtle card interaction now that the entire card is clickable. */
a.mdswpc-card:hover,
a.mdswpc-card:focus,
#Content a.mdswpc-card:hover,
#Content a.mdswpc-card:focus {
    color: inherit;
    text-decoration: none !important;
    border-color: rgba(0, 151, 178, 0.30);
    box-shadow: 0 12px 30px rgba(0, 98, 118, 0.10);
    transform: translateY(-2px);
}

a.mdswpc-card:focus-visible,
#Content a.mdswpc-card:focus-visible {
    outline: 2px solid var(--cem-teal, rgb(0, 151, 178));
    outline-offset: 3px;
}

/* Icon tile */
.mdswpc-card__icon {
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px;

    border-radius: 12px;
    background: var(--cem-teal-tint, rgb(227, 243, 248));
    overflow: hidden;
}

.mdswpc-card__icon-image,
#Content .mdswpc-card__icon-image {
    display: block;
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Heading */
.mdswpc-card__heading,
#Content .mdswpc-card__heading,
a.mdswpc-card .mdswpc-card__heading,
#Content a.mdswpc-card .mdswpc-card__heading {
    margin: 0 0 10px;
    padding: 0;
    font-family: var(--cem-font-head, Georgia, 'Times New Roman', serif);
    font-size: 21px;
    line-height: 26px;
    font-weight: 700;
    color: var(--cem-ink, rgb(0, 98, 118));
    text-decoration: none;
}

/* Description */
.mdswpc-card__description,
#Content .mdswpc-card__description,
a.mdswpc-card .mdswpc-card__description,
#Content a.mdswpc-card .mdswpc-card__description {
    margin: 0;
    padding: 0;
    font-family: var(--cem-font-body, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
    font-size: 16px;
    line-height: 1.65;
    color: var(--cem-card-text, #555);
    text-decoration: none;
}

.mdswpc-card__description p,
#Content .mdswpc-card__description p {
    margin: 0;
    line-height: 1.65;
    color: inherit;
    font-size: 15px;
    font-weight: 400;
}

.mdswpc-card__description p + p,
#Content .mdswpc-card__description p + p {
    margin-top: 1em;
}

/*
 * Visual CTA. This is deliberately a span, not another <a>, because the
 * whole card itself is already the clickable anchor.
 */
.mdswpc-card__cta,
#Content .mdswpc-card__cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    margin-top: 16px;

    font-family: var(--cem-font-body, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--cem-teal, rgb(0, 151, 178));
    text-decoration: none;
}

.mdswpc-card__cta-arrow {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.18s ease;
}

a.mdswpc-card:hover .mdswpc-card__cta,
a.mdswpc-card:focus .mdswpc-card__cta,
#Content a.mdswpc-card:hover .mdswpc-card__cta,
#Content a.mdswpc-card:focus .mdswpc-card__cta {
    color: var(--cem-teal-dark, rgb(0, 98, 118));
}

a.mdswpc-card:hover .mdswpc-card__cta-arrow,
a.mdswpc-card:focus .mdswpc-card__cta-arrow,
#Content a.mdswpc-card:hover .mdswpc-card__cta-arrow,
#Content a.mdswpc-card:focus .mdswpc-card__cta-arrow {
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .mdswpc-card,
    #Content .mdswpc-card {
        padding: 26px;
    }
}


/* ==========================================================
   WPBakery Equal Height support
   ========================================================== */

.vc_row.vc_row-o-equal-height > .vc_column_container {
    display: flex;
    align-items: stretch;
}

.vc_row.vc_row-o-equal-height
> .vc_column_container
> .vc_column-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.vc_row.vc_row-o-equal-height
> .vc_column_container
> .vc_column-inner
> .wpb_wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
}

/* Make the card consume the entire WPBakery column height */
.vc_row.vc_row-o-equal-height
.mdswpc-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
}

/*
 * This is the important part:
 * description grows to consume any unused card space.
 */
.vc_row.vc_row-o-equal-height
.mdswpc-card__description {
    flex: 1 1 auto;
}

/* CTA always sits at the bottom */
.vc_row.vc_row-o-equal-height
.mdswpc-card__cta {
    flex: 0 0 auto;
    margin-top: 16px;
}

span.mdswpc-card__cta-text {
    font-size: 16px!important;
}