/* ==========================================================
   MANOSALVA — SITE HEADER V2
========================================================== */

.ms-site-header {
    position: sticky !important;

    z-index: 1200;

    top: 12px !important;

    width: 100%;

    height: auto !important;
    min-height: 0 !important;

    margin-top: 12px;

    padding:
        0
        clamp(12px, 2.8vw, 36px);

    box-sizing: border-box;

    pointer-events: none;
}


.admin-bar
.ms-site-header {
    top: 44px !important;
}


.ms-site-header *,
.ms-site-header *::before,
.ms-site-header *::after {
    box-sizing: border-box;
}


/* ==========================================================
   CONTENEDOR PRINCIPAL
========================================================== */

#masthead
.ms-header,
#masthead
.ms-header.is-fixed {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    width:
        min(
            100%,
            1480px
        ) !important;

    height: auto !important;
    min-height: 84px;

    margin:
        0
        auto !important;

    padding:
        5px
        14px;

    border:
        1px solid
        rgba(16, 35, 75, 0.08);

    border-radius:
        22px !important;

    background:
        rgba(255, 255, 255, 0.97) !important;

    box-shadow:
        0 14px 38px
        rgba(16, 35, 75, 0.10);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    transform:
        none !important;

    pointer-events: auto;
}


.ms-header > .container,
.ms-header__inner {
    display: flex;

    align-items: center;

    width: 100%;
    max-width: none !important;

    margin: 0;

    padding: 0;
}


/* ==========================================================
   LOGO PRINCIPAL
========================================================== */

.ms-header__brand {
    display: flex;

    flex:
        0
        0
        330px;

    align-items: center;
    justify-content: flex-start;

    min-width: 330px;
    min-height: 82px;

    line-height: 0;
}


.ms-header__brand
.custom-logo-link {
    display: flex !important;

    align-items: center;
    justify-content: flex-start;

    width: 100%;
    height: 82px;

    margin: 0 !important;

    padding: 0 !important;

    line-height: 0;
}


.ms-header__brand
.custom-logo {
    display: block !important;

    width: 310px !important;
    max-width: 310px !important;

    height: auto !important;
    max-height: 76px !important;

    margin: 0 !important;

    padding: 0 !important;

    object-fit: contain;
    object-position: left center;
}


.ms-header__brand-text {
    color: #10234b;

    font-size: 21px;
    font-weight: 800;

    text-decoration: none;
}


/* ==========================================================
   NAVEGACIÓN DESKTOP
========================================================== */

.ms-header__navigation {
    min-width: 0;
}


.ms-header__menu {
    display: flex;

    align-items: center;

    gap: 18px;

    margin:
        0
        28px
        0
        auto !important;

    padding: 0;
}


.ms-header__menu
.nav-item {
    position: relative;

    margin: 0;

    padding: 0;
}


.ms-header__menu
.nav-link {
    display: flex;

    align-items: center;

    gap: 7px;

    min-height: 46px;

    padding:
        10px
        10px !important;

    border-radius: 12px;

    color:
        #10234b !important;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;

    text-decoration: none;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}


.ms-header__menu
.nav-link:hover,
.ms-header__menu
.nav-link:focus-visible,
.ms-header__menu
.nav-link.active,
.ms-header__menu
.current-menu-item
> .nav-link,
.ms-header__menu
.current-menu-ancestor
> .nav-link {
    background:
        #edf4fa !important;

    color:
        #07539a !important;
}


/* ==========================================================
   TOGGLE SUBMENÚ
========================================================== */

.ms-header__menu
li.menu-item-has-children
> span.dropdown-toggle {
    position: absolute;

    z-index: 4;

    top: 50%;
    right: 2px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    cursor: pointer;

    transform:
        translateY(-50%);
}


.ms-header__menu
li.menu-item-has-children
> span.dropdown-toggle::after {
    content: "";

    width: 7px;
    height: 7px;

    margin: 0;

    border: 0;

    border-right:
        2px solid
        #10234b;

    border-bottom:
        2px solid
        #10234b;

    transform:
        rotate(45deg)
        translateY(-2px);
}


.ms-header__menu
li.menu-item-has-children
> .nav-link {
    padding-right:
        31px !important;
}


