.gradient-red {
  background: linear-gradient(90deg, #ff7b00, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

@property --scrolled {
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1035;
  width: calc(100% - 1.5rem);
  max-width: 1850px;
  margin: 0 auto;
  padding-inline: 1rem;
  background: transparent;
  overflow: visible;
  animation: navbar-float linear both;
  animation-timeline: scroll();
  animation-range: 0 150px;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 15px;
  background: #111114af;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #272727ad;
  box-shadow: none;
  opacity: 0;
  border-color: rgba(39, 39, 39, 0);
  animation: navbar-bg linear both;
  animation-timeline: scroll();
  animation-range: 0 150px;
}

/* CORREGIDO: se quitó .dropdown-menu de esta regla.
   Con position: relative el menú ocupaba espacio y estiraba el navbar. */

.navbar-brand, .navbar-nav, .navbar-collapse, .dropdown {
  position: relative;
  z-index: 1;
}

.navbar-brand img {
  display: block;
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.navbar-brand, .navbar .order-lg-2 {
  transition: filter .45s cubic-bezier(.32, .72, 0, 1), opacity .45s cubic-bezier(.32, .72, 0, 1);
}

@media (max-width: 991.98px) {
  .navbar:has(#navbar-contend.show:not(.hiding)) .navbar-brand, .navbar:has(#navbar-contend.show:not(.hiding)) .order-lg-2, .navbar:has(#navbar-contend.showing) .navbar-brand, .navbar:has(#navbar-contend.showing) .order-lg-2 {
    filter: blur(8px);
    opacity: .6;
    pointer-events: none;
  }
}

@keyframes navbar-float {
  from {
    max-width: 1850px;
    margin-top: 0;
    --scrolled: 0;
  }
  to {
    max-width: 1200px;
    margin-top: 12px;
    --scrolled: 1;
  }
}

@keyframes navbar-bg {
  from {
    opacity: 0;
    border-color: rgba(39, 39, 39, 0);
    box-shadow: none;
  }
  to {
    opacity: 1;
    border-color: #272727ad;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .2), 0 20px 40px -12px rgba(0, 0, 0, .35), 0 8px 16px -8px rgba(0, 0, 0, .2);
  }
}

.navbar .navbar-nav {
  gap: 0.5rem;
}

.navbar .nav-link {
  position: relative;
  padding: 0.3rem 1.2rem;
  margin: 0 0.35rem;
  min-width: 100px;
  text-align: center;
  border-radius: 15px;
  background: transparent;
  border: 1px solid rgba(131, 131, 131, 0);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.navbar .nav-link:hover, .navbar .nav-link.show {
  background: #35353563;
  border-color: rgba(131, 131, 131, 0.18);
}

/* ========== DROPDOWN / MEGAMENÚ ========== */

/* Solo estilo visual + position: absolute.
   No se fuerza top/left/right, así que dropdown-menu-start,
   dropdown-menu-end y el comportamiento por defecto siguen funcionando. */

.navbar .dropdown-menu {
  --liquid-gradient-opacity: 0.25;
  --liquid-gradient: linear-gradient(180deg, rgba(255, 255, 255, calc(0.15 * var(--liquid-gradient-opacity))), rgba(255, 255, 255, 0));
  position: absolute;
  z-index: 1040;
  border-radius: var(--bs-card-border-radius, var(--bs-border-radius));
  background-color: #0B0B0D;
  border: 1px solid #19191B;
  box-shadow: var(--liquid-shine, inset 0 0 0 rgba(255, 255, 255, 0)), var(--liquid-drop, 0 10px 30px rgba(0, 0, 0, 0.5));
  margin-top: 0.5rem;
}

.navbar .dropdown-menu > * {
  position: relative;
  z-index: 1;
}

/* El toggle de ese dropdown ya no se ve como enlace azul subrayado */

.navbar .order-lg-2 .dropdown-toggle {
  color: inherit;
  text-decoration: none;
}

.navbar .dropdown {
  position: relative;
}

@media (max-width: 991.98px) {
  #navbar-contend {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: 80vh;
    max-height: calc(100% - 24px);
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    overflow: hidden;
    transform: translateY(calc(100% + 24px));
    transition: transform .45s cubic-bezier(.32, .72, 0, 1);
  }
}

@media (max-width: 991.98px) {
  #navbar-contend.show:not(.hiding), #navbar-contend.showing {
    transform: none;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .offcanvas-header {
    border-bottom: 0;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .offcanvas-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .navbar-nav {
    width: 100%;
    margin: 0 !important;
    align-items: stretch;
    text-align: left;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .nav-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .nav-link {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    margin: 0;
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .dropdown-menu {
    width: 100%;
    text-align: left;
    position: static !important;
    transform: none !important;
    box-shadow: none;
    background: transparent;
    border: none;
  }
}

@media (max-width: 991.98px) {
  #navbar-contend .dropdown-item {
    justify-content: flex-start;
    text-align: left;
  }
}

.offcanvas-backdrop.fade {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background-color .45s cubic-bezier(.32, .72, 0, 1), backdrop-filter .45s cubic-bezier(.32, .72, 0, 1), -webkit-backdrop-filter .45s cubic-bezier(.32, .72, 0, 1);
}

.offcanvas-backdrop.show {
  opacity: 1;
  background-color: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#navbar-contend .btn-close {
  width: 28px;
  height: 28px;
  padding: 0;
  opacity: 1;
  border: 0;
  border-radius: 8px;
  filter: none;
  background: #6f6f73 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'><path d='M3.5 3.5l9 9M12.5 3.5l-9 9'/></svg>") center / 12px no-repeat;
  transition: background-color .2s ease, transform .2s ease;
}

#navbar-contend .btn-close:hover {
  background-color: #8a8a8f;
  transform: scale(1.05);
}

#navbar-contend .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .15);
}
