/* MDCG Responsive Diagrams
 * Built to inherit the site's Nunito typography and Salient/Nectar colour variables.
 */

.mdcg-diagram {
    --mdcg-accent: var(--nectar-accent-color, #71bda8);
    --mdcg-accent-dark: var(--nectar-extra-color-1, #338266);
    --mdcg-bg: var(--nectar-bg-color, #f6f6f6);
    --mdcg-text: #000;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    color: var(--mdcg-text);
}

.mdcg-diagram *,
.mdcg-diagram *::before,
.mdcg-diagram *::after {
    box-sizing: border-box;
}

.mdcg-diagram__title {
    margin: 0 0 clamp(28px, 3vw, 46px);
    color: var(--mdcg-text);
    font-family: inherit;
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

/* Delivery Models -------------------------------------------------------- */
.mdcg-delivery-models {
    padding: clamp(28px, 4vw, 56px);
    background: var(--mdcg-bg);
}

.mdcg-delivery-models__list {
    display: grid;
    gap: 18px;
}

.mdcg-delivery-models__row {
    --mdcg-row-color: var(--mdcg-accent);
    display: grid;
    grid-template-columns: minmax(240px, 310px) 56px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.mdcg-delivery-models__label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 11px 22px;
    border-radius: 999px;
    background: var(--mdcg-row-color);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.mdcg-delivery-models__connector {
    position: relative;
    width: 100%;
    height: 2px;
    background: var(--mdcg-row-color);
}

.mdcg-delivery-models__connector::before,
.mdcg-delivery-models__connector::after {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mdcg-row-color);
    content: '';
    transform: translateY(-50%);
}

.mdcg-delivery-models__connector::before { left: 0; }
.mdcg-delivery-models__connector::after { right: 0; }

.mdcg-delivery-models__description {
    max-width: 720px;
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.35;
}

.mdcg-delivery-models__description p:last-child { margin-bottom: 0; }

/* Larger desktop treatment to match the supplied artwork. */
@media (min-width: 1200px) {
    .mdcg-delivery-models {
        padding: clamp(56px, 5vw, 84px) clamp(58px, 6vw, 96px);
    }

    .mdcg-delivery-models .mdcg-diagram__title {
        margin-bottom: 52px;
        font-size: clamp(40px, 3vw, 50px);
    }

    .mdcg-delivery-models__list {
        gap: 28px;
    }

    .mdcg-delivery-models__row {
        grid-template-columns: minmax(330px, 390px) 74px minmax(0, 1fr);
        gap: 24px;
    }

    .mdcg-delivery-models__label {
        min-height: 72px;
        padding: 15px 28px;
        font-size: 19px;
        line-height: 1.2;
    }

    .mdcg-delivery-models__connector {
        height: 2px;
    }

    .mdcg-delivery-models__connector::before,
    .mdcg-delivery-models__connector::after {
        width: 8px;
        height: 8px;
    }

    .mdcg-delivery-models__description {
        max-width: 820px;
        font-size: clamp(18px, 1.3vw, 21px);
        line-height: 1.4;
    }
}

/* Surgical Pathway ------------------------------------------------------- */
.mdcg-surgical-pathway {
    overflow: hidden;
    padding: clamp(38px, 5vw, 64px);
    background: var(--mdcg-bg);
}

.mdcg-surgical-pathway .mdcg-diagram__title {
    margin-bottom: 10px;
}

.mdcg-surgical-pathway__steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--mdcg-pathway-count, 4), minmax(0, 1fr));
    gap: clamp(28px, 2.8vw, 40px);
    align-items: start;
    padding: clamp(40px, 4.5vw, 64px) 8px 46px;
}

.mdcg-surgical-pathway__steps::after {
    position: absolute;
    right: calc(12.5% + 28px);
    bottom: 18px;
    left: calc(12.5% + 28px);
    z-index: 0;
    border-top: 2px dotted color-mix(in srgb, var(--mdcg-accent) 60%, white 10%);
    content: '';
}

.mdcg-surgical-pathway__step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.mdcg-surgical-pathway__box {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    min-height: clamp(230px, 20vw, 286px);
    padding: 14px;
    border: 2px solid color-mix(in srgb, var(--mdcg-accent) 78%, white 22%);
    border-radius: 28px;
    background: transparent;
}

.mdcg-surgical-pathway__box-inner {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(28px, 2.5vw, 40px);
    border-radius: 24px;
    background: var(--mdcg-card-bg, #fbfbfb);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02) inset;
    text-align: center;
}

.mdcg-surgical-pathway__step:not(:last-child) .mdcg-surgical-pathway__box::after {
    position: absolute;
    top: 50%;
    right: calc(clamp(28px, 2.8vw, 40px) * -1);
    z-index: 3;
    width: clamp(34px, 3.4vw, 52px);
    height: 56px;
    background: var(--mdcg-accent);
    clip-path: polygon(0 0, 62% 0, 100% 50%, 62% 100%, 0 100%, 24% 50%);
    content: '';
    transform: translateY(-50%);
}

.mdcg-surgical-pathway__text {
    font-size: clamp(18px, 1.45vw, 22px);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.mdcg-surgical-pathway__stem {
    position: relative;
    z-index: 1;
    width: 2px;
    height: 72px;
    margin-top: 0;
    background: color-mix(in srgb, var(--mdcg-accent) 85%, white 15%);
}

.mdcg-surgical-pathway__number {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-top: -1px;
    border-radius: 50%;
    background: var(--mdcg-accent);
    color: #10231d;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* Pathway Cards ---------------------------------------------------------- */
.mdcg-pathway-cards {
    padding: clamp(36px, 4vw, 64px) 0;
    /* Let the card grid respond to the actual WPBakery column width, not just the viewport. */
    container-type: inline-size;
    container-name: mdcg-pathway-cards;
}

.mdcg-pathway-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(34px, 3.25vw, 54px);
    align-items: stretch;
    justify-items: center;
    padding-left: 48px;
}

.mdcg-pathway-cards--no-numbers .mdcg-pathway-cards__grid {
    padding-left: 0;
}

.mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(26px, 2.25vw, 40px);
}

.mdcg-pathway-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    min-width: 0;
    min-height: 560px;
    padding: 74px 30px 34px;
    border: 2px solid var(--mdcg-accent-dark);
    border-radius: 18px;
    background: var(--mdcg-card-bg, #fff);
    overflow: visible;
}

/* Reserve the numbered-tab area when a card has no icon, so long titles can never sit underneath it. */
.mdcg-pathway-card--has-number.mdcg-pathway-card--no-icon {
    padding-top: 176px;
}

.mdcg-pathway-card--no-number.mdcg-pathway-card--no-icon {
    padding-top: 44px;
}

.mdcg-pathway-card__number {
    position: absolute;
    top: 48px;
    left: -48px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    min-height: 110px;
    padding: 10px;
    border-radius: 14px 0 0 14px;
    background: var(--mdcg-accent-dark);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
}

.mdcg-pathway-card__number::before {
    position: absolute;
    top: 0;
    right: -16px;
    z-index: -1;
    width: 20px;
    height: 100%;
    border-radius: 0 12px 12px 0;
    background: var(--mdcg-accent-dark);
    content: '';
}

.mdcg-pathway-card__number::after {
    position: absolute;
    right: -12px;
    bottom: -10px;
    width: 24px;
    height: 24px;
    background: var(--mdcg-accent-dark);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    content: '';
}

.mdcg-pathway-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    margin: 8px 0 18px;
}

.mdcg-pathway-card__icon img {
    display: block;
    width: auto;
    max-width: 88px;
    height: auto;
    max-height: 88px;
    object-fit: contain;
}

.mdcg-pathway-card__icon--custom img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.mdcg-pathway-card__icon--builtin svg {
    width: 76px;
    height: 76px;
    fill: none;
    stroke: #a5a5a5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.mdcg-pathway-card__icon--iconify {
    color: #a5a5a5;
}

.mdcg-pathway-card__icon--iconify svg {
    display: block;
    width: 76px;
    height: 76px;
    max-width: 100%;
    max-height: 100%;
}

.mdcg-pathway-card__title {
    margin: 0 0 30px;
    color: #000;
    font-family: inherit;
    font-size: clamp(19px, 1.8vw, 24px);
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.01em;
    text-align: center;
}

.mdcg-pathway-card__content {
    color: #111;
    font-size: 16px;
    line-height: 1.5;
}

.mdcg-pathway-card--text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mdcg-pathway-card--text .mdcg-pathway-card__content {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.mdcg-pathway-card--text .mdcg-pathway-card__content p:last-child {
    margin-bottom: 0;
}

.mdcg-pathway-card--list .mdcg-pathway-card__title {
    margin-bottom: 28px;
}

.mdcg-pathway-card--list .mdcg-pathway-card__content {
    text-align: left;
}

.mdcg-pathway-card__content ul,
.mdcg-pathway-card__content ol {
    margin: 0 auto;
    padding-left: 24px;
}

.mdcg-pathway-card__content li {
    margin: 0 0 6px;
}

/* Pathway-card responsive guard ----------------------------------------- */
/*
 * Three cards only stay side-by-side while there is enough real estate for
 * readable copy. This catches narrower desktop/tablet layouts earlier than
 * the theme's standard tablet breakpoint.
 */
@media (max-width: 1399px) {
    .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px;
        padding-left: 44px;
    }

    .mdcg-pathway-cards--no-numbers .mdcg-pathway-cards__grid {
        padding-left: 0;
    }

    /* With three cards, centre the final card on its own row. */
    .mdcg-pathway-cards__grid > .mdcg-pathway-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: min(100%, 430px);
        justify-self: center;
    }
}

