.topnav {
  background-color: #0c2364;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  font-family: 'Montserrat', sans-serif;
  flex-wrap: wrap;
  z-index: 1;
  box-shadow: 5px 10px 10px rgba(0,0,0,0.2);
  padding-right: 30px;
  min-height: 50px;
}

/* Style the links inside the navigation bar */
.topnav > a {
  color: #fff;
  opacity: .8;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

/* Hide the link that should open and close the topnav on small screens */
.topnav .icon {
  display: none;
}

.topnav .nav_logo {
  margin: 0px;
  padding: 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  opacity: 1;
}

.nav_logo img {
  max-height: 40px;
}

a.topnav-divider {
  border-color: #fff;
  padding: 2px;
  border-width: 2px;
  margin: 4px;
  height: 20px;
  border-left-style: solid; 
  border-right-style: solid; 
}


/* Style the dropdown button to fit inside the topnav */
.dropbtn {
  border: none;
  outline: none;
  background-color: inherit;
  color: #fff;
  opacity: .8;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.dropbtn>i {
  pointer-events: none; 
  cursor: default;
}

/* Style the dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  flex-direction: column;
}

/* Style the links inside the dropdown */
.dropdown-content a {
  /* float: none; */
  color: black;
  /* display: block; */
  text-align: left;
}

.dropdown .dropdown {
  width: 100%;
  position: relative;
}

.dropdown .dropdown .dropbtn {
  /* float: none; */
  color: black;
  width: 100%;
  padding: 14px 16px;
}

/* Style the dropdown content (hidden by default) */
.dropdown .dropdown .dropdown-content {
	top: 0%;
	left: 100%;
}

/* Add a dark background on topnav links and the dropdown button on hover */
.topnav a:hover:not(.topnav-divider), .dropbtn:hover {
  opacity: 1;
}

/* Add a grey background to dropdown links on hover */
.dropdown-content a:hover, .dropdown-content .dropbtn:hover {
  background-color: #ddd;
  color: black;
}

/* Show the dopdown menu when it has this class */
.show {
  display: flex;
}

/* Login element */
#login-element {
  padding: 10px 12px;
  cursor: pointer;
}

#login-element.open {
  padding: 10px 12px;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#login-element.open input {
  width: 100px;
} 

#login-element.open a {
  font-size: 10px;
}

#login-element.open > .row {
  width: 100%;
  justify-content: space-around;
}


/* Media Queries */
@media only screen and (max-width: 1024px) {
  .topnav {
      justify-content: center;
  }
}

/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
@media screen and (max-width: 600px) {
  .topnav a, .dropbtn, #login-element {
    display: none;
  }


  .topnav a.icon {
    display: flex;
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav {
    position: relative;
    height: 50px;
  }

  .topnav.responsive {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }

  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive .dropdown, .topnav.responsive .dropbtn {
    width: 100%;
  }

  .topnav.responsive a, .topnav.responsive .dropbtn, #login-element {
    display: flex;
  }

  .topnav.responsive .dropdown-content {
    position: relative;
  }

  .topnav.responsive .dropdown .dropdown .dropdown-content {
    position: relative;
    top: 100%;
    left: 0%;
  }

  a.topnav-divider {
    border-color: #fff;
    padding: 2px;
    border-width: 2px;
    margin: 4px;
    height: 5px;
    border-left-style: none; 
    border-right-style: none;
  }

  #login-element {
    max-width: 100%;
    width: 100%;
  }

  #login-element>input {
    flex-shrink: 1;
    flex-grow: 1;
  } 
}