/* =========================================================
   GLOBAL
========================================================= */

html {
    scroll-behavior: smooth;
}

.mg-navbar-wrap {
    width: 100%;
    position: relative;
}


/* =========================================================
   HEADER
========================================================= */

.mg-navbar {
    position: relative;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid transparent;

    transition:
        background-color 0.4s ease,
        backdrop-filter 0.4s ease,
        -webkit-backdrop-filter 0.4s ease,
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}


/* Sticky */

.mg-navbar.mg-is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
}


/* Scrolled */

.mg-navbar.mg-scrolled {
    background-color: rgba(18, 59, 58, 0.93);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.1);
}


/* =========================================================
   CONTAINER
========================================================= */

.mg-nav-container {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 20px 48px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    transition:
        padding 0.3s ease;
}

.mg-navbar.mg-scrolled .mg-nav-container {
    padding-top: 12px;
    padding-bottom: 12px;
}


/* =========================================================
   BRAND
========================================================= */

.mg-brand {
    display: flex;
    align-items: center;

    gap: 10px;

    text-decoration: none;

    flex: 0 0 auto;

    min-width: 0;
}

.mg-brand-logo,
.mg-brand-mark {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    object-fit: contain;
}

.mg-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.15);

    font-size: 20px;

    color: #fff;
}

.mg-brand-text {
    display: inline-block;

    font-size: 18px;
    font-weight: 600;

    letter-spacing: -0.02em;

    white-space: nowrap;

    color: #fff;

    transition: color 0.3s ease;
}


/* =========================================================
   DESKTOP MENU
========================================================= */

.mg-menu {
    display: flex;
    align-items: center;

    gap: 4px;

    list-style: none;

    margin: 0;
    padding: 0;
}

.mg-menu-li {
    position: relative;
    list-style: none;
}


/* =========================================================
   DESKTOP LINK
========================================================= */

.mg-menu-link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 10px 16px;

    border-radius: 999px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    color: rgba(255, 255, 255, 0.8);

    transition:
        color 0.3s ease,
        background-color 0.3s ease;
}

.mg-menu-link:hover {
    color: #fff;

    background:
        rgba(255, 255, 255, 0.08);
}

.mg-menu-label {
    display: inline-block;
}


/* =========================================================
   DESKTOP DROPDOWN ICON
   IMPORTANT
========================================================= */

.mg-chevron {
    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    width: 14px;
    height: 14px;

    min-width: 14px;
    min-height: 14px;

    flex: 0 0 14px;

    margin-left: 2px;

    color: currentColor;

    opacity: 0.85;

    line-height: 1;

    transform: rotate(0deg);

    transition:
        transform 0.25s ease,
        color 0.25s ease,
        opacity 0.25s ease;
}


/* Elementor icon */

.mg-chevron i,
.mg-chevron svg {
    display: block;

    width: 12px;
    height: 12px;

    font-size: 12px;

    line-height: 1;

    margin: 0;

    transform-origin: center;
}


/* =========================================================
   DESKTOP ICON ROTATION
   HOVER
========================================================= */

.mg-menu-li.has-children:hover
> .mg-menu-link
> .mg-chevron {

    transform: rotate(180deg);

    opacity: 1;
}


/* =========================================================
   DESKTOP ICON ROTATION
   ACTIVE / JS OPEN
========================================================= */

.mg-menu-li.has-children.is-open
> .mg-menu-link
> .mg-chevron {

    transform: rotate(180deg);

    opacity: 1;
}


/* =========================================================
   DESKTOP DROPDOWN
========================================================= */

.mg-dropdown {
    position: absolute;

    left: 0;
    top: calc(100% + 4px);

    width: 256px;

    padding: 8px;

    box-sizing: border-box;

    background:
        rgba(18, 59, 58, 0.95);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 16px;

    border:
        1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(8px);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 20;
}


/* Hover open */

.mg-menu-li.has-children:hover
> .mg-dropdown {


    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);

    pointer-events: auto;
}


/* JS open */

.mg-menu-li.has-children.is-open
> .mg-dropdown {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);

    pointer-events: auto;
}


/* =========================================================
   DROPDOWN ITEMS
========================================================= */

.mg-dropdown-item {
    display: block;

    padding: 12px 16px;

    border-radius: 12px;

    text-decoration: none;

    transition:
        background-color 0.2s ease;
}

