/**
 * Multi-Cavity and Family Molds — article styles
 * Block: mcafm (multi-cavity-and-family-molds)
 * Body / table / link rhythm aligned with WODM (Protolabs-style long-form).
 * Loaded via <link rel="stylesheet" href="./multi-cavity-and-family-molds.css">
 */

/* --- Article scope --- */
/* Top offset: body.rp-fixed-header + --rp-header-offset (shell), not article CSS */
.mcafm {
    --mcafm-body: #333333;
    --mcafm-link: #105bab;
    --mcafm-link-hover: #ea130e;
    --mcafm-table-rule: #9aa0ae;
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    line-height: 2.4rem;
    color: var(--mcafm-body);
}

.mcafm__main {
    margin: 0 auto;
    padding-top: 0;
}

.container.mcafm__container,
.mcafm__container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    /* article-page main 已定左缘；去掉 Bootstrap container 水平 gutter */
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    .mcafm__container {
        padding-left: 0;
        padding-right: 0;
    }
}

/*
 * Rhythm — copy WODM / Protolabs exactly:
 *   p   16/24 #333  mb 20 (2rem)
 *   h2  32/38 #333  mb 10 (1rem)  — our .mcafm__title
 *   section break ≈ 40px before next h2 (title-row mt 2rem; rows otherwise 0)
 */

/*
 * 清掉 Bootstrap .row / .row > * gutter，否则左缘对不齐：
 *   .row { margin-inline: -.5 * gutter }
 *   .row > * { padding-inline: .5 * gutter }  ← 特异性 (0,1,1) 压过 .mcafm-split__col
 */
.mcafm .mcafm__row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin-top: 0 !important;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

.mcafm .mcafm__row > [class*='col-'] {
    padding-left: 0;
    padding-right: 0;
}

/* 行业卡片行需要保留 gutter，不受上面清零影响 */
.mcafm .mcafm__row.g-3,
.mcafm .mcafm__row.mcafm-bottom {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
    margin-top: calc(-1 * var(--bs-gutter-y)) !important;
    margin-left: calc(-0.5 * var(--bs-gutter-x));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
}

.mcafm .mcafm__row.g-3 > [class*='col-'],
.mcafm .mcafm__row.mcafm-bottom > [class*='col-'] {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Section title row: 4rem (≈40px @ 10px root) before h2 — single source, no stack */
.mcafm .mcafm__row:has(.mcafm__title) {
    margin-top: 2rem !important;
}

.mcafm .mcafm__row:first-child:has(.mcafm__title),
.mcafm .mcafm__container>.mcafm__row:first-child {
    margin-top: 0 !important;
}

.mcafm__main .mcafm__title,
.mcafm__main h4.mcafm__title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 3.8rem;
    color: var(--mcafm-body);
    margin: 0 0 1rem;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 768px) {

    .mcafm__main .mcafm__title,
    .mcafm__main h4.mcafm__title {
        font-size: 2.6rem;
        line-height: 3.2rem;
        margin: 0 0 1rem;
    }
}

/* Body copy ≈ WODM .wodm__text */
.mcafm__main .mcafm__text,
.mcafm__main .mcafm__lead {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 2.7rem;
    color: var(--mcafm-body);
    margin: 0 0 2rem;
    text-align: left;
}

.mcafm__main .mcafm__lead {
    margin-top: 0;
}

.mcafm-bottom {
    margin-bottom: 4rem !important;
}

.mcafm__main .mcafm__text:last-child {
    margin-bottom: 1rem;
}

/* Inline / block lead-ins ≈ Protolabs h4 */
.mcafm__strong {
    font-weight: 600;
    color: var(--mcafm-body);
    font-size: inherit;
    line-height: inherit;
}

.mcafm__subhead {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 2.8rem;
    color: var(--mcafm-body);
    margin: 0 0 1rem;
}

.mcafm__subhead--roi {
    font-style: italic;
    font-size: 1.6rem;
    line-height: 2.7rem;
    margin: 1rem 0 0.8rem;
}

