/* Reset */
.nav,
.nav ul,
.nav li {
    margin: 0;
    padding: 0;
    overflow: visible;
    list-style: none;
}

/* Clearfix */
.nav-div::after,
.nav::after {
    display: table;
    clear: both;
    content: "";
}


/* GLOBAL STYLING
---------------------------------------------------------------------- */

/* UL */
.nav {
    position: relative;
    font-family: 'libre_baskervilleregular';
}

/* desktops */
@media (min-width: 769px) {
    .nav {
        display: block !important;      /* force visibility on desktops */
    }
}

/* LI */
.nav li {
    position: relative;
}

/* LI - hover */
.nav li:hover {
    /*background-color: #55ba47;*/
}

/* LI - has children */
.nav li.has-children > a {
    padding-right: 1.5em;
}

/* LI - has children icon */
.nav li.has-children > a::after {
    position: absolute;
    top: 50%;
    right: 0.5em;
    font-family: "FontAwesome";
    content: "\f107";       /* angle-down */
    transform: translateY(-53%);
}

/* Links */
.nav a {
    display: block;
    padding: 0.5em 1em;
    text-decoration: none;
}

.nav li a:hover {
    color: #06c;
}


/* LEVEL 1                                          (specific styling)
----------------------------------------------------------------------
*/

/* UL*/
.nav {
    float: right;
}

/* LI */
.nav > li {
    display: inline-block;
    margin-left: 2px;
}

.nav > li::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 13px;
    border-right: 1px solid #125eab;
}

.nav > li:last-child::after {
    display: none;
}

/* LI - Active state */
.nav > li.item-on {
}

/* LI - Hover state */
.nav > li:hover {
    background-color: #55ba47;
}

/* Links */
.nav > li > a {
    position: relative;
    display: table-cell;
    color: #125eab;
    font-size: 1.2em;
    text-align: center;
    vertical-align: middle;
}

/* Links - Active state */
.nav > li.item-on > a {
    color: #55ba47;
}

/* Links - Hover state */
.nav > li:hover > a,
.nav > li.item-on:hover > a {
    color: #fff;
}



/* LEVEL 2                                          (specific styling)
----------------------------------------------------------------------
*/
.nav ul {
    position: absolute;
    top: 100%;
    display: none;
    min-width: 100%;
    background-color: #55ba47;
}

/* show sub-menu */
.nav li:hover > ul {
    display: block;
}

/* ensure last-child UL doesn't fall off the screen */
.nav > li:last-child:hover > ul {
    right: 0;
}

/* LI */
.nav ul li {
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.nav ul li:last-child {
    border-bottom: none;
}

/* LI - active state */
.nav ul li.item-on {
    background-color: rgba(0, 0, 0, 0.3);
}

/* LI - hover state  */
.nav ul li:hover,
.nav ul li.item-on:hover {
    background-color: #125eab;
}

/* LI - has children */
.nav ul li.has-children > a::after {
    content: "\f105";   /* angle-right */
}

/* Links */
.nav ul li a {
    min-width: 200px;
    padding-top: 0.75em;
    padding-bottom: 0.75em;
    font-weight: normal;
    color: #fff;
    text-decoration: none;
    /* white-space: nowrap; */
}

.nav ul li:hover > a {
    color: #fff;
}


/* LEVEL 3+                                         (specific styling)
----------------------------------------------------------------------
*/
.nav ul ul {
    top: 0;
    left: 100%;
    border-left: 1px solid rgba(255,255,255,0.3);
}

/* last-child submenus fly out to the left  (instead of right) */
.nav > li:hover:last-child ul ul {
    right: 100%;
    left: auto;
    border-right: 1px solid rgba(255,255,255,0.8);
}


/*
=====================================================================
MEDIA QUERIES
=====================================================================
*/

@media (min-width: 769px) and (max-width: 991px) {
    .nav > li > a {
        width: auto;
    }
}

@media (max-width: 768px) {
    /* show the trigger */
    .nav-trigger {
        display: block;
    }

    /* GENERAL STYLING
    ----------------------------------------------------------------------
    */
    .nav-div {
        clear: both;
    }
    .nav {
        float: none;
    }

    .nav li.has-children > a::after {
        top: 1.45em;
    }

    /* LEVEL 1
    ----------------------------------------------------------------------
    */
    .nav > li {
        display: block;
        border-right: none;
    }

    .nav > li > a {
        display: block;
        width: auto;
        height: auto;
        text-align: left;
    }


    /* LEVEL 2
    ----------------------------------------------------------------------
    */
    .nav ul {
        position: static;
    }

    .nav ul li {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .nav ul li:hover {
        background-color: transparent;
        background-image: none;
    }

    .nav ul li.has-children > a::after {
        content: "\f107";       /* angle-down */
    }

    .nav ul li a {
        padding-left: 2em;
    }


    /* LEVEL 3
    ----------------------------------------------------------------------
    */
    .nav ul ul {
        background-color: #666;
        border: none;
    }

    .nav ul ul a {
        padding-left: 3em;
    }
}