.mg-dropdown-item:hover {
    background:
        rgba(255, 255, 255, 0.05);
}

.mg-dropdown-title {
    display: block;

    font-size: 14px;

    font-weight: 500;

    color: #fff;
}

.mg-dropdown-desc {
    display: block;

    margin-top: 2px;

    font-size: 12px;

    color:
        rgba(255, 255, 255, 0.55);
}


/* =========================================================
   ACTIONS
========================================================= */

.mg-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    flex: 0 0 auto;
}


/* =========================================================
   CTA
========================================================= */

.mg-cta {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 40px;

    white-space: nowrap;

    text-decoration: none;

    padding: 10px 20px;

    box-sizing: border-box;

    border-radius: 999px;

    background:
        #d7ad4a;

    color:
        #17302c;

    font-size: 14px;

    font-weight: 600;

    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.mg-cta:hover {
    background:
        #c99d36;

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3);
}


/* =========================================================
   MOBILE OPEN BUTTON
========================================================= */

.mg-mobile-open {
    display: none;

    width: 40px;
    height: 40px;
    min-width: 40px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #fff;

    cursor: pointer;

    align-items: center;
    justify-content: center;

    line-height: 1;

    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.mg-mobile-open:hover {
    background:
        rgba(255, 255, 255, 0.08);
}

.mg-mobile-open i,
.mg-mobile-open svg {
    display: block;

    width: 20px;
    height: 20px;

    font-size: 20px;

    line-height: 1;

    margin: 0;
}


/* =========================================================
   MOBILE LAYER
========================================================= */

.mg-mobile-layer {
    display: none;

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 100000;

    visibility: hidden;

    pointer-events: none;
}

.mg-mobile-layer.is-open {
    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   BODY LOCK
========================================================= */

html.mg-menu-open,
body.mg-menu-open {
    overflow: hidden !important;
}


/* =========================================================
   MOBILE OVERLAY
========================================================= */

.mg-mobile-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.7);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    opacity: 0;

    transition:
        opacity 0.35s ease;
}

.mg-mobile-layer.is-open
.mg-mobile-overlay {
    opacity: 1;
}


/* =========================================================
   MOBILE DRAWER
========================================================= */

.mg-mobile-drawer {
    position: absolute;

    top: 0;
    right: 0;

    width: min(
        var(--mg-mobile-width),
        384px
    );

    height: 100%;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    background:
        rgba(18, 59, 58, 0.98);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    box-shadow:
        -20px 0 50px rgba(0, 0, 0, 0.5);

    transform:
        translateX(100%);

    transition:
        transform 0.35s cubic-bezier(
            0.16,
            1,
            0.3,
            1
        );

    overflow: hidden;
}

.mg-mobile-layer.is-open
.mg-mobile-drawer {

    transform:
        translateX(0);
}


/* =========================================================
   MOBILE HEADER
========================================================= */

.mg-mobile-head {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 20px 24px;

    flex: 0 0 auto;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.1);
}

.mg-mobile-head .mg-brand {
    min-width: 0;
}

.mg-mobile-head .mg-brand-text {
    color: #fff;
}

.mg-mobile-head .mg-brand-mark {
    background:
        rgba(255, 255, 255, 0.15);
}


/* =========================================================
   MOBILE CLOSE
========================================================= */

