﻿/* =========================================================
   Variables & Core Resets
   ==========================================================*/
:root {
  --menu-bg: #000000;
  --submenu-bg: #333333;
  --text-color: #dddddd;
  --text-hover: #ffffff;
  --font-family: 'Arial', sans-serif;
}

#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  line-height: 1;
  display: block;
  position: relative;
  box-sizing: border-box;
}

#cssmenu #menu-button,
#cssmenu select {
  display: none; /* Hidden by default on desktop viewports */
}

#cssmenu {
  font-family: var(--font-family);  
  background: var(--menu-bg);
}

/* =========================================================
   Desktop Navigation Layout (Flexbox)
   ==========================================================*/
#cssmenu > ul {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

#cssmenu.align-center > ul {
  justify-content: center;
}

#cssmenu.align-right > ul {
  justify-content: flex-end;
}

#cssmenu > ul > li > a {
  padding: 18px;
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  text-transform: uppercase;
}

#cssmenu > ul > li:hover > a {
  color: var(--text-hover);
}

/* Submenu Arrow Indicators (Plus/Minus toggles) */
#cssmenu > ul > li.has-sub > a {
  padding-right: 30px;
}

#cssmenu > ul > li.has-sub > a:after {
  position: absolute;
  top: 22px;
  right: 11px;
  width: 8px;
  height: 2px;
  display: block;
  background: var(--text-color);
  content: '';
}

#cssmenu > ul > li.has-sub > a:before {
  position: absolute;
  top: 19px;
  right: 14px;
  display: block;
  width: 2px;
  height: 8px;
  background: var(--text-color);
  content: '';
  transition: all .25s ease;
}

#cssmenu > ul > li.has-sub:hover > a:before {
  top: 23px;
  height: 0;
}

/* =========================================================
   Desktop Dropdowns Styling
   ==========================================================*/
#cssmenu ul ul {
  display: none; /* Hide drop-down stacks using modern display flags */
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
}

#cssmenu.align-center ul ul {
  text-align: left;
}

#cssmenu.align-right ul ul {
  text-align: right;
}

#cssmenu li:hover > ul {
  display: block;
}

#cssmenu.align-right li:hover > ul {
  left: auto;
  right: 0;
}

/* Deep Nested Dropdowns (3rd level+) */
#cssmenu ul ul ul {
  margin-left: 100%;
  top: 0;
}

#cssmenu.align-right ul ul ul {
  margin-left: 0;
  margin-right: 100%;
}

#cssmenu ul ul li a {
  border-bottom: 1px solid rgba(150, 150, 150, 0.15);
  padding: 11px 15px;
  width: 170px;
  font-size: 16px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 400;
  background: var(--submenu-bg);
}

#cssmenu ul ul li:last-child > a,
#cssmenu ul ul li.last-item > a {
  border-bottom: 0;
}

#cssmenu ul ul li:hover > a,
#cssmenu ul ul li a:hover {
  color: var(--text-hover);
}

/* Submenu Deep Arrow Indicators */
#cssmenu ul ul li.has-sub > a:after {
  position: absolute;
  top: 16px;
  right: 11px;
  width: 8px;
  height: 2px;
  display: block;
  background: var(--text-color);
  content: '';
}

#cssmenu.align-right ul ul li.has-sub > a:after {
  right: auto;
  left: 11px;
}

#cssmenu ul ul li.has-sub > a:before {
  position: absolute;
  top: 13px;
  right: 14px;
  display: block;
  width: 2px;
  height: 8px;
  background: var(--text-color);
  content: '';
  transition: all .25s ease;
}

#cssmenu.align-right ul ul li.has-sub > a:before {
  right: auto;
  left: 14px;
}

#cssmenu ul ul > li.has-sub:hover > a:before {
  top: 17px;
  height: 0;
}

/* =========================================================
   Mobile/Small-Screen Native Media Query (768px Breakpoint)
   ==========================================================*/
