/* https://www.w3schools.com/howto/howto_js_responsive_navbar_dropdown.asp */

:root {
  --golden: #9a8764;
  --dark: #333;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

header {
  .display: flex;
  .justify-content: space-between;
  background-color: #333;
  .background-color: #04aa6d;

  background-color: white;

  height: 100px;
  height: auto;
  align-items: center;
}

header img {
  width: 100px;
  padding: 10px;
}

.topnav {
  overflow: hidden;
  .background-color: #333;

  display: flex;

  align-items: center;
}

.topnav a {
  display: block;
  color: #f2f2f2;
  color: var(--dark);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 1.25em;
  text-transform: uppercase;
}

.active {
  background-color: #04aa6d;
  color: white;
}

a.icon {
  display: none;
  color: #f2f2f2;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 2.5rem;
}

.dropdown {
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 1.25em;
  border: none;
  outline: none;
  .color: white;
  color: black;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
  text-transform: uppercase;
}

.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;
}

.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.topnav a:hover,
.dropdown:hover .dropbtn {
  .background-color: #555;
  color: white;
  color: var(--golden);
}

.dropdown-content a:hover {
  background-color: #ddd;
  color: black;
}

.dropdown:hover .dropdown-content {
  display: block;
}

@media screen and (max-width: 768px) {
  .topnav a,
  .dropdown .dropbtn {
    display: none;
  }
  a.icon {
    float: right;
    display: block;
    /* added this to force the hamburger menu into the top right corner so there is no moverment when the user clicks*/
    .position: absolute;
    .top: 0px;
    .right: 0px;
    /* end */
    position: relative;
    top: 0px;
    right: 0px;
  }
}

@media screen and (max-width: 768px) {
  .topnav.responsive {
    position: absolute;
    top: 138px;
    left: 0;
    width: 100%;
    display: block;
    background-color: #333;
  }
  .icon {
    .position: absolute;
    .right: 0;
    .top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
    color: var(--golden);
  }
  .topnav.responsive .dropdown {
    float: none;
  }
  .topnav.responsive .dropdown-content {
    position: relative;
  }
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
    color: var(--golden);
  }
}
