.navbar {
  z-index: 1035;
  background: transparent;
  border-bottom: 1px solid transparent;
  overflow: visible;
  isolation: isolate;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #2c2c2c;
  background: var(--bs-dark);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
  pointer-events: none;
}

.navbar:has( + *:not(:first-child))::before {
  animation: navbar-fade-in 0.2s linear both;
  animation-timeline: scroll();
  animation-range: 0 150px;
}

@keyframes navbar-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.navbar .container, .navbar .navbar-brand, .navbar .nav-link, .navbar .navbar-toggler {
  z-index: 1036;
}

.navbar .nav-link {
  padding: 0.6rem 1.4rem;
  margin: 0 0.35rem;
  border-top-left-radius: 15px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 0px;
  min-width: 100px;
  text-align: center;
  background: transparent;
  /*IMPORTANTE: el borde siempre existe para evitar parpadeo;*/
  border: 1px solid rgba(131, 131, 131, 0);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  position: relative;
}

.navbar .nav-link:hover, .navbar .nav-link.show {
  background: rgba(85, 85, 85, 0.06);
  border-color: rgba(131, 131, 131, 0.18);
  border-top-left-radius: 15px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 0px;
}

/* Dropdown */

.dropdown-menu {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(20, 27, 77, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top-left-radius: 35px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 35px;
  border-bottom-left-radius: 0px;
  overflow: hidden;
  padding: .5rem;
  margin-top: 0px;
  animation: fadeSlideIn .25s ease;
}

/* Animation */

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Arrow */

.dropdown-toggle::after {
  transition: transform .25s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.dropdown-item {
  color: #fff;
  padding: .8rem 1rem;
  transition: background .2s ease, color .2s ease;
  font-weight: 500;
  border-top-left-radius: 15px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 0px;
}

.dropdown-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-top-left-radius: 15px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 0px;
}

.dropdown-item:active {
  background: rgba(89,200,255,.15);
  color: #fff;
}

/* Divider */

.dropdown-divider {
  border-color: rgba(255,255,255,.08);
}

/* Offcanvas backdrop */

.offcanvas-backdrop {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#navbar-contend {
  transform: translateY(100%);
  transition: transform .3s ease !important;
}

/* cuando abre */

#navbar-contend.show, #navbar-contend.showing {
  transform: translateY(0);
}

/* cuando cierra */

#navbar-contend.hiding {
  transform: translateY(100%);
}

/* quitar animación default de bootstrap solo aquí */

#navbar-contend.offcanvas-bottom {
  top: auto;
  bottom: 0;
}

/* Separación entre links en móvil */

@media (max-width: 991.98px) {
  .navbar-nav .nav-item:not(:last-child) {
    margin-bottom: 12px;
  }
}

@media (max-width: 991.98px) {
  .navbar .nav-link {
    padding: 0.8rem 1.4rem;
  }
}