.mg-mobile-close {
    display: flex;

    width: 40px;
    height: 40px;
    min-width: 40px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #fff;

    cursor: pointer;

    align-items: center;
    justify-content: center;

    line-height: 1;

    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.mg-mobile-close:hover {
    background:
        rgba(255, 255, 255, 0.08);
}

.mg-mobile-close i,
.mg-mobile-close svg {

    display: block;

    width: 24px;
    height: 24px;

    font-size: 24px;

    line-height: 1;

    margin: 0;
}


/* =========================================================
   MOBILE NAV
========================================================= */

.mg-mobile-nav {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 24px 16px;

    -webkit-overflow-scrolling: touch;
}

.mg-mobile-nav > ul {
    list-style: none;

    margin: 0;
    padding: 0;
}

.mg-mobile-nav li {
    list-style: none;
}


/* =========================================================
   MOBILE ROW
========================================================= */

.mg-mobile-row {
    display: flex;

    align-items: center;

    width: 100%;

    gap: 4px;
}


/* =========================================================
   MOBILE LINK
========================================================= */

.mg-mobile-link {
    flex: 1;

    min-width: 0;

    display: flex;

    align-items: center;

    padding: 12px;

    border-radius: 8px;

    color: #fff;

    text-decoration: none;

    font-size: 16px;

    font-weight: 500;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.mg-mobile-link:hover {
    background:
        rgba(255, 255, 255, 0.05);
}

.mg-mobile-link-text {
    display: block;

    min-width: 0;
}


/* =========================================================
   MOBILE EXPAND
========================================================= */

.mg-mobile-expand {

    width: 40px;
    height: 40px;

    min-width: 40px;

    flex: 0 0 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color:
        rgba(255, 255, 255, 0.6);

    cursor: pointer;

    line-height: 1;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.mg-mobile-expand:hover {
    background:
        rgba(255, 255, 255, 0.08);

    color: #fff;
}


/* =========================================================
   MOBILE ARROW
========================================================= */

.mg-mobile-expand i,
.mg-mobile-expand svg {

    display: block;

    width: 15px;
    height: 15px;

    font-size: 15px;

    line-height: 1;

    margin: 0;

    transform:
        rotate(0deg);

    transform-origin: center;

    transition:
        transform 0.3s ease;
}


/* =========================================================
   MOBILE ARROW ROTATION
========================================================= */

.mg-mobile-li.expanded
> .mg-mobile-row
> .mg-mobile-expand
> i,

.mg-mobile-li.expanded
> .mg-mobile-row
> .mg-mobile-expand
> svg {

    transform:
        rotate(180deg);
}


/* =========================================================
   MOBILE SUBMENU
========================================================= */

.mg-mobile-sub {

    margin:
        0 0 0 12px !important;

    padding:
        0 0 0 16px !important;

    border-left:
        2px solid
        rgba(255, 255, 255, 0.15) !important;

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.3s ease,
        opacity 0.25s ease;
}

.mg-mobile-li.expanded
> .mg-mobile-sub {

    max-height: 800px;

    opacity: 1;
}


/* =========================================================
   MOBILE SUB LINK
========================================================= */

.mg-mobile-sub-link {

    display: block;

    padding: 10px 12px;

    color:
        rgba(255, 255, 255, 0.7);

    text-decoration: none;

    font-size: 14px;

    border-radius: 8px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.mg-mobile-sub-link:hover {

    background:
        rgba(255, 255, 255, 0.05);

    color: #fff;
}


/* =========================================================
   MOBILE FOOTER
========================================================= */

.mg-mobile-footer {

    flex: 0 0 auto;

    padding: 24px;

    border-top:
        1px solid rgba(255, 255, 255, 0.1);
}

.mg-mobile-cta {
    width: 100%;

    padding: 14px 20px;
}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 1025px) {

    .mg-mobile-layer {
        display: none !important;
    }

    .mg-mobile-open {
        display: none !important;
    }

}


/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 1024px) {

    .mg-menu {
        display: none !important;
    }

    .mg-actions > .mg-cta {
        display: none !important;
    }

    .mg-mobile-open {
        display: flex !important;
    }

    .mg-mobile-layer {
        display: block;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 600px) {

    .mg-nav-container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mg-brand-text {
        font-size: 16px;
    }

    .mg-mobile-head {
        padding:
            18px 18px;
    }

    .mg-mobile-nav {
        padding:
            18px 12px;
    }

    .mg-mobile-footer {
        padding:
            18px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .mg-nav-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mg-brand {
        gap: 7px;
    }

    .mg-brand-text {
        font-size: 15px;
    }

    .mg-brand-logo,
    .mg-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .mg-mobile-open {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .mg-navbar,
    .mg-nav-container,
    .mg-dropdown,
    .mg-mobile-overlay,
    .mg-mobile-drawer,
    .mg-mobile-sub,
    .mg-cta,
    .mg-mobile-open,
    .mg-mobile-close,
    .mg-mobile-expand,
    .mg-chevron,
    .mg-chevron i,
    .mg-chevron svg,
    .mg-mobile-expand i,
    .mg-mobile-expand svg {
        transition-duration:
            0.01ms !important;
    }

}