#topmenu {
  font-family : var(--menu-bar-font);
  font-size   : var(--menu-bar-font-size);  
  font-weight : var(--menu-bar-font-weight);
  position    : relative;
  background  : var(--fixed-top-area-background);
  background  : none;
  width       : auto;
  box-sizing  : content-box;
}

#topmenu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#topmenu > ul {
  position    : relative;
  display     : block;
  background  : var(--fixed-top-area-background);
  background  : none;  
  width       : 100%;
  z-index     : 600;
}

#topmenu:after,
#topmenu > ul:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

#topmenu.align-right > ul > li {
  float: right;
}

#topmenu.align-center ul {
  text-align: center;
}

#topmenu.align-center ul ul {
  text-align: left;
}

#topmenu > ul > li {
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 0;
}

#topmenu > ul > #menu-button {
  display: none;
}

#topmenu ul li a {
  display: block;
  text-decoration: none;
  border-radius : var(--global-menu-border-radius);
}

#topmenu ul li button {
    display: block;
    text-decoration: none;
    outline: none;
    border: none;  
}

#topmenu > ul > li > button {
  border: none;
  background: none;	
  font-size: 1rem;
  line-height : 1rem;
  padding: 15px 20px;
  color: var(--menu-bar-options-color);
  background : none;
  -webkit-transition: color var(--menu-bar-transition-speed) ease-out;
  -moz-transition: color var(--menu-bar-transition-speed) ease-out;
  -ms-transition: color var(--menu-bar-transition-speed) ease-out;
  -o-transition: color var(--menu-bar-transition-speed) ease-out;
  transition: color var(--menu-bar-transition-speed) ease-out;
}

#topmenu > ul > li > a {
  padding: 15px 10px;
  color: var(--menu-bar-options-color);
  -webkit-transition: all var(--menu-bar-transition-speed) ease-out;
  -moz-transition: all var(--menu-bar-transition-speed) ease-out;
  -ms-transition: all var(--menu-bar-transition-speed) ease-out;
  -o-transition: all var(--menu-bar-transition-speed) ease-out;
  transition: all var(--menu-bar-transition-speed) ease-out;
}

#topmenu > ul > li.has-sub > a {
  padding-right: 32px;
}

#topmenu > ul > li:hover > a {
/* colour of the hovered main menu items on screen which is not collapsed. */
/* note media query to ditch this background when collapsed. 
   this doesnt affect the color of the dropdown menu options on a screen which is not collapsed. */
  background : var(--menu-bar-options-hover-background);
  color : var(--menu-bar-options-hover-color);
  border-radius : var(--global-menu-border-radius);
  cursor : pointer;
}


#topmenu li.has-sub::after {
  display: block;
  content: "";
  position: absolute;
  width: 0;
  height: 0;
}
#topmenu > ul > li.has-sub::after {
  right: 10px;
  top: 20px;
  border: 5px solid transparent;
  border-top-color: var(--menu-bar-options-hover-background);
}
#topmenu > ul > li:hover::after {  /* i think this is the marker to say theres a sub menu. */
  border-top-color: #ffffff;
}
#indicatorContainer {
  position: absolute;
  height: 12px;
  width: 100%;
  bottom: 0px;
  overflow: hidden;
  z-index: -1;
}
#pIndicator {
  position: absolute;
  height: 0;
  width: 100%;
  border: 12px solid transparent;
  border-top-color: #2b2f3a;
  z-index: -2;
  -webkit-transition: left var(--menu-bar-transition-speed) ease;
  -moz-transition: left var(--menu-bar-transition-speed) ease;
  -ms-transition: left var(--menu-bar-transition-speed) ease;
  -o-transition: left var(--menu-bar-transition-speed) ease;
  transition: left var(--menu-bar-transition-speed) ease;
}
#cIndicator {
  position: absolute;
  height: 0;
  width: 100%;
  border: 12px solid transparent;
  border-top-color: #2b2f3a;
  top: -12px;
  right: 100%;
  z-index: -2;
}

