/* --- MAIN HEADER --- */

.main-header-bar {
  background: #232323;
  position: relative;
  z-index: 10;
}

.main-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

.main-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  padding: 0 16px;
  width: 100%;
}

.main-header-flex .logo-wrapper {
  margin-right: auto;
}

.main-header-flex .nav-menu-container {
  margin-left: auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 60px;
}

.main-menu > li {
  position: relative;
  height: 60px;
}

.nav-link-bg {
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  cursor: pointer;
  background: transparent;
  border-right: 1px solid #333;
  border-left: none;
  box-sizing: border-box;
  transition: background 0.14s, box-shadow 0.14s;
}

.main-menu > li:first-child > .nav-link-bg {
  border-left: 1px solid #333;
}

/* Submenu arrow indicator */
.main-menu > li.menu-item-has-children > a:after {
  content: "\25BC";
  font-size: 10px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* Dropdown menu styling */
.main-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #232323;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 10;
  padding: 0;
}
.main-menu li:hover > ul,
.main-menu li:focus-within > ul {
  display: block;
}
.main-menu li ul li a {
  color: #fff;
  padding: 10px 18px;
  display: block;
  text-decoration: none;
  font-size: 14px;
  background: none;
}
.main-menu li ul li a:hover {
  background: #444;
}

/* nav-menu.css: Styles for the reusable navigation menu component */
.nav-menu-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  position: relative;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
}

.nav-menu > li {
  position: relative;
}
.nav-menu > li:last-child { margin-right: 0; }

.nav-menu > li > a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 15px 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s, font-weight 0.2s;
  border-radius: 5px;
}

.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
  background: #333;
  font-weight: 600;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
  color: #cccccc;
  background: rgba(255,255,255,0.08);
  font-weight: 600;
}

/* Dropdown indicator */
.nav-menu > li.menu-item-has-children > a:after {
  content: '\25BC';
  font-size: 0.7em;
  margin-left: 6px;
  vertical-align: middle;
}

/* Dropdown menu */
.nav-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(34,34,34,0.97);
  min-width: 170px;
  box-shadow: 0 2px 10px #0006;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  padding: 8px 0;
}
.nav-menu li:hover > ul,
.nav-menu li:focus-within > ul {
  display: block;
}
.nav-menu li ul li a {
  color: #fff;
  padding: 10px 16px;
  font-size: 1.15rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.nav-menu li ul li a:hover {
  color: #fff !important;
}

.sub-menu > li {
  list-style: none;
}

.sub-menu > li > div {
  display: flex;
  align-items: center;
  justify-content: start;
}

/* Down arrow for menu items with submenu */
.nav-menu > li.menu-item-has-children > div {
  position: relative;
  padding-right: 30px;
}
.nav-menu > li.menu-item-has-children > div::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  transition: border-color 0.2s;
  position: absolute;
  left: auto;
  right: 12px;
  top: 50%;
  margin-top: -7px;
  pointer-events: none;
  background: transparent;
}


/* Hamburger styles */

/* Navigation styles moved from home.css */

.main-nav {
  position: relative;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.15rem;
  padding: 8px 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-menu li a:hover {
  color: var(--primary-color);
}


.nav-menu > .current-menu-parent > .nav-link-bg,
.nav-menu > .current-menu-item > .nav-link-bg,
.nav-link-bg:hover {
  background: linear-gradient(to bottom, #444 0%, #232323 100%);
  box-shadow: none;
}

.nav-link-bg::before {
  display: none;
}

.nav-link-bg::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  z-index: 2;
  pointer-events: none;
  background: transparent;
  border-radius: 0;
  opacity: 1;
  transition: background 0.14s;
}


.nav-link-bg:hover::after {
  background: transparent;
}

.menu-item {
  margin-right: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 18px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #00cfff;
  border-radius: 2px;
}

.nav-close {
  display: none;
}

@media (max-width: 900px) {
  .main-header-flex .nav-menu-container {
    position: absolute;
    top: 0;
    right: 0;
  }

  .nav-close {
    display: none;
  }
  .nav-close.active {
    display: flex;
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    z-index: 1200;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    padding: 0;
  }
  .nav-close.active:focus, .nav-close.active:hover {
    background: #333;
    outline: 2px solid #0E629D;
  }
  .nav-close svg {
    width: 32px;
    height: 32px;
    pointer-events: none;
  }

  .nav-close {
    display: flex;
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    z-index: 1200;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    padding: 0;
  }
  .nav-close:focus, .nav-close:hover {
    background: #333;
    outline: 2px solid #0E629D;
  }
  .nav-close svg {
    width: 32px;
    height: 32px;
    pointer-events: none;
  }

  body.nav-menu-open {
    overflow: hidden;
  }
  .nav-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s;
  }
  .nav-menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu {
    flex-direction: column;
    background: #232323;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 92vw;
    max-width: 420px;
    min-width: 220px;
    box-shadow: -2px 0 16px #0008;
    z-index: 1000;
    display: flex;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.33s cubic-bezier(0.4,0,0.2,1), opacity 0.22s;
    overflow-y: auto;
    padding-top: 64px;
  }
  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.33s cubic-bezier(0.4,0,0.2,1), opacity 0.22s;
  }
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 18px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
  }
  .nav-toggle:focus,
  .nav-toggle:hover {
    background: #222;
    outline: 2px solid #0E629D;
  }
  .nav-toggle span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    margin: 4px 0;
    display: block;
    transition: background 0.2s;
  }
  .nav-menu > li {
    margin: 0;
    width: 100%;
  }
  .nav-menu > li > a,
  .nav-menu > li > div > a {
    padding: 18px 20px;
    font-size: 1.1rem;
    border-radius: 0;
    width: 100%;
    display: block;
    min-height: 48px;
    transition: background 0.18s, color 0.18s;
  }
  .nav-menu li ul {
    position: static;
    box-shadow: none;
    background: #232323;
    min-width: 100%;
    padding: 0;
    margin: 0;
  }
  .nav-menu li ul li a {
    padding: 16px 32px;
    font-size: 1rem;
    min-height: 44px;
  }
}

