/* =========================================
   MPF — фінальна шапка
   ========================================= */

.mpf-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e1e3e5;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.mpf-header .mpf-header-inner {
    min-height: 96px !important;
    display: flex !important;
    align-items: center !important;
    gap: 32px !important;
}

/* Логотип */

.mpf-header .mpf-logo--header {
    width: 300px !important;
    height: 82px !important;
    flex: 0 0 300px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: visible !important;
    text-decoration: none !important;
}

.mpf-header .mpf-logo-symbol {
    width: 72px !important;
    height: 72px !important;
    flex: 0 0 72px !important;
    display: block !important;
    overflow: visible !important;
    transform: none !important;
}

.mpf-header .mpf-logo-symbol img {
    position: static !important;
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
}

.mpf-header .mpf-logo-copy {
    min-width: 0;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    flex-direction: column !important;
}

.mpf-header .mpf-logo-title {
    display: block;
    margin: 0;
    color: #151719;
    font-size: 31px !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
    line-height: 0.88 !important;
}

.mpf-header .mpf-logo-company {
    display: block;
    margin-top: 7px !important;
    color: #151719;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 0.09em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
}

.mpf-header .mpf-logo-tagline {
    display: block;
    margin-top: 6px !important;
    color: #f4511e;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 0.09em;
    line-height: 1.15 !important;
    text-transform: uppercase;
}

/* Навігація */

.mpf-header .mpf-nav {
    margin-left: auto !important;
}

.mpf-header .mpf-nav-list {
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.mpf-header .mpf-nav-link {
    position: relative;
    min-height: 96px !important;
    display: inline-flex !important;
    align-items: center !important;
    color: #25282b;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
}

.mpf-header .mpf-nav-link::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #f4511e;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    content: "";
}

.mpf-header .mpf-nav-link:hover,
.mpf-header .mpf-nav-link.active {
    color: #f4511e !important;
}

.mpf-header .mpf-nav-link:hover::after,
.mpf-header .mpf-nav-link.active::after {
    transform: scaleX(1);
}

/* Телефон і кнопка */

.mpf-header .mpf-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

.mpf-header .mpf-header-phone {
    color: #151719 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
}

.mpf-header .mpf-header-phone:hover {
    color: #f4511e !important;
}

.mpf-header .mpf-header-actions > .mpf-button {
    min-height: 46px !important;
    padding: 0 25px !important;
    border: 1px solid #f4511e !important;
    border-radius: 0 !important;
    background: #f4511e !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    white-space: nowrap;
}

.mpf-header .mpf-header-actions > .mpf-button:hover {
    border-color: #d93d0d !important;
    background: #d93d0d !important;
}

/* Планшет */

@media (max-width: 1150px) {
    .mpf-header .mpf-header-inner {
        gap: 20px !important;
    }

    .mpf-header .mpf-logo--header {
        width: 250px !important;
        flex-basis: 250px !important;
    }

    .mpf-header .mpf-logo-symbol {
        width: 64px !important;
        height: 64px !important;
        flex-basis: 64px !important;
    }

    .mpf-header .mpf-logo-symbol img {
        width: 64px !important;
        height: 64px !important;
        max-width: 64px !important;
    }

    .mpf-header .mpf-logo-title {
        font-size: 27px !important;
    }

    .mpf-header .mpf-nav-list {
        gap: 19px !important;
    }

    .mpf-header .mpf-nav-link {
        font-size: 13px !important;
    }

    .mpf-header .mpf-header-phone {
        display: none;
    }
}

/* Мобільна версія */