.mcafm img {
    display: block;
}

.mcafm__img--side {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 0 2rem;
}

@media (max-width: 768px) {
    .mcafm__img--side {
        width: 100%;
        height: auto;
        padding: 0;
    }
}

/* Lists ≈ WODM disc lists */
.mcafm__list,
.mcafm__list--roi {
    list-style: disc;
    padding-left: 2rem;
    margin: 0 0 2rem;
}

.mcafm__list li,
.mcafm__list--roi li {
    font-size: 1.6rem;
    line-height: 2.7rem;
    color: var(--mcafm-body);
    padding: 0.2rem 0;
}

.mcafm__subhead+.mcafm__list,
.mcafm__subhead+.mcafm__list--roi {
    margin-top: 0;
}

.mcafm-chart,
.mcafm-chart--lg,
.mcafm-chart--sm {
    margin: 0 0 2rem;
}

/* 图文并排时，间距交给整行，避免 chart mb 再叠一层 */
.mcafm-callout .mcafm-chart,
.mcafm-callout .mcafm-chart--lg,
.mcafm-callout .mcafm-chart--sm {
    margin-bottom: 2rem;
}

.mcafm-callout {
    margin: 0 0 2rem;
}

.mcafm-chart svg,
.mcafm-chart--lg svg,
.mcafm-chart--sm svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.mcafm-callout__box {
    border: 1px dashed #5782bb;
    padding: 2rem;
    border-radius: 1rem;
    background-color: #f9f9f9;
    font-size: 1.6rem;
    line-height: 2.7rem;
    color: var(--mcafm-body);
    margin: 0;
}

@media (max-width: 768px) {
    .mcafm-callout__box {
        padding: 1rem;
    }
}

/* Table ≈ WODM / Protolabs simple table */
.mcafm-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 2rem 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mcafm-table {
    width: 100%;
    min-width: 64rem;
    border-collapse: collapse;
    border-spacing: 0;
    border: 0;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    line-height: 2.4rem;
    color: var(--mcafm-body);
    text-align: left;
    margin-bottom: 1rem;
}

.mcafm-table-head {
    border-bottom: 2px solid #333333 !important;
}

.mcafm-table tr {
    border-top: 1px solid var(--mcafm-table-rule);
    border-bottom: 1px solid var(--mcafm-table-rule);
}

.mcafm-table thead tr,
.mcafm-table tr:first-child {
    border-top: 0;
}

.mcafm-table th,
.mcafm-table td {
    display: table-cell;
    padding: 1.6rem;
    border: 0;
    vertical-align: center;
    font-weight: 400;
}

.mcafm-table thead th {
    font-weight: 700;
    color: var(--mcafm-body);
}

.mcafm-table th:first-child,
.mcafm-table td:first-child {
    padding-left: 0;
}

.mcafm-table th:last-child,
.mcafm-table td:last-child {
    padding-right: 0;
}

.mcafm-table th:nth-child(1),
.mcafm-table td:nth-child(1) {
    width: 18%;
}

.mcafm-table th:nth-child(2),
.mcafm-table td:nth-child(2),
.mcafm-table th:nth-child(3),
.mcafm-table td:nth-child(3),
.mcafm-table th:nth-child(4),
.mcafm-table td:nth-child(4) {
    width: 27.333%;
}

.mcafm-table__visual td {
    vertical-align: middle;
    padding: 1rem;
}

.mcafm-table__svg {
    display: block;
    width: 8rem;
    height: auto;
    max-width: 100%;
    margin: 0;
}

/* --- Industry cards --- */
.mcafm-card {
    border: 1px solid #21cfbd;
    background-color: #ffffff;
    overflow: hidden;
    border-radius: 0.5rem;
}

