/* ============================================================
   HK EMBASSY
   MAIN NAVIGATION
   Bootstrap 5.3 Compatible
   Custom prefix: hkux-
============================================================ */

.hkux-navigation {
    position: relative;

    width: 100%;

    background: #1d3978;

    z-index: 1010;
}


/* ============================================================
   INNER
============================================================ */

.hkux-navigation__inner {
    min-height: 58px;
}


/* ============================================================
   MAIN MENU
============================================================ */

.hkux-navigation__menu {
    flex: 1;

    min-width: 0;
}


.hkux-navigation__list {
    width: 100%;

    display: flex;

    align-items: stretch;

    justify-content: space-between;
}


/* ============================================================
   MENU ITEM
============================================================ */

.hkux-navigation__item {
    position: relative;

    display: flex;

    align-items: stretch;
}


.hkux-navigation__link {
    position: relative;

    min-height: 58px;

    padding: 0 4px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    color: #ffffff;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.2;

    font-weight: 500;

    white-space: nowrap;

    transition:
        color .25s ease,
        background-color .25s ease;
}


/* ============================================================
   HOVER
============================================================ */

.hkux-navigation__link:hover {
    color: #214AAB;

    background: rgba(255,255,255,.04);
}


/* ============================================================
   ACTIVE
============================================================ */

.hkux-navigation__item--active
.hkux-navigation__link {
    color: #214AAB;

    font-weight: 600;
}


/* Bottom active line */

.hkux-navigation__item--active
.hkux-navigation__link::after {

    content: "";

    position: absolute;

    left: 18px;
    right: 18px;

    bottom: 0;

    height: 2px;

    background: #214AAB;

}


/* ============================================================
   ARROW
============================================================ */

.hkux-navigation__arrow {

    display: inline-flex;

    align-items: center;

    transition:
        transform .25s ease;
}


.hkux-navigation__item--parent:hover
.hkux-navigation__arrow {

    transform: rotate(180deg);

}


/* ============================================================
   FIRST LEVEL DROPDOWN
============================================================ */

.hkux-navigation__dropdown {

    position: absolute;

    top: 100%;

    left: 0;

    min-width: 255px;

    padding: 8px 0;

    margin: 0;

    background: #ffffff;

    border: 1px solid #e4e8ef;

    border-radius: 0 0 8px 8px;

    box-shadow:
        0 16px 40px rgba(18, 36, 70, .16);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(8px);

    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;

    z-index: 1100;
}


/* ============================================================
   SHOW DROPDOWN
============================================================ */

.hkux-navigation__item--parent:hover
> .hkux-navigation__dropdown {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}


/* ============================================================
   DROPDOWN ITEM
============================================================ */

.hkux-navigation__dropdown-item {
    position: relative;

    width: 100%;
}


/* ============================================================
   DROPDOWN LINK
============================================================ */

.hkux-navigation__dropdown-link {

    min-height: 44px;

    padding: 10px 17px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    color: #24304a;

    background: #ffffff;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.35;

    font-weight: 500;

    transition:
        color .2s ease,
        background-color .2s ease,
        padding-left .2s ease;
}


.hkux-navigation__dropdown-link:hover {

    color: #2149a9;

    background: #f3f6fc;

    padding-left: 21px;

}


/* ============================================================
   ACTIVE DROPDOWN
============================================================ */

.hkux-navigation__dropdown-item--active
> .hkux-navigation__dropdown-link {

    color: #2149a9;

    background: #eef3fc;

    font-weight: 600;

}


/* ============================================================
   CHILD MENU
============================================================ */

.hkux-navigation__dropdown-item
> .hkux-navigation__dropdown {

    top: -8px;

    left: 100%;

    border-radius: 6px;

}


/* ============================================================
   CHILD ARROW
============================================================ */

.hkux-navigation__child-arrow {

    display: inline-flex;

    align-items: center;

    color: #6b7485;

}


/* ============================================================
   EXTERNAL / PDF ICON
============================================================ */

.hkux-navigation__external-icon {

    flex-shrink: 0;

    color: #a50505;
}


/* ============================================================
   MOBILE BUTTON
============================================================ */

.hkux-navigation__mobile-toggle {

    min-height: 52px;

    padding: 8px 0;

    border: 0;

    background: transparent;

    color: #ffffff;

    display: inline-flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;
}