@media screen and (max-width: 768px) {
  #cssmenu {
    width: 100%;
  }

  /* Force display modes and stack layout lists vertically */
  #cssmenu ul {
    width: 100%;
    display: none;
    flex-direction: column;
  }

  /* Clean execution binding maps via our updated JS engine rules */
  #cssmenu ul.open {
    display: block !important;
  }

  #cssmenu.align-center > ul {
    text-align: left;
  }

  #cssmenu ul li {
    width: 100%;
    border-top: 1px solid rgba(120, 120, 120, 0.2);
  }

  #cssmenu ul li a,
  #cssmenu ul ul li a {
    width: 100%;
    border-bottom: 0;
  }

  #cssmenu ul ul li a {
    padding-left: 25px;
    color: var(--text-color);
    background: none;
  }

  #cssmenu ul ul ul li a {
    padding-left: 35px;
  }

  #cssmenu ul ul li:hover > a,
  #cssmenu ul ul li.active > a {
    color: var(--text-hover);
  }

  #cssmenu ul ul,
  #cssmenu ul ul ul,
  #cssmenu.align-right ul ul {
    position: relative;
    left: 0;
    width: 100%;
    margin: 0;
    text-align: left;
  }

  /* Strip regular hover layouts when viewing across mobile ports */
  #cssmenu > ul > li.has-sub > a:after,
  #cssmenu > ul > li.has-sub > a:before,
  #cssmenu ul ul > li.has-sub > a:after,
  #cssmenu ul ul > li.has-sub > a:before {
    display: none;
  }

  /* Mobile Menu Hamburger Toggle Display activation */
  #cssmenu #menu-button {
    display: block;
    padding: 17px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
  }

  #cssmenu #menu-button:after {
    position: absolute;
    top: 22px;
    right: 17px;
    display: block;
    height: 4px;
    width: 20px;
    border-top: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
    content: '';
  }

  #cssmenu #menu-button:before {
    position: absolute;
    top: 16px;
    right: 17px;
    display: block;
    height: 2px;
    width: 20px;
    background: var(--text-color);
    content: '';
  }

  /* Mobile Close Icons (X Shape) via Transforms */
  #cssmenu #menu-button.menu-opened:after {
    top: 23px;
    border: 0;
    height: 2px;
    width: 15px;
    background: var(--text-hover);
    transform: rotate(45deg);
  }

  #cssmenu #menu-button.menu-opened:before {
    top: 23px;
    background: var(--text-hover);
    width: 15px;
    transform: rotate(-45deg);
  }

  /* Dropdown Accordion Toggle Trigger Buttons */
  #cssmenu .submenu-button {
    position: absolute;
    z-index: 99;
    right: 0;
    top: 0;
    display: block;
    border-left: 1px solid rgba(120, 120, 120, 0.2);
    height: 46px;
    width: 46px;
    cursor: pointer;
  }

  #cssmenu .submenu-button.submenu-opened {
    background: var(--menu-bg);
  }

  #cssmenu ul ul .submenu-button {
    height: 34px;
    width: 34px;
  }

  #cssmenu .submenu-button:after {
    position: absolute;
    top: 22px;
    right: 19px;
    width: 8px;
    height: 2px;
    display: block;
    background: var(--text-color);
    content: '';
  }

  #cssmenu ul ul .submenu-button:after {
    top: 15px;
    right: 13px;
  }

  #cssmenu .submenu-button.submenu-opened:after {
    background: var(--text-hover);
  }

  #cssmenu .submenu-button:before {
    position: absolute;
    top: 19px;
    right: 22px;
    display: block;
    width: 2px;
    height: 8px;
    background: var(--text-color);
    content: '';
  }

  #cssmenu ul ul .submenu-button:before {
    top: 12px;
    right: 16px;
  }

  #cssmenu .submenu-button.submenu-opened:before {
    display: none;
  }

  /* Handle native layout formatting alternative rules */
  #cssmenu.select-list {
    padding: 5px;
  }
  
  #cssmenu.select-list select {
    display: block;
  }
}