/* ==========================================================
   DROPDOWN DESKTOP
========================================================== */

#masthead
.ms-header
.dropdown-menu {
    position:
        absolute !important;

    top:
        calc(100% - 2px) !important;

    left:
        0 !important;

    width: 286px;
    min-width: 286px;

    margin:
        0 !important;

    padding:
        8px !important;

    border:
        1px solid
        rgba(16, 35, 75, 0.09) !important;

    border-radius:
        15px !important;

    background:
        #ffffff !important;

    opacity:
        1 !important;

    box-shadow:
        0 18px 44px
        rgba(16, 35, 75, 0.15) !important;

    transform:
        none !important;
}


/*
 * Puente invisible entre el item principal
 * y el dropdown.
 */

#masthead
.ms-header
.dropdown-menu::before {
    content: "";

    position: absolute;

    top: -10px;
    left: 0;

    width: 100%;
    height: 12px;

    background:
        transparent;
}


#masthead
.ms-header
.dropdown-item {
    position: relative;

    display: flex;

    align-items: center;

    min-height: 47px;

    margin: 0;

    padding:
        9px
        32px
        9px
        10px !important;

    border:
        0 !important;

    border-radius:
        10px !important;

    background:
        transparent !important;

    color:
        #10234b !important;

    font-size:
        12.5px !important;

    font-weight:
        700 !important;

    line-height: 1.25;

    white-space: normal;

    opacity:
        1 !important;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}


#masthead
.ms-header
.dropdown-item::after {
    content: "→";

    position: absolute;

    top: 50%;
    right: 10px;

    color: #07539a;

    font-size: 16px;
    font-weight: 800;

    transform:
        translateY(-50%);
}


#masthead
.ms-header
.dropdown-item:hover,
#masthead
.ms-header
.dropdown-item:focus-visible,
#masthead
.ms-header
.dropdown-item.active {
    background:
        #edf4fa !important;

    color:
        #07539a !important;
}


/* ==========================================================
   ICONOS DROPDOWN DESKTOP
========================================================== */

.ms-submenu-icon-split
> .dropdown-item::before,
.ms-submenu-icon-ducts
> .dropdown-item::before,
.ms-submenu-icon-repair
> .dropdown-item::before,
.ms-submenu-icon-brands
> .dropdown-item::before {
    content: "";

    display: block;

    flex:
        0
        0
        23px;

    width: 23px;
    height: 23px;

    margin-right: 9px;

    background-color:
        #07539a;

    -webkit-mask-repeat:
        no-repeat;

    mask-repeat:
        no-repeat;

    -webkit-mask-position:
        center;

    mask-position:
        center;

    -webkit-mask-size:
        contain;

    mask-size:
        contain;
}


.ms-submenu-icon-split
> .dropdown-item::before {
    -webkit-mask-image:
        url("../../icons/header/split.svg");

    mask-image:
        url("../../icons/header/split.svg");
}


.ms-submenu-icon-ducts
> .dropdown-item::before {
    -webkit-mask-image:
        url("../../icons/header/ducts.svg");

    mask-image:
        url("../../icons/header/ducts.svg");
}


.ms-submenu-icon-repair
> .dropdown-item::before {
    -webkit-mask-image:
        url("../../icons/header/repair.svg");

    mask-image:
        url("../../icons/header/repair.svg");
}


.ms-submenu-icon-brands
> .dropdown-item::before {
    -webkit-mask-image:
        url("../../icons/header/brands.svg");

    mask-image:
        url("../../icons/header/brands.svg");
}


/* ==========================================================
   HOVER DESKTOP
========================================================== */

@media (min-width: 992px) {

    .ms-header__menu
    .dropdown:hover
    > .dropdown-menu {
        display:
            block !important;
    }

}


/* ==========================================================
   CTA
========================================================== */

.ms-header__cta {
    display: inline-flex;

    flex:
        0
        0
        auto;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 46px;

    padding:
        11px
        21px;

    border:
        1px solid
        #ed1c2e;

    border-radius:
        999px;

    background:
        #ed1c2e;

    color:
        #ffffff !important;

    font-size: 13px;
    font-weight: 800;
    line-height: 1;

    text-decoration:
        none !important;

    box-shadow:
        0 8px 20px
        rgba(237, 28, 46, 0.20);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}


