@charset "utf-8";
/* CSS Document */

/* =========================================================
   NAVBAR — 780 RAIL (CLEAN + UPDATED MOBILE DRAWER)
   ========================================================= */

/* 1. Main Navbar Container */
.navbar {
  width: 100%;
  margin: 0 0 1.2rem 0;
  background: #fff;
  position: relative; 
  z-index: 1001; /* Stay above the menu drawer */
  box-sizing: border-box;
  border-bottom: 1px solid #eee;
}

/* 2. Inner Rail (Desktop + Mobile) */
.navbar .container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  min-height: 6.2rem;
}

/* 3. Logo & Desktop Menu */
.navbar .logo img {
  display: block;
  height: 4.2rem;
  width: auto;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 4. The Global "Pill" Link Style */
.navbar .nav-menu a, .mobile-menu a {
  font-size: 1.9rem;
  font-weight: 800;
  padding: 0.55em 1.1em;
  border-radius: 0.8rem;
  background: #007acc;
  color: #fff !important;
  text-decoration: none !important;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}

.navbar .nav-menu a:hover, .mobile-menu a:hover {
  background: #005fa3;
}

/* 5. Hamburger Icon */
.navbar .hamburger {
  display: none;
  font-size: 3rem;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
}

/* 6. Mobile Drawer (The Standard Way) */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* Hidden off-screen to the right */
  width: 100%;
  max-width: 300px; /* Standard drawer width */
  height: 100vh;
  background: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 8rem 2rem 2rem; /* Top padding clears the fixed navbar */
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  transition: right 0.3s ease-in-out;
  box-sizing: border-box;
  gap: 1.5rem;
}

/* Triggered by toggleMobileMenu() JS */
.mobile-menu.open {
  right: 0 !important;
  display: flex !important;
}

.mobile-menu a {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* The Dark Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  z-index: 999; /* Between the page and the drawer */
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show overlay when menu is open */
.menu-overlay.open {
  display: block;
  opacity: 1;
}

/* 7. Responsive Mobile Adjustments */
@media (max-width: 40rem) {
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
  }

  /* Prevent page content from hiding behind the fixed navbar */
  body {
    padding-top: 6.2rem; 
  }

  .navbar .nav-menu {
    display: none;
  }

  .navbar .hamburger {
    display: block;
  }
}

/* (kept — you had this again at the very bottom) */
@media (max-width:40rem) {
  .navbar .nav-menu {
    display: none;
  }
  .navbar .hamburger {
    display: block;
  }
}