#topmenu ul ul {
  position: absolute;
  left: -9999px;
  top: 70px;     /* This is the starting position of a dropdown menu, it will jump up when displayed, to meet its menubar menu option */
  opacity: 0;
  background : var(--menu-bar-dropped-background); 
  -webkit-transition: opacity var(--menu-bar-transition-speed) ease, top var(--menu-bar-transition-speed) ease;
  -moz-transition: opacity var(--menu-bar-transition-speed) ease, top var(--menu-bar-transition-speed) ease;
  -ms-transition: opacity var(--menu-bar-transition-speed) ease, top var(--menu-bar-transition-speed) ease;
  -o-transition: opacity var(--menu-bar-transition-speed) ease, top var(--menu-bar-transition-speed) ease;
  transition: opacity var(--menu-bar-transition-speed) ease, top var(--menu-bar-transition-speed) ease;
  border : 1px solid transparent;  
  z-index: 1000;

}
#topmenu ul ul ul {
  top: 37px;
  padding-left: 5px;
}

#topmenu ul ul li {
  position: relative;
}
#topmenu > ul > li:hover > ul {
  left: -7px;
  top: 54px;   /* THIS IS THE TOP RESTING POSITION OF A MENU WHICH IS A DROP DOWN MENU WITH A FULL SCREEN STILL - IT MUST JOIN WITH ITS PARENT OPTION */
  
  opacity: 1;
  border-radius : var(--global-menu-border-radius);
  padding : 10px 10px;
}
#topmenu.align-right > ul > li:hover > ul {
  left: auto;
  right: 0;
  opacity: 1;
}
#topmenu ul ul li:hover > ul {
  left: 130px;
  top: 0;
  opacity: 1;
}
#topmenu.align-right ul ul li:hover > ul {
  left: auto;
  right: 170px;
  top: 0;
  opacity: 1;
  padding-right: 5px;
}
#topmenu ul ul li a {
/* the OPTIONS dropdown box which is a menu which drops when screen is full. */
  width: 100%;
  border-bottom: 1px solid transparent;
  padding: 10px 20px;
  color: var(--menu-bar-options-color);
  background : var(--menu-bar-dropped-background);
  -webkit-transition: all var(--menu-bar-transition-speed) ease;
  -moz-transition: all var(--menu-bar-transition-speed) ease;
  -ms-transition: all var(--menu-bar-transition-speed) ease;
  -o-transition: all var(--menu-bar-transition-speed) ease;
  transition: all var(--menu-bar-transition-speed) ease;
  border-radius : var(--global-menu-border-radius);

}
#topmenu.align-right ul ul li a {
  text-align: right;
}
#topmenu ul ul li:hover > a {
/* hover on a non-collapsed dropdown menu.	*/
  background : var(--menu-bar-options-hover-background);
  color : var(--menu-bar-options-hover-color);  
 
}
#topmenu ul ul li:last-child > a,
#topmenu ul ul li.last > a {
  border-bottom: 0;
}
#topmenu > ul > li > ul::after {
  content: '';
  border: 6px solid transparent;
  width: 0;
  height: 0;
  border-bottom-color: transparent;
  position: absolute;
  top: -12px;
  left: 30px;
}
#topmenu.align-right > ul > li > ul::after {
  left: auto;
  right: 30px;
}
#topmenu ul ul li.has-sub::after {
  border: 4px solid transparent;

  right: 10px;
  top: 12px;
  -moz-transition: all var(--menu-bar-transition-speed) ease;
  -ms-transition: all var(--menu-bar-transition-speed) ease;
  -o-transition: all var(--menu-bar-transition-speed) ease;
  transition: all var(--menu-bar-transition-speed) ease;
  -webkit-transition: -webkit-transform var(--menu-bar-transition-speed) ease, right var(--menu-bar-transition-speed) ease;
}
#topmenu.align-right ul ul li.has-sub::after {
  right: auto;
  left: 10px;
}
#topmenu ul ul li.has-sub:hover::after {
  right: -5px;
  -webkit-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  transform: rotateY(180deg);
}
#topmenu.align-right ul ul li.has-sub:hover::after {
  border-left-color: transparent;
  left: -5px;
  -webkit-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  transform: rotateY(180deg);
}


@media all and (max-width: 1225px), 
only screen and (max-width: 1225px),
 only screen and (max-width: 1225px), 
 only screen and (max-width: 1225px), 
 only screen and (max-width: 1225px), 
 only screen and (max-width: 1225px), 
 only screen and (max-width: 1225px) {
  #topmenu {
    width: auto;
  }
  #topmenu.align-center ul {
    text-align: left;
  }
  #topmenu.align-right > ul > li {
    float: none;
  }
  #topmenu ul {
    width: auto;
  }
  #topmenu .submenuArrow,
  #topmenu #indicatorContainer {
    display: none;
  }
  #topmenu > ul {
    height: auto;
    display: block;
    max-height: 80vh;
    overflow-y: hidden;
    scrollbar-width: none;    
  }
  #topmenu > ul > li {
    float: none;
    display: block;
  }
  #topmenu li,
  #topmenu > ul > li {
    display: none;
  }