.ms-header__cta:hover,
.ms-header__cta:focus-visible {
    background:
        #cf1422;

    color:
        #ffffff !important;

    transform:
        translateY(-1px);

    box-shadow:
        0 11px 26px
        rgba(237, 28, 46, 0.28);
}


.ms-header__cta-icon {
    display: block;

    flex:
        0
        0
        17px;

    width: 17px;
    height: 17px;

    object-fit: contain;

    /*
     * Convierte el icono a blanco aunque
     * el SVG original sea rojo.
     */
    filter:
        brightness(0)
        invert(1);
}


.ms-header__cta--mobile {
    display: none;
}


/* ==========================================================
   ELEMENTOS SOLO MÓVIL
========================================================== */

.ms-header__toggle,
.ms-header__close,
.ms-header__mobile-top {
    display: none;
}


/* ==========================================================
   DESKTOP INTERMEDIO
========================================================== */

@media
(min-width: 992px)
and
(max-width: 1240px) {

    .ms-header__brand {
        flex-basis: 255px;

        min-width: 255px;
        min-height: 72px;
    }

    .ms-header__brand
    .custom-logo-link {
        height: 72px;
    }

    .ms-header__brand
    .custom-logo {
        width:
            240px !important;

        max-width:
            240px !important;
        
        max-height: 
            64px !important;
    }


    .ms-header__menu {
        gap: 7px;

        margin-right:
            14px !important;
    }


    .ms-header__menu
    .nav-link {
        padding:
            9px
            7px !important;

        font-size:
            12.5px;
    }


    .ms-header__menu
    li.menu-item-has-children
    > .nav-link {
        padding-right:
            27px !important;
    }


    .ms-header__cta {
        padding:
            10px
            15px;

        font-size:
            12px;
    }

}


/* ==========================================================
   TABLET / MÓVIL
========================================================== */