/* Prefer the component's available width where container queries are supported. */
@container mdcg-pathway-cards (max-width: 1180px) {
    .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px;
        padding-left: 44px;
    }

    .mdcg-pathway-cards--no-numbers .mdcg-pathway-cards__grid {
        padding-left: 0;
    }

    .mdcg-pathway-cards__grid > .mdcg-pathway-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: min(100%, 430px);
        justify-self: center;
    }
}

@container mdcg-pathway-cards (max-width: 720px) {
    .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
        grid-template-columns: 1fr;
    }

    .mdcg-pathway-cards__grid > .mdcg-pathway-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

/* Tablet ---------------------------------------------------------------- */
@media (max-width: 1199px) {
    .mdcg-delivery-models__row {
        grid-template-columns: minmax(210px, 32%) 42px minmax(0, 1fr);
        gap: 14px;
    }

    .mdcg-delivery-models__label,
    .mdcg-delivery-models__description {
        min-width: 0;
    }

    .mdcg-delivery-models__description {
        max-width: none;
    }

    .mdcg-surgical-pathway__steps {
        gap: 24px;
        padding-top: 36px;
    }

    .mdcg-surgical-pathway__steps::after {
        right: calc(12.5% + 24px);
        left: calc(12.5% + 24px);
    }

    .mdcg-surgical-pathway__box {
        min-height: 210px;
        padding: 12px;
        border-radius: 24px;
    }

    .mdcg-surgical-pathway__box-inner {
        border-radius: 20px;
        padding: 22px;
    }

    .mdcg-surgical-pathway__step:not(:last-child) .mdcg-surgical-pathway__box::after {
        right: -24px;
        width: 30px;
        height: 44px;
    }

    .mdcg-surgical-pathway__stem {
        height: 58px;
    }

    .mdcg-surgical-pathway__number {
        width: 62px;
        height: 62px;
        font-size: 17px;
    }

    .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px;
        padding-left: 44px;
    }

    .mdcg-pathway-cards--no-numbers .mdcg-pathway-cards__grid {
        padding-left: 0;
    }

    .mdcg-pathway-card {
        max-width: 100%;
        min-height: 500px;
        padding: 66px 24px 30px;
    }

    .mdcg-pathway-card--has-number.mdcg-pathway-card--no-icon {
        padding-top: 150px;
    }

    .mdcg-pathway-card--no-number.mdcg-pathway-card--no-icon {
        padding-top: 38px;
    }

    .mdcg-pathway-card__number {
        top: 40px;
        left: -40px;
        width: 72px;
        min-height: 92px;
        font-size: 24px;
    }

    .mdcg-pathway-card__number::before {
        right: -14px;
        width: 18px;
    }

    .mdcg-pathway-card__icon {
        height: 74px;
    }

    .mdcg-pathway-card__icon--builtin svg,
    .mdcg-pathway-card__icon--iconify svg {
        width: 64px;
        height: 64px;
    }
}