.mcafm-card__title {
    margin: 0 0 0.3rem 0;
    padding: 0.8rem 1rem;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.mcafm-card__body {
    padding: 1rem;
    height: 128px;
}

.mcafm-card__desc {
    margin: 0;
    font-size: 1.5rem;
    line-height: 2.2rem;
    color: var(--mcafm-body);
}

.mcafm-card__title--teal {
    color: #333;
}

.mcafm-card__title--blue {
    color: #333;
}

.mcafm-card__title--green {
    color: #333;
}

.mcafm-card__title--steel {
    color: #333;
}

/* --- Hero (image banner — kept) --- */
.mcafm-hero {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
}

.mcafm-hero__media {
    width: 100%;
}

.mcafm-hero__media img {
    width: 100%;
    height: auto;
    display: block;
}

.mcafm-hero__overlay {
    position: absolute;
    top: 50%;
    left: 44%;
    z-index: 2;
    width: min(1180px, calc(100% - 4rem));
    max-width: calc(100% - 4rem);
    margin: 0;
    color: #fff;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

.mcafm-hero__title {
    text-transform: uppercase;
    font-size: 40px;
    margin: 0 0 30px 0;
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.mcafm-hero__title--gradient {
    background: linear-gradient(90deg, #00f5ff 0%, #00ffa3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mcafm-hero__subtitle {
    font-size: 28px;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* --- Split text / image rows：保持 BS col-md-9/3，右侧用 padding 留空 --- */
.mcafm-split__col {
    padding: 0;
}

.mcafm-split__heading {
    margin-bottom: 1rem;
}

.mcafm-split__block {
    padding: 0;
}

@media (min-width: 768px) {

    /* 侧图 180px 固定宽，靠右贴齐内容区右缘 */
    .mcafm .mcafm__row.align-items-start > .col-md-3 .mcafm__img--side,
    .mcafm .mcafm__row.align-items-start > .mcafm-split__figure .mcafm__img--side {
        margin-left: auto;
        margin-right: 3rem;
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .mcafm-split__col {
        padding: 0;
    }

    .mcafm-split__heading {
        margin-bottom: 0.8rem;
    }

    .mcafm-split__figure {
        padding: 0;
    }

    .mcafm-split__block--alt {
        padding: 0;
    }

    .mcafm-split__block--alt .mcafm-split__figure {
        margin-top: 2rem;
    }
}

.mcafm__container .mcafm__row--spaced {
    margin-top: 1rem;
}

.mcafm-feature__icon {
    width: 50px;
    height: 50px;
}

/* CTA + tags — same link hover as WODM */
.mcafm-cta {
    margin: 2rem 0;
    font-size: 1.6rem;
    line-height: 2.7rem;
    color: var(--mcafm-body);
}

.mcafm-cta a {
    color: var(--mcafm-link);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    font-weight: 600;
    font-style: normal;
}

.mcafm-cta a:hover,
.mcafm-cta a:focus-visible {
    color: var(--mcafm-link-hover);
}

.mcafm-tags {
    margin: 2rem 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 2.7rem;
    color: var(--mcafm-link);
}

.mcafm-tags>span:first-child {
    color: var(--mcafm-body);
}

.mcafm-tags a,
.mcafm-tags__link {
    color: var(--mcafm-link);
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.mcafm-tags a:hover,
.mcafm-tags a:focus-visible,
.mcafm-tags__link:hover,
.mcafm-tags__link:focus-visible {
    color: var(--mcafm-link-hover);
}

.mcafm-tags__link {
    padding-left: 1rem;
}

.mcafm-tags a+a {
    margin-left: 0.35rem;
}

@media (max-width: 768px) {
    .mcafm-hero__media img {
        height: 100px;
    }

    .mcafm-tags__link {
        padding-left: 0;
    }

    .mcafm-hero__overlay {
        left: 50%;
        width: 100%;
        max-width: 100%;
        padding: 0 20px 0 30px;
    }

    .mcafm-hero__title {
        font-size: 16px;
        margin: 0 0 4px 0;
        line-height: 1.3;
    }

    .mcafm-hero__subtitle {
        font-size: 9px;
        line-height: 1.3;
    }
}