/* appear to be the sub-menu options on a dropdown menu from a screen which is collapsed. */
  #topmenu ul ul,
  #topmenu ul ul ul,
  #topmenu ul > li:hover > ul,
  #topmenu ul ul > li:hover > ul,
  #topmenu.align-right ul ul,
  #topmenu.align-right ul ul ul,
  #topmenu.align-right ul > li:hover > ul,
  #topmenu.align-right ul ul > li:hover > ul {
    position: relative;
    left: auto;
    top: auto;
    opacity: 1;
    padding-left: 0;
    padding-right: 0;
    right: auto;
    padding-top : 10px; /* THESE TWO PADDINGS MATCH SOME ABOVE (#topmenu > ul > li:hover > ul) - BUT THESE HERE ARE FOR THE COLLAPSED MENU DROPDOWN. */
    padding-bottom : 10px;
  }
  #topmenu ul .has-sub::after {
    display: none;
  }
  #topmenu ul li a 
  {
    padding: 12px 45px;
    text-align : center;
  }
  
  
  #topmenu ul ul li a {
    border: 0;
    background: none;
    width: auto;
    padding: 8px 35px;
    
  }
  
  #topmenu.align-right ul ul li a {
    text-align: center;
  }
  #topmenu ul ul li:hover > a {
  /* on hover colour of the sub-menu items when the menu has been collapsed */
    background : var(--menu-bar-options-hover-background);
    color : var(--menu-bar-options-hover-color);
  }
 
  #topmenu ul ul ul a {
    padding: 8px 50px;
  }
  #topmenu ul ul ul ul a {
    padding: 8px 65px;
  }
  #topmenu ul ul ul ul ul a {
    padding: 8px 80px;
  }
  #topmenu ul ul ul ul ul ul a {
    padding: 8px 95px;
  }
  #topmenu > ul > #menu-button {
    display: block;
    cursor: pointer;
  }


  #topmenu #menu-button > a {
    padding: 14px 20px;
  }



  
  #topmenu ul.open li,
  #topmenu > ul.open > li {
    display: block;
    border-top : 2px solid transparent;
  }
  
  #topmenu > ul.open
  {
      top : -2px;
      border-radius : var(--global-menu-border-radius);
      background  : var(--menu-bar-dropped-background);
      box-shadow  : -10px 10px 12px rgba(0, 0, 0, .6);      
      
  
  }
  
  #topmenu > ul.open > li#menu-button > a {
    color: #fff;
    border-bottom: #c0c0c0;
  }
  #topmenu ul ul::after {
    display: none;
  }
  
  #topmenu #menu-button::after {
    display: block;
    content: '';
    position: absolute;
    height: 3px;
    width: 26px;
    border-top: 3px solid var(--menu-bar-button-bars-color);      /* THESE ARE THE COLORS OF THE TOP 2 BURGER BARS */
    border-bottom: 3px solid var(--menu-bar-button-bars-color);
    right: 21px;
    top: 18px;
    box-sizing: content-box;
  }
  #topmenu #menu-button::before {
    display: block;
    content: '';
    position: absolute;
    height: 3px;
    width: 26px;
    border-top: 3px solid var(--menu-bar-button-bars-color);
    right: 21px;
    top: 30px;
    box-sizing: content-box;
  }
  
  
#topmenu #menu-button:hover::after,
#topmenu #menu-button:hover::before 
  {
    border-color: var(--menu-bar-button-bars-hover-color);
  }
    
  
  #topmenu ul.open #menu-button::after,
  #topmenu ul.open #menu-button::before {
    border-color: none;
  }

#topmenu > ul {
  background  : none;
}  
  
#topmenu > ul > li:hover > a 
{
/* color of the hovered main menu items on screen which is not collapsed - notice that this is inside the media query. */
/* note this is a media query entry to ditch this background when collapsed and is currently not active */
/*    border-radius : 0px; */
}
}