/* Narrow tablet --------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 899px) {
    .mdcg-delivery-models {
        padding: 34px 28px;
    }

    .mdcg-delivery-models__row {
        grid-template-columns: minmax(190px, 250px) 34px minmax(0, 1fr);
        gap: 12px;
    }

    .mdcg-delivery-models__label {
        min-height: 52px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .mdcg-delivery-models__description {
        font-size: 15px;
        line-height: 1.45;
    }
}

/* Mobile ---------------------------------------------------------------- */
@media (max-width: 767px) {
    .mdcg-diagram__title {
        margin-bottom: 26px;
        font-size: clamp(28px, 8vw, 36px);
    }

    .mdcg-delivery-models,
    .mdcg-surgical-pathway {
        padding: 28px 20px;
    }

    .mdcg-delivery-models__list {
        gap: 26px;
    }

    .mdcg-delivery-models__row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mdcg-delivery-models__label {
        width: auto;
        min-height: 48px;
        max-width: 100%;
        justify-content: flex-start;
        padding: 10px 18px;
        text-align: left;
    }

    .mdcg-delivery-models__connector {
        display: none;
    }

    .mdcg-delivery-models__description {
        width: 100%;
        padding-left: 2px;
        font-size: 16px;
        line-height: 1.5;
    }

    .mdcg-surgical-pathway__steps {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 10px 0 0 58px;
    }

    .mdcg-surgical-pathway__steps::after {
        top: 32px;
        right: auto;
        bottom: 56px;
        left: 28px;
        width: auto;
        height: auto;
        border-top: 0;
        border-left: 2px dotted color-mix(in srgb, var(--mdcg-accent) 60%, white 10%);
    }

    .mdcg-surgical-pathway__step {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        padding-bottom: 40px;
        align-items: start;
    }

    .mdcg-surgical-pathway__box {
        min-height: 0;
        padding: 10px;
        border-radius: 22px;
    }

    .mdcg-surgical-pathway__box-inner {
        justify-content: flex-start;
        min-height: 150px;
        padding: 22px 20px;
        border-radius: 18px;
        text-align: left;
    }

    .mdcg-surgical-pathway__text {
        font-size: 17px;
        line-height: 1.45;
    }

    .mdcg-surgical-pathway__step:not(:last-child) .mdcg-surgical-pathway__box::after {
        top: auto;
        right: 50%;
        bottom: -28px;
        width: 34px;
        height: 30px;
        clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%);
        transform: translateX(50%);
    }

    .mdcg-surgical-pathway__stem {
        display: none;
    }

    .mdcg-surgical-pathway__number {
        position: absolute;
        top: 50%;
        left: -58px;
        width: 52px;
        height: 52px;
        font-size: 15px;
        transform: translateY(calc(-50% + 72px));
    }

    .mdcg-pathway-cards {
        padding-top: 20px;
    }

    .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-2 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-3 .mdcg-pathway-cards__grid,
    .mdcg-pathway-cards--cols-4 .mdcg-pathway-cards__grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-left: 28px;
    }

    .mdcg-pathway-cards--no-numbers .mdcg-pathway-cards__grid {
        padding-left: 0;
    }

    .mdcg-pathway-cards__grid > .mdcg-pathway-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }

    .mdcg-pathway-card {
        max-width: 100%;
        min-height: 0;
        padding: 58px 20px 24px;
        border-radius: 14px;
    }

    .mdcg-pathway-card--has-number.mdcg-pathway-card--no-icon {
        padding-top: 118px;
    }

    .mdcg-pathway-card--no-number.mdcg-pathway-card--no-icon {
        padding-top: 30px;
    }

    .mdcg-pathway-card__number {
        top: 26px;
        left: -28px;
        width: 56px;
        min-height: 74px;
        font-size: 20px;
        border-radius: 10px 0 0 10px;
    }

    .mdcg-pathway-card__number::before {
        right: -10px;
        width: 12px;
        border-radius: 0 8px 8px 0;
    }

    .mdcg-pathway-card__number::after {
        right: -9px;
        bottom: -8px;
        width: 18px;
        height: 18px;
    }

    .mdcg-pathway-card__icon {
        height: 64px;
        margin: 14px 0 12px;
    }

    .mdcg-pathway-card__icon--builtin svg,
    .mdcg-pathway-card__icon--iconify svg {
        width: 54px;
        height: 54px;
    }

    .mdcg-pathway-card__title {
        margin-bottom: 22px;
        font-size: 22px;
    }

    .mdcg-pathway-card--list .mdcg-pathway-card__title {
        margin-bottom: 22px;
    }

    .mdcg-pathway-card__content {
        font-size: 15px;
        line-height: 1.45;
    }

    .mdcg-pathway-card--text .mdcg-pathway-card__content {
        max-width: none;
    }

    .mdcg-pathway-card__content ul,
    .mdcg-pathway-card__content ol {
        padding-left: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mdcg-diagram *,
    .mdcg-diagram *::before,
    .mdcg-diagram *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
