/* NAVBAR CONTAINER */
#navbar{
  position: fixed;
  display: flex;
  justify-content: space-evenly;
  align-items: center;

  width: 100%;
  top: 0;
  padding: 1rem 0;

  background: rgba(255, 255, 255, 0.10);
  border-radius: 0;        
  /* box-shadow: 0 4px 30px rgba(10, 10, 10, 0.20);  */
  backdrop-filter: blur(14.8px);
  -webkit-backdrop-filter: blur(14.8px);
  border-bottom: 1px solid rgba(15, 94, 139, 0.10);

  z-index: 999;
}

/* LOGO */
.logoNavbar{
  width: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logoNavbar img{
  width: 55%;
}

/* LINKS */
.linksNavbar{
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#navbar ul{
  list-style: none;
  display: flex;
  justify-content: space-evenly;
  align-items: center;

  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 1.1rem;
}

#navbar li{
  padding: 0;
  position: relative;
}

/* Hover sections dropdown (desktop navbar only) */
#navbar .linksNavbar li .sectionsMenu{
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  min-width: 200px;
  padding: 0.5rem;

  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(15, 94, 139, 0.10);
  border-radius: 12px;

  backdrop-filter: blur(14.8px);
  -webkit-backdrop-filter: blur(14.8px);

  z-index: 2000;
}

/* JS-controlled close state (used after clicking a section on the same page) */
#navbar .linksNavbar li.sectionsMenuForceClosed .sectionsMenu{
  display: none !important;
}

/* Invisible hover-bridge so moving from link -> menu doesn't drop :hover */
#navbar .linksNavbar li .sectionsMenu::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

#navbar .linksNavbar li:hover .sectionsMenu,
#navbar .linksNavbar li:focus-within .sectionsMenu{
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* If hover is briefly lost on the parent li, keep menu open while hovering it */
#navbar .linksNavbar li .sectionsMenu:hover{
  display: flex;
  flex-direction: column;
}

#navbar .linksNavbar li .sectionsMenuItem{
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 500;
  white-space: nowrap;
}

#navbar .linksNavbar li .sectionsMenuItem:hover{
  background: rgba(255, 255, 255, 0.08);
}

/* NORMAL LINKS (NO PILL) */
#navbar li a{
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  /* padding: 8px 16px; */
  border-radius: 999px;
  transition: color .15s ease;
}

/* ACTIVE PAGE ONLY (THE BUBBLE) */
/* ACTIVE PAGE ONLY (underline) */
#navbar li.active a{
  background: transparent;
  border: none;
  box-shadow: none;

  color: var(--text);
  border-radius: 0;

  position: relative;
}

/* underline */
#navbar li.active a:not(.sectionsMenuItem)::after{
  content: "";
  position: absolute;
  left: -5px;      /* matches your link padding */
  right: -5px;     /* matches your link padding */
  bottom: -6px;    /* distance under text */
  height: 5px;
  /* border-radius: 999px; */
  background: #2a88b5; /* your blue */
}

.linksNavbarMenu{
  display: none;
}

.hidden{
  display: none !important;
}

.linksNavbarMenu{
  width: 10%;
  position: relative;
}

#hamburgerBtn{
  background-color: #ffffff;
  border: 1px solid rgba(157, 157, 157, 0.25);
  border-radius: .015rem;
}

/* HAMBURGER ICON LINES */
#hamburgerBtn svg rect{
  fill: rgb(157, 157, 157);
  transition: fill .15s ease;
}

#mobileMenu{
  background: rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12.4px);
  -webkit-backdrop-filter: blur(12.4px);
  padding: .5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  position: absolute;
  width: 100dvw;
  height: 100dvh;
  left: 0;
  top: 0;
  z-index: 1000;
}

/* Controlled by JS via the `hidden` attribute */
#mobileMenu[hidden]{
  display: none;
}

#mobileMenu ul{
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  width: 40%;
  padding: 2rem 1rem;
}

#mobileMenu li{
  width: 100%;
  text-align: right;
  padding: 2rem;
  position: relative;
}
#mobileMenu li::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(15,94,139,0) 0%, rgba(15,94,139,0.335) 100%);
  pointer-events: none;
}


#mobileMenu ul a{
  text-decoration: none;
  color: var(--text);
}

@media (max-width: 450px) or (max-width: 1100px) {
  #navbar{
    justify-content: space-between;
    width: 100% !important;
    display: flex;
  }
  .logoNavbar{
    margin-left: 1rem;
  }
  .logoNavbar{
    width: 40%;
  }
  .linksNavbarMenu{
    position: relative;
    width: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .supportButtonsNavbar{
    display: none;
  }
  .linksNavbar{
    display: none !important;
  }
  .linksNavbarMenu{
    display: flex;
  }
}