

.navbar {
    font-family: sans-serif;
    width:auto;
    padding-left: 100px;
    padding-right: 150px;    
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;    
    align-items:center;
    padding-top: 1.25em;

    li:hover, a:hover {
        cursor: pointer;
    }
}

.lock {
    height: 90%;
    width: 20px;
    margin-right: 4px;
    aspect-ratio: 1/1;
    background-size: 100% 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-lock" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 0a4 4 0 0 1 4 4v2.05a2.5 2.5 0 0 1 2 2.45v5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 13.5v-5a2.5 2.5 0 0 1 2-2.45V4a4 4 0 0 1 4-4M4.5 7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7zM8 1a3 3 0 0 0-3 3v2h6V4a3 3 0 0 0-3-3"/></svg>');
}

.logo {
    max-width: 100%;
    max-height: 120px;
    width: max-content;
    height: auto;
}

.dropdown {
    display: inline;
}

.right-menu {
    flex-wrap: wrap;
    width: fit-content;
}

.broker-login {          
    flex-shrink: 0;
    width: 100%;
    justify-content: end;
    height: min-content;
    padding-right: 23px;
    a {            
        margin-right: 23px;
    }
}

.broker-login > a {  
    /* Custom Link formatting */
    align-items: center;
    color:  white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-overflow: clip;
    padding: 10px 15px;
}


.header-link {
    display: flex;
    position: relative;
    padding-left: 1em;
    padding-right: 1em;
    ul {
        display: block;
    }    
    a {
        /* Clear all default link formatting */
        color: inherit;
        text-decoration: none;
        background: none;
        border: none;
        font: inherit;
        padding: 0;
        margin: 0;
        outline: none;
        cursor: default;
    }
}

.header-link > a {   
    /* Custom Link formatting */
    color:  white;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-overflow: clip;
    padding: 15px 7px;
    border-bottom: 4px solid transparent;
    text-shadow: 0 3px 6px rgba(0,0,0,0.37);
}


.header-link:hover > a {    
    border-bottom: 3px solid green;
}

.main-menu {
    width: 100vw;
    position: fixed;
    top: 0;
    transition: all 0.25s ease-in;
    .logo-div {
        margin-right: auto;
    }    
    z-index: 9999;
}

.menu-links {    
    padding-top: 10px;
    flex-grow: 1;
    flex-direction: row;
    justify-content: end;
    height: min-content;
}

.dropdown-menu{    
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    background-color: white;
    min-width: 440px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    transition: opacity 0.7s ease-in;
    ul {
        list-style-type: none;
        margin-block-start: 0;
        margin-block-end: 0;
        padding-inline-start: 0;
        padding: 1.5em 2em 2em 2em;
    }
    li + li {        
        border-top: 1px solid #dedfe2;
    }
    li:hover {
        background-color: #d4d4d4;
    }
    a {
        width: 100%;
        display: inline-block;
        padding-top: 1em;
        padding-bottom: 1em;   
        padding-left: 1em;  
        height:max-content;
        font-size: 16px;
        font-weight: 500;
        color: black;
    }
}

.dropdown:hover + .dropdown-menu , .dropdown-menu:hover {
    visibility: visible;
    opacity: 1;    
    transition: opacity 0.5s ease-out;
}

.scrolled {
    background-color: rgba(0,0,0,0.9);
    text-align: left;
    align-items: center;
    .logo {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 10px;
        max-width: 100px !important;
        max-height: 71.4px !important;
        width: max-content;
        height: auto;
    }

    .navbar {
        padding-top: 0px;
    }

    .menu-links {
        width: 100%;
        padding-top: 0px;
    }
    .spacer {
        display: none;
    }
    
    .header-link:hover > a {    
        border-bottom: 3px solid white;
    }

    .broker-login {
        display: none;
    }
}

@media (max-width: 1500px) {
    .navbar {
      padding-right: 20px !important;
      padding-left: 20px !important;
    }

    .scrolled {
        .navbar {
            padding-right: 5px !important;
            padding-left: 20px !important;
        }
    }
}

/* Mobile Rules */
@media (max-width: 992px) {
    #main-menu {
        display: none;
    }

    #mobile-main-menu {
        
        li:hover, a:hover {
            background-color: unset;
        }

        display: block !important;
        position: absolute;
        width: 100% !important;

        ul {
            padding: 0px;
        }

        li {
            border-top: 1px solid #dedfe2;            
            padding-left: 15px;
        }

        .logo-div {
            align-items: center;
            flex-direction: row;
            justify-content: space-between;
            width: 100%;
        }

        .logo {
            max-height: 90px;
            padding-left: 20px;
        }
        
        .navbar {
            background-color:black;
            display: block;
            padding-left: 0px !important;            
            padding-right: 0px !important;
            padding-top: 10px;
        }

        .menu-links {            
            flex-direction: row;
            flex-wrap: wrap;

            position:absolute;            
            visibility:hidden;
            opacity: 0;                    
            box-shadow: none;            
            max-height: 0;            
            transition: max-height 0.6s ease-in-out;
        }

        .header-link {
            flex-basis: 100%;            
            border-bottom: 1px solid #dedfe2;            
            border-top: 1px solid #dedfe2;
            flex-direction: row;
            flex-wrap: wrap;
            background-color: white;
            padding-left: 0;
            padding-right: 0;
            a {                
                color: var(--howick-blue);
                border-bottom: none;
            }
        }

        .header-link:hover > a {
            border-bottom: unset;   
        }

        .header-link .mobile-header {   
            /* Custom Link formatting */
            font-size: 18px;
            font-weight: 700;
            text-transform: uppercase;
            text-overflow: clip;
            padding: 15px 7px;
            border-bottom: 4px solid transparent;
        }

        .dropdown {
            flex-basis: 100%;
            flex-direction: row;
            text-align: left;
            text-shadow: none;
            display: flex;
            padding-left: 1em;            
        }

        .mobile-header {
            flex-basis: 90%;
        }
        
        .mobile-button {
            flex-basis: 10%;
            button {
                all: unset;
                text-align: center;
                align-items: center;
                min-height: 50px;
                min-width: 50px;
                width: 100%;
                height: 100%;
                font-size: 2.3em;
                font-weight: 100;
                background-color: #e5e5e5;
                border-left: 1px solid #dedfe2;
            }
        }

        .visible {
            visibility: visible !important;
            max-height: 1000px !important;
            opacity: 1 !important;
            position:static !important;
            transition: all 0.6s ease-out;
        }

        .dropdown-menu {            
            flex-basis: 100%;            
            border-top: 1px solid black;   
            min-width: unset !important;

            position:absolute;            
            visibility:hidden;
            opacity: 0;                    
            box-shadow: none;            
            max-height: 0;            
            transition: max-height 0.6s ease-in-out;
        }

        .main-dropdown-button {            
            color:white;
            height: 40px;
            width: 40px;
            background-size: 25px 25px;
            background-position: center center;
            background-repeat: no-repeat;
        }

        .icons {
            height: max-content;
            padding-right: 15px;
        }

        .open {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-list" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/></svg>');
        }

        .close {            
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-x-lg" viewBox="0 0 16 16"><path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>');
        }
        
        .contact {
            color:white;            
            height: 40px;
            width: 40px;
            background-size: 100% 100%;
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-phone" viewBox="0 0 16 16"><path d="M11 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM5 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/><path d="M8 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>');
        }        
    }
}