
/* 1. Global Reset & Desktop Styles */
.logo-container {
display: flex;
align-items: center;
}

.nav-logo {
display: block;
width: 80px; /* Adjust this number to get your perfect size */
height: auto; /* Keeps the image from stretching */
}

#navbar-placeholder {
  position: sticky;
  top:0;
  z-index: 9999;
  width: 100%;
}

nav {
  /* Keep all your existing nav CSS... */
  position: sticky !important;
  top: 0;
  left: 0;
  width: 100% !important;
  box-sizing: border-box; /* ADD THIS */
  z-index: 9998;
  will-change: transform, backdrop filter;
  padding-top: env(safe-area-inset-top);
  isolation: isolate;
  margin-bottom: 20px;
  border-bottom: 1px solid;
  border-image: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8), transparent) 1;
  box-shadow: 0px 10px 20px -5px rgba(255, 255, 255, 0.6), 0px 4px 6px -2px rgba(255, 255, 255, 0.3);
}

/*Isolate the glass effect on a background layer */

nav::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1; /* Pushes the glass behind links */

/* Apply the glass effect ONLY to this background layer */
background-color: rgba(40, 40, 40, 0.4);
-webkit-backdrop-filter: blur(15px) saturate(180%);
backdrop-filter: blur(15px) saturate(180%);
}

.main-menu {
list-style-type: none;
margin: 0;
padding: 0;
width: 100% !important;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}

.main-menu a {
display: block;
color: var(--text-main);
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-weight: bold;
white-space: nowrap;
}

/* 2. Dropdown Logic */
.dropdown { position: relative; }

.dropdown-content {
display: none;
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
min-width: 180px;
background-color: rgba(40, 40, 40, 0.5) !important;
-webkit-backdrop-filter: blur(12px) !important;
backdrop-filter: blur(12px) !important;
border: 1px solid rgba(255, 255, 255, .75);
box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
z-index: 999;
}

/* Visual Arrow for Dropdowns */
.dropdown > a::after {
  content: " \25BE"; /* The unicode for a small downward triangle */
  font-size: 0.8em;
  margin-left: 6px; /* Gives a little breathing room between the word and the arrow */
  opacity: 0.6;
}


/* Show on hover for Desktop */
@media (min-width: 769px) {
.dropdown:hover .dropdown-content { display: block; }
}

/* --- NEW: Hamburger Button Styling (Hidden on Desktop) --- */
.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box; /* ADD THIS */
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 10000; /* Keeps it above the sliding menu */
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--text-main);
  border-radius: 3px;
}

/* --- REPLACED: MOBILE FIXES (Screens smaller than 768px) --- */
@media (max-width: 768px) {
  .hamburger {
    display: block; /* Show the button on mobile */
  }

  .main-menu {
    position: fixed;
    left: -100%; /* Hides the menu off-screen to the left */
    top: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background-color: rgba(30, 30, 30, 0.95); /* Solid enough to read text */
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    width: 100%; /* Takes up 70% of the screen */
    height: 100vh;
    padding-top: 80px; /* Pushes links down below the top bar */
    transition: 0.3s; /* Smooth slide effect */
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
  }

  /* This class will be toggled by JavaScript */
  .main-menu.active {
    left: 0; 
  }

  /* Make links span the full width of the side menu */
  .main-menu li {
    width: 100%;
  }

  .main-menu a {
    text-align: left;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle dividers */
  }

  /* Dropdown Fix for Mobile Slide Menu */
  .dropdown-content {
    position: static; /* Forces it to flow like an accordion instead of floating */
    box-shadow: none;
    border: none;
    background-color: transparent !important;
    padding-left: 20px; /* Indents child links */
    min-width: 100%;
  }

  .dropdown:active .dropdown-content,
  .dropdown:focus-within .dropdown-content {
    display: block;
  }

  /* Optional: Animate the hamburger into an 'X' when active */
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}


/* --- DESKTOP FIXES (Screens 769px and larger) --- */
@media (min-width: 769px) {
  nav {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .nav-header {
    width: auto; /* Shrinks the header box to just fit the logo */
    padding: 0 0 0 20px; /* Keeps your logo padded away from the left edge */
  }

  .main-menu {
    width: auto !important; /* Stops the menu from forcing a new line */
    flex-grow: 1; /* Lets the links fill the remaining space on the bar */
    justify-content: center; /* Centers the links */
    
    /* Pro-trick: Because the logo takes up space on the left, centering the links 
       in the remaining space will make them look slightly shifted to the right. 
       Adding a bit of padding to the right balances the weight of the logo! */
    padding-right: 100px; 
  }
}
