/* Mainsite New Design — shared layout resets
 * Ensures full-bleed sections with constrained inner content.
 * Loaded for all mainsite_* templates via TemplateLoader.
 */

/* Break the shortcode wrapper out of any WP/theme width constraints */
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] {
    width:100vw !important;
    max-width:100vw !important;
    position:relative !important;
    padding:0 !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
}

/* Direct section/div children should stretch full width */
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] > * {
    width:100% !important;
    max-width:100% !important;
}

.ms-page-hero-inner h1 {
    color:var(--mainsite-color-on-dark) !important;
}

.ms-logo img {
    height: 50px !important;
}

/* Shared mainsite controls. Scoped selectors override legacy page-level copies. */
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn {
    display:inline-block !important;
    padding:16px 34px !important;
    border:1px solid transparent !important;
    border-radius:var(--mainsite-radius-button) !important;
    background:transparent !important;
    color:var(--mainsite-color-text) !important;
    font-family:var(--sans) !important;
    font-size:13px !important;
    font-weight:600 !important;
    letter-spacing:0.12em !important;
    line-height:1.2 !important;
    text-align:center !important;
    text-decoration:none !important;
    text-transform:uppercase !important;
    cursor:pointer !important;
    transition:background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-red {
    background:var(--mainsite-color-accent) !important;
    border-color:var(--mainsite-color-accent) !important;
    color:var(--mainsite-color-button-text) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-red:hover,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-red:focus-visible {
    background:var(--mainsite-color-accent-hover) !important;
    border-color:var(--mainsite-color-accent-hover) !important;
    color:var(--mainsite-color-button-text) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-navy {
    background:var(--mainsite-color-heading) !important;
    border-color:var(--mainsite-color-heading) !important;
    color:var(--mainsite-color-on-dark) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-navy:hover,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-navy:focus-visible {
    background:var(--mainsite-color-nav-hover) !important;
    border-color:var(--mainsite-color-nav-hover) !important;
    color:var(--mainsite-color-on-dark) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-navy {
    border-color:var(--mainsite-color-heading) !important;
    color:var(--mainsite-color-heading) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-navy:hover,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-navy:focus-visible {
    background:var(--mainsite-color-heading) !important;
    color:var(--mainsite-color-on-dark) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-light {
    border-color:rgba(var(--mainsite-color-on-dark-rgb), 0.55) !important;
    color:var(--mainsite-color-on-dark) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-light:hover,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn-outline-light:focus-visible {
    background:var(--mainsite-color-on-dark) !important;
    border-color:var(--mainsite-color-on-dark) !important;
    color:var(--mainsite-color-heading) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn[disabled],
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-btn[aria-disabled="true"] {
    cursor:not-allowed !important;
    opacity:0.62 !important;
    pointer-events:none !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-textlink {
    /* color:var(--mainsite-color-heading) !important; */
    border-bottom:1px solid var(--mainsite-color-border) !important;
    font-family:var(--sans) !important;
    font-size:13px !important;
    font-weight:600 !important;
    letter-spacing:0.1em !important;
    padding-bottom:3px !important;
    text-decoration:none !important;
    text-transform:uppercase !important;
    transition:border-color 0.25s ease, color 0.25s ease !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-textlink:hover,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-textlink:focus-visible {
    border-color:var(--mainsite-color-accent) !important;
    color:var(--mainsite-color-accent) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-textlink.red {
    color:var(--mainsite-color-accent) !important;
    border-color:rgba(var(--bb-primary-color-rgb, 200, 16, 46), 0.35) !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-textlink.light {
    color:var(--mainsite-color-on-dark) !important;
    border-color:rgba(var(--mainsite-color-on-dark-rgb), 0.35) !important;
}

/* Shared application form block used by the Freedom Builder path page. */
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form {
    max-width:660px !important;
    margin:44px auto 0 !important;
    background:var(--mainsite-color-surface) !important;
    border:1px solid var(--mainsite-color-border) !important;
    border-radius:6px !important;
    padding:46px 44px !important;
    display:none;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form.open {
    display:block;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form h3 {
    font-size:28px !important;
    margin-bottom:10px;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form .ms-lead {
    color:var(--mainsite-color-text-muted) !important;
    font-size:15.5px !important;
    margin-bottom:30px;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form .ms-field {
    margin-bottom:22px !important;
    text-align:left;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form label {
    display:block !important;
    font-size:11px !important;
    font-weight:600 !important;
    text-transform:uppercase !important;
    letter-spacing:0.16em !important;
    color:var(--mainsite-color-text-subtle) !important;
    margin-bottom:8px;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form input,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form select,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form textarea {
    width:100% !important;
    font-family:var(--sans) !important;
    font-size:15px !important;
    padding:14px 16px !important;
    border:1px solid var(--mainsite-color-border) !important;
    border-radius:6px !important;
    background:#fff !important;
    color:var(--mainsite-color-text);
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form textarea {
    min-height:110px !important;
    resize:vertical !important;
    line-height:1.6;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form input:focus,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form select:focus,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form textarea:focus {
    outline:none !important;
    border-color:var(--mainsite-color-nav-hover);
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form .ms-form-foot {
    display:flex !important;
    align-items:center !important;
    gap:28px !important;
    flex-wrap:wrap !important;
    margin-top:8px;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-note {
    font-size:13px !important;
    color:var(--mainsite-color-text-subtle) !important;
    margin-top:20px;
}

@media (max-width: 720px) {
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-apply-form {
        padding:32px 24px !important;
    }
}

/* Shared mobile polish for shell navigation and card layouts. */
@media (max-width: 1000px) {
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-nav {
        gap:12px !important;
        padding:11px 16px !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-nav-links,
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-nav-right .ms-login,
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-nav-right .ms-btn {
        display:none !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-nav-right {
        margin-left:auto !important;
        gap:8px !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-burger {
        display:block !important;
        width:42px !important;
        height:42px !important;
        margin-right:0 !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer {
        justify-content:flex-start !important;
        overflow-y:auto !important;
        padding:88px 18px 24px !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer ul {
        margin-bottom:24px !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer li a {
        font-size:clamp(22px, 7vw, 30px) !important;
        padding:12px 0 !important;
    }

    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-foot {
        gap:12px !important;
        margin-top:20px !important;
    }
}

@media (max-width: 760px) {
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-wrap {
        padding:0 18px !important;
    }
}

@media (max-width: 600px) {
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader .ms-brand img,
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader a.ms-logo img,
    .mlmmc-page-template[class*="mlmmc-page-template--mainsite"] #siteHeader a.logo img {
        height:34px !important;
        width:auto !important;
        max-width:min(56vw, 220px) !important;
    }
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-scrim {
    display:none !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-close {
    position:absolute !important;
    top:16px !important;
    right:14px !important;
    width:40px !important;
    height:40px !important;
    border:1px solid rgba(159, 179, 200, 0.3) !important;
    border-radius:999px !important;
    background:transparent !important;
    color:#fff !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    cursor:pointer !important;
}

.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-close svg,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-close svg path,
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer-close svg rect {
    color:#fff !important;
    stroke:#fff !important;
}

/* Per-page CSS sets closed state with !important; open state must win with !important too. */
.mlmmc-page-template[class*="mlmmc-page-template--mainsite"] .ms-drawer.open {
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}