﻿/* =========================================================
   SmarterFab Header
   ========================================================= */
.sf-header {
    width: 100%;
    height: 74px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow .3s ease, height .3s ease, background .3s ease;
}

.sf-header.current {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.sf-header-inner {
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.sf-logo {
    width: 193px;
    flex: 0 0 193px;
    display: block;
}

.sf-logo img {
    width: 193px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.sf-nav {
    flex: 1;
    height: 100%;
    margin-left: 104px;
}

.sf-nav > ul {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 37px;
}

.sf-nav > ul > li {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.sf-nav > ul > li > a {
    height: 100%;
    display: flex;
    align-items: center;
    color: #111;
    font-size: 16px;
    white-space: nowrap;
    position: relative;
}

.sf-nav > ul > li.has-dropdown > a {
    padding-right: 14px;
}

.sf-nav > ul > li.has-dropdown > a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #777;
    border-bottom: 1.5px solid #777;
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -5px;
    transform: rotate(45deg);
    transition: transform .25s ease, border-color .25s ease;
}

.sf-nav > ul > li:hover > a,
.sf-nav > ul > li.current > a {
    color: #078ad4;
}

.sf-nav > ul > li:hover > a::after {
    border-color: #078ad4;
    transform: rotate(225deg);
    margin-top: -1px;
}

.sf-submenu {
    min-width: 230px;
    padding: 10px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .10);
    position: absolute;
    left: 50%;
    top: calc(100% - 4px);
    transform: translate(-50%, 14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.sf-submenu::before {
    content: "";
    width: 100%;
    height: 12px;
    position: absolute;
    left: 0;
    top: -10px;
}

.sf-submenu a {
    display: block;
    padding: 9px 18px;
    color: #333;
    font-size: 14px;
    line-height: 22px;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease, padding-left .2s ease;
}

.sf-submenu a:hover {
    color: #078ad4;
    background: #f2f9fd;
    padding-left: 22px;
}

.sf-nav > ul > li.has-dropdown:hover > .sf-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.sf-nav-drop-toggle {
    display: none;
}

.sf-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 19px;
    padding-left: 28px;
}

.sf-language {
    position: relative;
}

.sf-language-current {
    height: 42px;
    padding: 0 18px 0 0;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #222;
    font-size: 14px;
    position: relative;
}

.sf-language-current::after {
    content: "";
    width: 1px;
    height: 30px;
    background: #eee;
    position: absolute;
    right: -1px;
    top: 6px;
}

.sf-language-current-flag,
.sf-language-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 32px;
}

.sf-language-caret {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #777;
    border-bottom: 1.5px solid #777;
    transform: rotate(45deg);
    margin-left: 1px;
    margin-top: -4px;
    transition: transform .25s ease;
}

.sf-language.open .sf-language-caret {
    transform: rotate(225deg);
    margin-top: 4px;
}

.sf-language-menu {
    width: 170px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.sf-language.open .sf-language-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.sf-language-menu button {
    width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
    text-align: left;
}

.sf-language-menu button:hover,
.sf-language-menu button.active {
    color: #078ad4;
    background: #f2f9fd;
}

.sf-language-menu img {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
}

.sf-quote-btn {
    min-width: 137px;
    height: 40px;
    padding: 0 20px;
    border-radius: 7px;
    background: #078ad4;
    color: #fff !important;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(7, 138, 212, .14);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.sf-quote-btn:hover {
    background: #057bbc;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(7, 138, 212, .20);
}

.sf-menu-toggle,
.sf-mobile-quote {
    display: none;
}

@media screen and (max-width: 1180px) {
    .sf-nav {
        margin-left: 55px;
    }

    .sf-nav > ul {
        gap: 24px;
    }

    .sf-header-actions {
        padding-left: 20px;
        gap: 14px;
    }
}

@media screen and (max-width: 991px) {
    .sf-header {
        height: 66px;
    }

    .sf-header-inner {
        position: relative;
    }

    .sf-logo {
        width: 170px;
        flex-basis: 170px;
    }

    .sf-logo img {
        width: 170px;
        height: 40px;
    }

    .sf-menu-toggle {
        width: 40px;
        height: 40px;
        margin-left: 12px;
        border: 0;
        background: transparent;
        display: block;
        position: relative;
        order: 4;
    }

    .sf-menu-toggle i,
    .sf-menu-toggle::before,
    .sf-menu-toggle::after {
        content: "";
        width: 23px;
        height: 2px;
        background: #111;
        border-radius: 2px;
        position: absolute;
        left: 8px;
        transition: transform .28s ease, opacity .28s ease, top .28s ease;
    }

    .sf-menu-toggle::before {
        top: 12px;
    }

    .sf-menu-toggle i {
        top: 19px;
    }

    .sf-menu-toggle::after {
        top: 26px;
    }

    .sf-header.nav-open .sf-menu-toggle::before {
        top: 19px;
        transform: rotate(45deg);
    }

    .sf-header.nav-open .sf-menu-toggle i {
        opacity: 0;
    }

    .sf-header.nav-open .sf-menu-toggle::after {
        top: 19px;
        transform: rotate(-45deg);
    }

    .sf-nav {
        width: calc(100% + 40px);
        height: auto;
        max-height: 0;
        margin: 0;
        background: #fff;
        position: absolute;
        left: -20px;
        top: 100%;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        box-shadow: 0 16px 28px rgba(0, 0, 0, .08);
        transition: max-height .38s ease, opacity .25s ease, visibility .25s ease;
    }

    .sf-header.nav-open .sf-nav {
        max-height: calc(100vh - 66px);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow-y: auto;
    }

    .sf-nav > ul {
        height: auto;
        padding: 12px 20px 22px;
        display: block;
    }

    .sf-nav > ul > li {
        width: 100%;
        height: auto;
        min-height: 52px;
        border-bottom: 1px solid #eee;
        display: flex;
        flex-wrap: wrap;
    }

    .sf-nav > ul > li > a {
        width: calc(100% - 48px);
        height: 52px;
        font-size: 15px;
    }

    .sf-nav > ul > li:not(.has-dropdown) > a {
        width: 100%;
    }

    .sf-nav > ul > li.has-dropdown > a {
        padding-right: 0;
    }

    .sf-nav > ul > li.has-dropdown > a::after {
        display: none;
    }

    .sf-nav-drop-toggle {
        width: 48px;
        height: 52px;
        border: 0;
        background: transparent;
        display: block;
        position: relative;
    }

    .sf-nav-drop-toggle::before {
        content: "";
        width: 7px;
        height: 7px;
        border-right: 1.5px solid #666;
        border-bottom: 1.5px solid #666;
        position: absolute;
        left: 18px;
        top: 19px;
        transform: rotate(45deg);
        transition: transform .25s ease, top .25s ease;
    }

    .sf-nav > ul > li.open > .sf-nav-drop-toggle::before {
        top: 23px;
        transform: rotate(225deg);
    }

    .sf-submenu {
        width: 100%;
        min-width: 0;
        max-height: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow: hidden;
        transition: max-height .35s ease, padding .35s ease;
    }

    .sf-nav > ul > li.has-dropdown:hover > .sf-submenu {
        transform: none;
    }

    .sf-nav > ul > li.open > .sf-submenu {
        max-height: 500px;
        padding: 5px 0 12px;
    }

    .sf-submenu a {
        padding: 8px 14px;
        font-size: 14px;
        color: #555;
    }

    .sf-submenu a:hover {
        padding-left: 18px;
    }

    .sf-header-actions {
        margin-left: auto;
        padding-left: 10px;
    }

    .sf-language-current {
        padding-right: 12px;
    }

    .sf-language-current::after {
        display: none;
    }

    .sf-quote-btn {
        min-width: 118px;
        height: 38px;
        padding: 0 15px;
        font-size: 14px;
    }

    .sf-mobile-quote {
        display: none !important;
    }
}

@media screen and (max-width: 620px) {
    .sf-logo {
        width: 145px;
        flex-basis: 145px;
    }

    .sf-logo img {
        width: 145px;
        height: 36px;
    }

    .sf-language-current {
        gap: 6px;
    }

    .sf-language-current-code,
    .sf-language-caret {
        display: none;
    }

    .sf-language-current-flag {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .sf-quote-btn {
        display: none;
    }

    .sf-mobile-quote {
        display: flex !important;
        border-bottom: 0 !important;
        padding-top: 14px;
    }

    .sf-mobile-quote a {
        width: 100% !important;
        height: 42px !important;
        border-radius: 6px;
        background: #078ad4;
        color: #fff !important;
        justify-content: center;
    }
}

@media screen and (max-width: 380px) {
    .sf-logo {
        width: 128px;
        flex-basis: 128px;
    }

    .sf-logo img {
        width: 128px;
        height: 34px;
    }

    .sf-menu-toggle {
        margin-left: 5px;
    }
}
