/* All presentation rules target the existing masthead only. No content, logo,
   navigation markup, href, submenu, or persisted WordPress option is replaced. */
body.ml-header-premium #masthead {
    --mlhs-blue:#0871b8;
    --mlhs-ink:#075d99;
    --mlhs-border:#e4edf3;
}
body.ml-header-premium #masthead .ast-primary-header-bar {
    background:#fff;
    border-bottom:1px solid var(--mlhs-border);
    box-shadow:none;
    padding-top:0;
    padding-bottom:0;
}
body.ml-header-premium #masthead .site-branding {
    padding:0;
    margin:0;
    line-height:1;
}
body.ml-header-premium #masthead .site-logo-img {
    padding:0;
    line-height:1;
}
body.ml-header-premium #masthead .custom-logo-link {
    display:inline-flex;
    align-items:center;
    vertical-align:middle;
}
body.ml-header-premium #masthead .custom-logo {
    display:block;
    height:auto;
    object-fit:contain;
}
body.ml-header-premium #masthead a:focus-visible,
body.ml-header-premium #masthead button:focus-visible,
body.ml-header-premium #masthead [tabindex]:focus-visible {
    outline:2px solid #1783c4;
    outline-offset:4px;
}

@media (min-width:1200px) {
    body.ml-header-premium #masthead #ast-desktop-header { display:block; }
    body.ml-header-premium #masthead #ast-mobile-header { display:none; }
    body.ml-header-premium #masthead #ast-desktop-header .site-primary-header-wrap {
        width:calc(100% - 64px);
        max-width:1480px;
        min-height:96px;
        padding:10px 0;
        margin-inline:auto;
    }
    body.ml-header-premium #masthead #ast-desktop-header .ast-builder-grid-row {
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        align-items:center;
        column-gap:36px;
        min-height:76px;
    }
    body.ml-header-premium #masthead #ast-desktop-header .site-header-primary-section-left,
    body.ml-header-premium #masthead #ast-desktop-header .site-header-primary-section-right {
        margin:0;
        padding:0;
        min-width:0;
    }
    body.ml-header-premium #masthead #ast-desktop-header .site-header-primary-section-right {
        justify-content:flex-end;
    }
    body.ml-header-premium #masthead #ast-desktop-header [data-section="title_tagline"] {
        margin:0;
        padding:0;
    }
    body.ml-header-premium #masthead #ast-desktop-header .custom-logo {
        width:230px;
        max-width:230px;
    }
    body.ml-header-premium #masthead #ast-desktop-header .ast-builder-menu-1 {
        width:auto;
        max-width:100%;
        padding:0;
        margin:0;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-bar-navigation,
    body.ml-header-premium #masthead #ast-desktop-header .main-navigation {
        width:auto;
        max-width:100%;
        padding:0;
        margin:0;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu {
        display:flex;
        flex-wrap:nowrap;
        justify-content:flex-end;
        align-items:center;
        gap:clamp(12px,1.15vw,22px);
        width:auto;
        margin:0;
        padding:0;
        background:transparent;
        border:0;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item {
        flex:0 0 auto;
        width:auto;
        margin:0;
        padding:0;
        line-height:1.4;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>.menu-link {
        display:flex;
        align-items:center;
        justify-content:center;
        min-height:44px;
        padding:11px 0;
        font-family:Arial,Helvetica,sans-serif;
        font-size:14px;
        font-weight:400;
        line-height:1.4;
        letter-spacing:0;
        color:var(--mlhs-blue);
        background:transparent;
        white-space:nowrap;
        text-decoration:none;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>.menu-link:hover,
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.current-menu-item>.menu-link {
        color:#034c80;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>.menu-link .ast-header-navigation-arrow {
        position:static;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:auto;
        margin:0 0 0 7px;
        padding:0;
        line-height:1;
        background:transparent;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>.menu-link .ast-arrow-svg {
        display:block;
        width:10px;
        height:7px;
        margin:0;
        fill:currentColor;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>a[href$="/contacto/"],
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>a[href$="/contacto"] {
        border:1px solid #187bc1;
        border-radius:8px;
        padding:10px 20px;
        margin-left:3px;
        background:#fff;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>a[href$="/contacto/"]:hover,
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>a[href$="/contacto"]:hover {
        background:#f2f8fc;
    }
    body.ml-header-premium #masthead #ast-desktop-header .sub-menu {
        width:270px;
        max-width:calc(100vw - 48px);
        padding:8px 0;
        border:1px solid #e2ebf1;
        border-top:2px solid #278cc8;
        border-radius:8px;
        background:#fff;
        box-shadow:0 12px 30px rgba(21,64,92,.1);
        z-index:1000;
    }
    body.ml-header-premium #masthead #ast-desktop-header .sub-menu .menu-link {
        min-height:42px;
        padding:11px 18px;
        font-family:Arial,Helvetica,sans-serif;
        font-size:13px;
        font-weight:400;
        line-height:1.5;
        color:var(--mlhs-ink);
        white-space:normal;
        background:#fff;
    }
    body.ml-header-premium #masthead #ast-desktop-header .sub-menu .menu-link:hover,
    body.ml-header-premium #masthead #ast-desktop-header .sub-menu .menu-link:focus {
        background:#f0f7fb;
        color:#034c80;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item:focus-within>.sub-menu {
        left:0;
        opacity:1;
        visibility:visible;
    }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item:nth-last-child(2):hover>.sub-menu,
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item:nth-last-child(2):focus-within>.sub-menu,
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item:nth-last-child(2).focus>.sub-menu {
        left:auto;
        right:0;
    }
}

@media (min-width:1200px) and (max-width:1399px) {
    body.ml-header-premium #masthead #ast-desktop-header .custom-logo { width:205px;max-width:205px; }
    body.ml-header-premium #masthead #ast-desktop-header .ast-builder-grid-row { column-gap:24px; }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu { gap:12px; }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>.menu-link { font-size:13px; }
    body.ml-header-premium #masthead #ast-desktop-header .main-header-menu>.menu-item>a[href$="/contacto/"] { padding-inline:15px; }
}

@media (max-width:1199px) {
    body.ml-header-premium #masthead #ast-desktop-header { display:none; }
    body.ml-header-premium #masthead #ast-mobile-header { display:block; }
    body.ml-header-premium #masthead #ast-mobile-header .ast-primary-header-bar {
        padding:0 22px;
        min-height:82px;
    }
    body.ml-header-premium #masthead #ast-mobile-header .ast-primary-header-bar>.ast-builder-grid-row {
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        align-items:center;
        gap:14px;
        min-height:82px;
        padding:8px 0;
    }
    body.ml-header-premium #masthead #ast-mobile-header .site-header-primary-section-left,
    body.ml-header-premium #masthead #ast-mobile-header .site-header-primary-section-right,
    body.ml-header-premium #masthead #ast-mobile-header [data-section="title_tagline"],
    body.ml-header-premium #masthead #ast-mobile-header [data-section="section-header-mobile-trigger"] {
        margin:0;
        padding:0;
        min-width:0;
    }
    body.ml-header-premium #masthead #ast-mobile-header .custom-logo { width:190px;max-width:100%; }
    body.ml-header-premium #masthead #ast-mobile-header .main-header-menu-toggle {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:44px;
        height:44px;
        min-width:44px;
        margin:0;
        padding:9px;
        color:var(--mlhs-blue);
        background:#fff;
        border:1px solid #dce8ef;
        border-radius:8px;
    }
    body.ml-header-premium #masthead #ast-mobile-header .ast-mobile-header-content {
        background:#fff;
        border-bottom:1px solid #e5edf2;
        max-height:calc(100vh - 100px);
        max-height:calc(100dvh - 100px);
        overflow-y:auto;
    }
    body.ml-header-premium #masthead #ast-mobile-header .ast-mobile-header-content .main-header-menu {
        background:#fff;
        padding:6px 0;
        margin:0;
    }
    body.ml-header-premium #masthead #ast-mobile-header .ast-mobile-header-content .menu-link {
        min-height:46px;
        padding-top:12px;
        padding-bottom:12px;
        font-family:Arial,Helvetica,sans-serif;
        font-size:15px;
        line-height:1.5;
        color:var(--mlhs-blue);
        background:#fff;
        white-space:normal;
    }
    body.ml-header-premium #masthead #ast-mobile-header .ast-mobile-header-content .menu-link:hover { background:#f3f8fb; }
}
@media (max-width:544px) {
    body.ml-header-premium #masthead #ast-mobile-header .ast-primary-header-bar { padding-inline:18px;min-height:78px; }
    body.ml-header-premium #masthead #ast-mobile-header .ast-primary-header-bar>.ast-builder-grid-row { min-height:78px; }
    body.ml-header-premium #masthead #ast-mobile-header .custom-logo { width:178px; }
}