@media (max-width: 850px) {
    .mpf-header .mpf-header-inner {
        min-height: 80px !important;
        justify-content: space-between !important;
    }

    .mpf-header .mpf-logo--header {
        width: 230px !important;
        height: 68px !important;
        flex-basis: 230px !important;
    }

    .mpf-header .mpf-logo-symbol {
        width: 58px !important;
        height: 58px !important;
        flex-basis: 58px !important;
    }

    .mpf-header .mpf-logo-symbol img {
        width: 58px !important;
        height: 58px !important;
        max-width: 58px !important;
    }

    .mpf-header .mpf-logo-title {
        font-size: 24px !important;
    }

    .mpf-header .mpf-logo-company,
    .mpf-header .mpf-logo-tagline {
        font-size: 8px !important;
    }

    .mpf-header .mpf-header-actions > .mpf-button {
        display: none !important;
    }

    .mpf-header .mpf-menu-button {
        display: inline-flex !important;
    }

    .mpf-header .mpf-nav {
        position: fixed !important;
        top: 80px;
        right: 0;
        left: 0;
        height: calc(100vh - 80px);
        margin: 0 !important;
        padding: 20px;
        background: #ffffff;
        transform: translateX(100%);
        transition: transform 0.25s ease;
    }

    .mpf-header .mpf-nav.open,
    .mpf-header .mpf-nav.is-open {
        transform: translateX(0);
    }

    .mpf-header .mpf-nav-list {
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .mpf-header .mpf-nav-link {
        min-height: 54px !important;
        border-bottom: 1px solid #e1e3e5;
        font-size: 15px !important;
    }
}

/* =========================================
   Випадаюче меню послуг
   ========================================= */

.mpf-nav-dropdown {
    position: relative !important;
}

.mpf-nav-dropdown > .mpf-nav-link {
    gap: 8px !important;
}

.mpf-nav-dropdown__arrow {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.22s ease;
}

.mpf-nav-dropdown__menu {
    position: absolute;
    z-index: 1300;
    top: calc(100% - 1px);
    left: 50%;

    width: 290px;
    margin: 0;
    padding: 10px 0;

    visibility: hidden;
    opacity: 0;

    border-top: 3px solid #f4511e;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(18, 21, 24, 0.16);

    list-style: none;
    transform: translate(-50%, 12px);
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease;
}

.mpf-nav-dropdown__menu::before {
    position: absolute;
    top: -9px;
    left: 50%;
    width: 14px;
    height: 14px;
    background: #f4511e;
    transform: translateX(-50%) rotate(45deg);
    content: "";
}

.mpf-nav-dropdown__menu li {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.mpf-nav-dropdown__menu a {
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 10px 22px;

    color: #25282b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    text-transform: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        padding-left 0.2s ease;
}

.mpf-nav-dropdown__menu a:hover {
    padding-left: 28px;
    background: #f5f6f6;
    color: #f4511e;
}

.mpf-nav-dropdown__all {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e5e7e8;
}

.mpf-nav-dropdown__all a {
    justify-content: space-between;
    color: #f4511e;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.mpf-nav-dropdown:hover .mpf-nav-dropdown__menu,
.mpf-nav-dropdown:focus-within .mpf-nav-dropdown__menu {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.mpf-nav-dropdown:hover .mpf-nav-dropdown__arrow,
.mpf-nav-dropdown:focus-within .mpf-nav-dropdown__arrow {
    transform: translateY(2px) rotate(225deg);
}

/* Мобільне меню */
@media (max-width: 850px) {
    .mpf-nav-dropdown {
        width: 100%;
    }

    .mpf-nav-dropdown > .mpf-nav-link {
        justify-content: space-between;
    }

    .mpf-nav-dropdown__menu {
        position: static;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0 0 0 16px;

        visibility: visible;
        opacity: 1;

        border-top: 0;
        background: #f6f7f7;
        box-shadow: none;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .mpf-nav-dropdown__menu::before {
        display: none;
    }

    .mpf-nav-dropdown:hover .mpf-nav-dropdown__menu,
    .mpf-nav-dropdown:focus-within .mpf-nav-dropdown__menu {
        max-height: 600px;
        transform: none;
    }

    .mpf-nav-dropdown__menu a {
        min-height: 44px;
        padding: 9px 18px;
        border-bottom: 1px solid #e4e6e7;
        font-size: 13px;
    }
}


/* Аварійне виправлення випадаючого меню */
.mpf-nav-dropdown {
    position: relative !important;
    list-style: none !important;
}

.mpf-nav-dropdown__menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    z-index: 9999 !important;

    width: 300px !important;
    margin: 0 !important;
    padding: 10px 0 !important;

    display: none !important;
    list-style: none !important;

    background: #ffffff !important;
    border-top: 3px solid #f4511e !important;
    box-shadow: 0 18px 45px rgba(18, 21, 24, 0.18) !important;

    transform: translateX(-50%) !important;
}

.mpf-nav-dropdown__menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.mpf-nav-dropdown__menu a {
    display: block !important;
    width: 100% !important;
    padding: 12px 22px !important;

    color: #25282b !important;
    background: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}

.mpf-nav-dropdown__menu a:hover {
    color: #f4511e !important;
    background: #f5f6f6 !important;
}

.mpf-nav-dropdown:hover > .mpf-nav-dropdown__menu,
.mpf-nav-dropdown:focus-within > .mpf-nav-dropdown__menu {
    display: block !important;
}

/* Прибрати стандартні маркери списку */
.mpf-nav-dropdown__menu,
.mpf-nav-dropdown__menu li {
    list-style-type: none !important;
}

@media (max-width: 850px) {
    .mpf-nav-dropdown__menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        border-top: 0 !important;
        padding-left: 15px !important;
    }
}