@media (max-width: 991.98px) {

    .ms-site-header {
        top:
            8px !important;

        height:
            auto !important;

        margin-top:
            8px;

        padding:
            0
            10px;
    }


    .admin-bar
    .ms-site-header {
        top:
            54px !important;
    }


    #masthead
    .ms-header,
    #masthead
    .ms-header.is-fixed {
        width:
            100% !important;

        height:
            auto !important;

        min-height:
            78px;

        padding:
            7px
            10px
            7px
            15px;

        border-radius:
            18px !important;

        backdrop-filter:
            none !important;

        -webkit-backdrop-filter:
            none !important;

        transform:
            none !important;

        filter:
            none !important;
    }


    /* ======================================================
       LOGO HEADER CERRADO
    ====================================================== */

    .ms-header__brand {
        flex:
            0
            1
            auto;

        min-width: 0;
        min-height: 60px;

        align-items: center;
        justify-content: flex-start;
    }


    .ms-header__brand
    .custom-logo-link {
        display: flex !important;

        align-items: center;

        width: auto;
        height: 60px;

        line-height: 0;
    }


    .ms-header__brand
    .custom-logo {
        width:
            195px !important;

        max-width:
            195px !important;

        height:
            auto !important;

        max-height:
            57px !important;
    }


    /* ======================================================
       HAMBURGUESA
    ====================================================== */

    .ms-header__toggle {
        display: inline-flex;

        align-items: center;
        justify-content: center;

        width: 50px;
        height: 50px;

        margin-left: auto;

        padding: 0;

        border:
            1px solid
            rgba(255, 255, 255, 0.08);

        border-radius:
            14px;

        background:
            linear-gradient(
                145deg,
                #1c5f9e 0%,
                #124679 100%
            );

        box-shadow:
            0 8px 18px
            rgba(16, 35, 75, 0.16);
    }


    .ms-header__burger {
        display: flex;

        flex-direction: column;

        gap: 5px;
    }


    .ms-header__burger span {
        display: block;

        width: 22px;
        height: 2px;

        border-radius:
            999px;

        background:
            #ffffff;
    }


    /* ======================================================
       DRAWER MÓVIL
    ====================================================== */

    #masthead
    .ms-header__navigation,
    #masthead
    .ms-header__navigation.collapsing,
    #masthead
    .ms-header__navigation.show {
        position:
            fixed !important;

        z-index: 2000;

        inset:
            0 !important;

        width:
            100vw !important;

        max-width:
            none !important;

        height:
            100vh !important;

        min-height:
            100dvh !important;

        overflow-x:
            hidden;

        overflow-y:
            auto;

        margin:
            0 !important;

        padding:
            18px
            20px
            24px;

        border:
            0 !important;

        border-radius:
            0 !important;

        background:
            linear-gradient(
                145deg,
                #062f5f 0%,
                #07539a 62%,
                #10234b 100%
            ) !important;

        box-shadow:
            none !important;

        transform:
            none !important;
    }


    #masthead
    .ms-header__navigation.collapse:not(.show) {
        display:
            none !important;
    }


    #masthead
    .ms-header__navigation.show,
    #masthead
    .ms-header__navigation.collapsing {
        display:
            flex !important;

        flex-direction:
            column;
    }


    body:has(
        .ms-header__navigation.show
    ) {
        overflow: hidden;
    }


    /* ======================================================
       CABECERA INTERNA DRAWER
    ====================================================== */

    .ms-header__mobile-top {
        display: flex;

        align-items: center;
        justify-content: space-between;

        width: 100%;

        margin-bottom: 16px;

        padding-bottom: 16px;

        border-bottom:
            1px solid
            rgba(255, 255, 255, 0.18);
    }


    .ms-header__mobile-brand {
        display: flex;

        align-items: center;

        min-width: 0;
        min-height: 58px;

        line-height: 0;
    }


    .ms-header__mobile-logo-link {
        display: flex;

        align-items: center;

        margin: 0;

        padding: 0;

        line-height: 0;

        text-decoration: none;
    }


    .ms-header__mobile-logo {
        display: block;

        width: 210px;
        max-width: 210px;

        height: auto;
        max-height: 62px;

        margin: 0;

        padding: 0;

        object-fit: contain;
        object-position: left center;
    }


    .ms-header__mobile-logo--fallback {
        width:
            195px;

        max-width:
            195px;
    }


    .ms-header__mobile-brand-text {
        color: #ffffff;

        font-size: 20px;
        font-weight: 800;
    }


    /* ======================================================
       CERRAR
    ====================================================== */

    .ms-header__close {
        display: inline-flex;

        flex:
            0
            0
            46px;

        align-items: center;
        justify-content: center;

        width: 46px;
        height: 46px;

        padding: 0;

        border:
            1px solid
            rgba(255, 255, 255, 0.12);

        border-radius:
            12px;

        background:
            rgba(255, 255, 255, 0.08);

        color:
            #ffffff;

        font-size: 38px;
        font-weight: 300;
        line-height: 1;
    }


    /* ======================================================
       MENÚ PRINCIPAL MÓVIL
    ====================================================== */

    .ms-header__menu {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        width: 100%;

        gap: 0;

        margin:
            0
            0
            28px !important;

        padding: 0;
    }


    .ms-header__menu
    > .nav-item {
        width: 100%;

        border-bottom:
            1px solid
            rgba(255, 255, 255, 0.22);
    }


    .ms-header__menu
    > .nav-item
    > .nav-link {
        display: flex;

        align-items: center;
        justify-content: flex-start;

        min-height: 62px;

        padding:
            13px
            44px
            13px
            7px !important;

        border-radius: 0;

        background:
            transparent !important;

        color:
            #ffffff !important;

        font-size: 16px;
        font-weight: 600;

        text-align: left;
    }


    .ms-header__menu
    > .nav-item
    > .nav-link:hover,
    .ms-header__menu
    > .nav-item
    > .nav-link:focus-visible,
    .ms-header__menu
    > .current-menu-item
    > .nav-link,
    .ms-header__menu
    > .current-menu-ancestor
    > .nav-link {
        background:
            rgba(255, 255, 255, 0.06) !important;

        color:
            #ffffff !important;
    }


    /* ======================================================
       ICONOS NIVEL PRINCIPAL
    ====================================================== */

    .ms-menu-icon-ac
    > .nav-link::before,
    .ms-menu-icon-aerothermy
    > .nav-link::before,
    .ms-menu-icon-electric
    > .nav-link::before,
    .ms-menu-icon-blog
    > .nav-link::before {
        content: "";

        display: block;

        flex:
            0
            0
            26px;

        width: 26px;
        height: 26px;

        margin-right: 14px;

        background-repeat:
            no-repeat;

        background-position:
            center;

        background-size:
            contain;
    }


    .ms-menu-icon-ac
    > .nav-link::before {
        background-image:
            url("../../icons/header/air-conditioning.svg");
    }


    .ms-menu-icon-aerothermy
    > .nav-link::before {
        background-image:
            url("../../icons/header/aerothermy.svg");
    }


    .ms-menu-icon-electric
    > .nav-link::before {
        background-image:
            url("../../icons/header/electric.svg");
    }


    .ms-menu-icon-blog
    > .nav-link::before {
        background-image:
            url("../../icons/header/blog.svg");
    }


    /* ======================================================
       TOGGLE SUBMENÚ
    ====================================================== */

    .ms-header__menu
    li.menu-item-has-children
    > span.dropdown-toggle {
        top: 31px;
        right: 5px;

        width: 36px;
        height: 36px;
    }


    .ms-header__menu
    li.menu-item-has-children
    > span.dropdown-toggle::after {
        width: 9px;
        height: 9px;

        border-color:
            #ffffff;
    }


    /* ======================================================
       SUBMENÚ MÓVIL
    ====================================================== */

    #masthead
    .ms-header
    .dropdown-menu {
        position:
            static !important;

        width:
            calc(100% - 8px) !important;

        min-width:
            0 !important;

        margin:
            0
            4px
            14px !important;

        padding:
            6px !important;

        border:
            1px solid
            rgba(255, 255, 255, 0.20) !important;

        border-radius:
            14px !important;

        background:
            rgba(255, 255, 255, 0.07) !important;

        box-shadow:
            none !important;

        transform:
            none !important;
    }


    #masthead
    .ms-header
    .dropdown-menu::before {
        display: none;
    }


    #masthead
    .ms-header
    .dropdown-item {
        min-height: 50px;

        padding:
            8px
            32px
            8px
            8px !important;

        border-radius:
            10px !important;

        color:
            rgba(255, 255, 255, 0.95) !important;

        font-size:
            12.5px !important;

        font-weight:
            700 !important;
    }


    #masthead
    .ms-header
    .dropdown-item::after {
        right: 9px;

        color:
            rgba(255, 255, 255, 0.82);
    }


    #masthead
    .ms-header
    .dropdown-item:hover,
    #masthead
    .ms-header
    .dropdown-item:focus-visible,
    #masthead
    .ms-header
    .dropdown-item.active {
        background:
            rgba(255, 255, 255, 0.10) !important;

        color:
            #ffffff !important;
    }


    /*
     * Los mismos SVG del dropdown se utilizan como
     * máscaras, pero ahora en blanco.
     */

    .ms-submenu-icon-split
    > .dropdown-item::before,
    .ms-submenu-icon-ducts
    > .dropdown-item::before,
    .ms-submenu-icon-repair
    > .dropdown-item::before,
    .ms-submenu-icon-brands
    > .dropdown-item::before {
        flex:
            0
            0
            23px;

        width: 23px;
        height: 23px;

        margin-right: 10px;

        background-color:
            #ffffff;
    }


    /* ======================================================
       CTA MÓVIL
    ====================================================== */

    .ms-header__cta--desktop {
        display: none;
    }


    .ms-header__cta--mobile {
        display: flex;

        width: 100%;

        min-height: 56px;

        margin-top: auto;

        font-size: 15px;
    }

}


/* ==========================================================
   MÓVIL PEQUEÑO
========================================================== */

@media (max-width: 575.98px) {

    .ms-header__brand
    .custom-logo {
        width:
            185px !important;

        max-width:
            185px !important;
    }


    #masthead
    .ms-header__navigation,
    #masthead
    .ms-header__navigation.collapsing,
    #masthead
    .ms-header__navigation.show {
        padding:
            16px
            16px
            20px;
    }


    .ms-header__mobile-logo {
        width: 195px;

        max-width: 195px;
    }

}