.hkux-navigation__hamburger {

    width: 25px;

    display: flex;

    flex-direction: column;

    gap: 5px;
}


.hkux-navigation__hamburger span {

    display: block;

    width: 100%;

    height: 2px;

    background: #ffffff;

    border-radius: 2px;

    transition:
        transform .25s ease,
        opacity .25s ease;
}


.hkux-navigation__mobile-label {

    font-size: 14px;

    font-weight: 600;
}


/* ============================================================
   SEARCH BUTTON
============================================================ */

.hkux-navigation__search {

    width: 45px;

    height: 45px;

    margin-left: 10px;

    padding: 0;

    border: 1px solid rgba(255,255,255,.25);

    background: rgba(255,255,255,.06);

    color: #ffffff;

    border-radius: 50%;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    cursor: pointer;

    transition:
        background-color .2s ease,
        transform .2s ease;
}


.hkux-navigation__search:hover {

    background: #ffffff;

    color: #1d3978;

    transform: translateY(-1px);

}


/* ============================================================
   KEYBOARD FOCUS
============================================================ */

.hkux-navigation a:focus-visible,
.hkux-navigation button:focus-visible {

    outline: 3px solid #214AAB;

    outline-offset: -3px;

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1199.98px) {

    .hkux-navigation__link {

        padding-left: 11px;

        padding-right: 11px;

        font-size: 13px;

    }

    .hkux-navigation__item--active
    .hkux-navigation__link::after {

        left: 11px;

        right: 11px;

    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 991.98px) {

    .hkux-navigation {

        background: #1d3978;

    }


    .hkux-navigation__inner {

        min-height: 52px;

    }


    .hkux-navigation__menu {

        position: fixed;

        top: 0;

        left: 0;

        width: min(360px, 88vw);

        height: 100vh;

        padding-top: 65px;

        background: #ffffff;

        box-shadow:
            10px 0 35px rgba(0,0,0,.18);

        overflow-y: auto;

        transform: translateX(-105%);

        transition:
            transform .3s ease;

        z-index: 1300;
    }


    .hkux-navigation__menu.hkux-mobile-open {

        transform: translateX(0);

    }


    .hkux-navigation__list {

        display: block;

        width: 100%;

    }


    .hkux-navigation__item {

        display: block;

        border-bottom: 1px solid #e7eaf0;

    }


    .hkux-navigation__link {

        width: 100%;

        min-height: 52px;

        padding: 14px 18px;

        justify-content: space-between;

        color: #1c2942;

        background: #ffffff;

        font-size: 14px;

        white-space: normal;

    }


    .hkux-navigation__link:hover {

        color: #2149a9;

        background: #f4f7fc;

    }


    .hkux-navigation__item--active
    .hkux-navigation__link {

        color: #2149a9;

        background: #f0f4fc;

    }


    .hkux-navigation__item--active
    .hkux-navigation__link::after {

        display: none;

    }


    /*
       Mobile dropdowns
    */

    .hkux-navigation__dropdown {

        position: static;

        min-width: 0;

        width: 100%;

        padding: 0;

        border: 0;

        border-radius: 0;

        box-shadow: none;

        background: #f7f9fc;

        opacity: 1;

        visibility: visible;

        transform: none;

        display: none;

    }


    .hkux-navigation__dropdown.hkux-mobile-submenu-open {

        display: block;

    }


    .hkux-navigation__dropdown-link {

        min-height: 46px;

        padding: 12px 25px;

        background: #f7f9fc;

        font-size: 13px;

    }


    .hkux-navigation__dropdown-link:hover {

        padding-left: 29px;

    }


    /*
       Third level
    */

    .hkux-navigation__dropdown-item
    > .hkux-navigation__dropdown {

        position: static;

        background: #eef2f8;

    }


    .hkux-navigation__dropdown-item
    > .hkux-navigation__dropdown
    .hkux-navigation__dropdown-link {

        padding-left: 38px;

    }


    /*
       Arrow
    */

    .hkux-navigation__arrow {

        margin-left: auto;

    }


    .hkux-navigation__item--parent.hkux-mobile-expanded
    > .hkux-navigation__link
    .hkux-navigation__arrow {

        transform: rotate(180deg);

    }


    /*
       Search
    */

    .hkux-navigation__search {

        width: 40px;

        height: 40px;

        margin-left: auto;

    }

}