/* Navigation Menu (the options bar at the top) */

.site-navigation {
    width: 100%; /* Does the top bar extend to the right edge of the page */
}
.site-navigation a { /* Links colour inside the top bar */
    color: rgba( 0, 0, 0, 1 );
}

.main-navigation { /* Small menu */
    background-image: linear-gradient(rgba( 240, 240, 240, 0.8 ), rgba( 210, 210, 210, 0.8 )); /* colour of bg of buttons */
    float: left;
    font-size: 1.125rem; /* Font size of menu items */
    margin: 0;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 0px; /* Shift menu */
    display: flex;
    justify-content: center;
}
.main-navigation li {
    float: left;
    position: relative;
}
.main-navigation a {
    display: block;
    padding: 6px 13px 7px;
    text-decoration: none;
    word-wrap: break-word;
}

.main-navigation li:hover > a {
    background-image: linear-gradient(rgba( 215, 215, 215, 0.8 ), rgba( 180, 180, 180, 0.8 ));
}

/* Dropdown list https://www.w3schools.com/howto/howto_css_dropdown_navbar.asp */
.dropdown {
    float: left;
    overflow: hidden;
    text-rendering: optimizeLegibility;
    z-index:2;
}

.dropbtn a {
    padding: 0
}
.dropbtn a:active,
.dropbtn a:focus {
    background: transparent; /* or match the dropdown hover: rgb(200, 200, 200) */
}

.dropdown .dropbtn {
    border: none;
    outline: none;
    padding: 6px 13px 7px;
    background-color: inherit;
    font-family: inherit;
    font-size: 1.125rem; /* font size of drop down buttons; must match "font size of menu items" */
    margin: 0;
    white-space: nowrap; /* So that drop down svg arrow isnt displayed on a new line on mobile devicees */
    /* cursor: pointer; this lets the pointer transform into a finger on hover (not needed as it's not a link itself) */
}

.navbar a:hover,
.dropdown:hover .dropbtn {
    background-color: rgb( 200, 200, 200 );
}

.dropdown-content {
    margin-top:34px; /* This should be short enough so as not to leave a gap between the button and the drop down list */
    display: none;
    position: absolute;
    background-color: rgb(249, 249, 249);
    min-width: 150px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a {
    float: none;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgb(221, 221, 221);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Shown by JS on touch after first tap (see header.html); keeps menu open for second tap to follow top link */
.dropdown.dropdown-menu-open .dropdown-content {
    display: block;
}
