/* ============================ */
/*    Navbar */
/* ============================ */

.navbar-container {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  width: 100%;
  background-color: #14131b;
  color: #fff;
  z-index: 1000;
}
.navbar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.35rem;
  color: white;
}
.navbar-brand::before {
  content: "";
  display: inline-block;
  margin-right: 0.5rem;
  min-width: 40px;
  min-height: 40px;
  background: url("../../assets/logos/logo-dowdy-small.webp") no-repeat center
    center/contain;
}
.brand-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.brand-text span {
  color: #4c98ff;
  margin-left: 0.3em;
}
.navbar-links {
  display: flex;
  justify-content: start;
  align-items: center;
  list-style: none;
  gap: 1.5rem;
  font-family: "Quicksand", sans-serif;
  z-index: 100;
  transition: all 0.75s ease-in-out;
}
.navbar-links .nav-icon {
  display: none;
}
.navbar-links a {
  text-decoration: none;
  font-size: 1.2rem;
  color: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
}
.navbar-links a:hover {
  color: #4c98ff;
}

/* Hamburger button */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.navbar-toggle-icon,
.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
  display: block;
  background-color: #004aad;
  height: 3px;
  width: 30px;
  border-radius: 1px;
  position: relative;
  transition: all 0.3s ease;
}
.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.navbar-toggle-icon::before {
  top: -8px;
}
.navbar-toggle-icon::after {
  top: 8px;
}
.navbar-overlay {
  display: none;
}

/* nav-dropdown styles */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  display: none;
  flex-direction: column;
  list-style: none;
  justify-content: start;
  align-items: start;
  width: auto;
  padding: 0.5rem 0rem;
  gap: 0.25rem;
  z-index: 200;
  border-bottom-right-radius: 25px;
  border-bottom-left-radius: 25px;
  background-color: #14131b;
}
.nav-dropdown-menu a {
  display: flex;
  justify-content: center;
  align-items: start;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: #fff;
}
/* .nav-dropdown-menu a:hover {
  background-color: #14131b;
} */
.nav-dropdown-menu a img {
  width: 25px;
  height: 25px;
}

/* Show nav-dropdown on hover (desktop) */
.nav-dropdown:hover > .nav-dropdown-menu {
  display: flex;
}
/* Add arrow to nav-dropdown link */
.nav-dropdown > a::after {
  content: "▼";
  font-size: 0.7em;
  margin-left: 0.5em;
  display: inline-block;
  transition: transform 0.3s;
  vertical-align: middle;
}
/* Rotate arrow when nav-dropdown is open (desktop hover) */
.nav-dropdown:hover > a::after {
  transform: rotate(-180deg);
}

.sidebar-logo {
  display: none;
}

/* Responsive: Hamburger & sidebar */
@media (max-width: 800px) {
  .navbar-container {
    padding: 1.5rem 1rem 0.5rem 1rem;
  }
  .navbar-overlay.nav-open {
    display: block;
    position: fixed;
    pointer-events: auto;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  .nav-dropdown > .nav-dropdown-menu,
  .nav-dropdown:hover > .nav-dropdown-menu {
    display: flex !important; /* Override desktop for mobile */
  }
  .nav-dropdown.nav-open > .nav-dropdown-menu {
    display: flex !important;
    flex-direction: column;
  }
  .navbar-links {
    position: fixed;
    flex-direction: column;
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(var(--vh, 1vh) * 100);
    width: 250px;
    right: -100vw;
    padding: 1rem;
    gap: 1rem;
    top: 0;
    background-color: #100f16;
    border-left: 1px solid #004aad75;
  }
  :root {
    --vh: 1vh;
  }
  .navbar-links.nav-open {
    right: 0;
  }
  .navbar-links .nav-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 0.5em;
    vertical-align: middle;
  }
  .navbar-toggle {
    display: block;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    background: none;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
    display: flex !important; /* Always block for animation */
  }
  .nav-dropdown.nav-open > .nav-dropdown-menu {
    margin-top: 0.5rem;
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
  }
  .nav-dropdown.nav-open > a::after {
    transform: rotate(0deg);
  }
  .sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-radius: 25px;
  }
  .sidebar-logo img {
    display: inline-block;
    width: auto;
    max-width: 60%;
    height: auto;
  }
  .navbar-brand::before {
    min-width: 35px;
    min-height: 35px;
  }
}

@media (max-width: 350px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
}

@media (max-width: 250px) {
  .navbar-links {
    width: 100%;
  }
}
