/* ===========================
   Mobile Menu Styles
   =========================== */

/* Base nav container (offcanvas by default) */
.nav {
  position: fixed;
  top: 0;
  right: -280px; /* hidden */
  width: 260px;
  height: 100%;
  background: #111827; /* dark gray */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  transition: right 0.3s ease;
  z-index: 2000;
  padding: 20px 0;
}

.nav.open {
  right: 0;
}

/* Nav list */
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav ul li a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Submenu */
.nav ul li.has-sub > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav ul li.has-sub .sub {
  display: none;
  background: #1f2937;
}

.nav ul li.has-sub.open .sub {
  display: block;
}

.nav ul li.has-sub .sub a {
  padding: 12px 30px;
  font-size: 0.95rem;
}

/* Toggle (hamburger button) */
.nav-toggle {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;         /* ensures pointer hand shows */
  z-index: 2100;
}

.site-header .container.inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .brand img {
  max-height: 98px;
  height: auto;
  width: auto;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1500;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when menu is open */
body.nav-open {
  overflow: hidden;
}

/* ===========================
   Desktop Layout (≥ 768px)
   =========================== */
@media (min-width: 768px) {
  /* Keep hamburger visible on desktop */
  .nav {
    position: fixed; /* stays offcanvas, controlled by toggle */
    right: -280px;
    width: 260px;
    height: 100%;
    background: #111827;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    padding: 20px 0;
    transition: right 0.3s ease;
  }

  .nav.open {
    right: 0;
  }

  /* overlay still active on desktop */
  .nav-overlay {
    display: block;
  }
}
