/* nav.css (from style.css L31-L319) */
/* ======================================================
   NAVBAR STYLING
====================================================== */

.nav-link-custom{
  text-decoration: none;
  color: rgba(232,247,255,.78);
  font-weight: 500;
}

.nav-link-custom:hover{
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(0,230,255,.7);
}

.nav-link-active{
  color: var(--text);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(0,230,255,.9);
}

/* Above sticky topbar (1500) and nav dropdowns (3500) */
.modal-backdrop {
  --bs-backdrop-zindex: 3990;
  z-index: 3990;
}
.modal {
  --bs-modal-zindex: 4000;
  z-index: 4000;
}

.topbar{
  background: rgba(7,10,15,.55);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1500;
}

/* Mobile: [logo + title + hamburger] | actions; row 2 = full-width nav */
.topbar-shell{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand actions"
    "nav nav";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0;
  padding-top: 1rem;
  padding-bottom: 1rem;
  position: relative;
  z-index: 1501;
  overflow: visible;
}

.topbar-brand-cluster{
  grid-area: brand;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-width: 0;
  /* Stay left in the 1fr column; donÃ¢â‚¬â„¢t stretch hamburger to the column edge */
  justify-self: start;
  width: max-content;
  max-width: 100%;
}

.topbar-brand{
  min-width: 0;
  flex: 0 1 auto;
}

.topbar-menu-toggle{
  flex-shrink: 0;
}

.topbar-brand-text{
  min-width: 0;
  font-weight: 700;
}

.topbar-actions{
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topbar-nav{
  grid-area: nav;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  width: 100%;
}

.topbar-nav.is-open{
  display: flex;
}

.topbar-nav .nav-link-custom{
  padding: 0.35rem 0;
}

.topbar-dropdown{
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.topbar-dropdown-toggle{
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none !important;
}

.topbar-dropdown-toggle:hover .topbar-dropdown-label,
.topbar-dropdown-toggle.nav-link-active .topbar-dropdown-label{
  text-decoration: underline;
  text-decoration-color: rgba(0,230,255,.9);
  text-underline-offset: 2px;
}

.topbar-dropdown-caret{
  font-size: 0.85em;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  transform-origin: 50% 50%;
  transition: transform 0.26s ease;
}

.topbar-dropdown.is-open .topbar-dropdown-caret{
  transform: rotate(-180deg);
}

.topbar-dropdown-menu{
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1220;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  padding: 0.35rem;
  z-index: 3500;
}

.topbar-dropdown.is-open .topbar-dropdown-menu{
  display: block;
}

.topbar-dropdown-item{
  display: block;
  text-decoration: none;
  color: rgba(232,247,255,.86);
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
}

.topbar-dropdown-item:hover{
  background: rgba(0,230,255,.12);
  color: var(--text);
}

.topbar-dropdown-item.is-active{
  background: rgba(0,230,255,.18);
  color: var(--text);
}

.topbar-dropdown-item--with-icon{
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar-dropdown-item-icon{
  flex-shrink: 0;
  opacity: 0.92;
  object-fit: contain;
}

/* Match Sign in (btn-sm) height; square so width scales with that height */
.topbar-menu-toggle.btn-sm{
  --topbar-sm-line: 1.5em;
  --topbar-sm-h: calc(
    2 * var(--bs-btn-padding-y-sm, 0.25rem) +
    var(--topbar-sm-line) +
    2 * var(--bs-border-width, 1px)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--topbar-sm-h);
  min-width: var(--topbar-sm-h);
  height: var(--topbar-sm-h);
  min-height: var(--topbar-sm-h);
  padding: 0;
  line-height: var(--bs-btn-line-height, 1.5);
}

.topbar-menu-icon{
  display: block;
  width: 55%;
  height: 42%;
  flex-shrink: 0;
  background-image:
    linear-gradient(rgba(232,247,255,.88), rgba(232,247,255,.88)),
    linear-gradient(rgba(232,247,255,.88), rgba(232,247,255,.88)),
    linear-gradient(rgba(232,247,255,.88), rgba(232,247,255,.88));
  background-size: 100% 18%, 100% 18%, 100% 18%;
  background-position: 0 0, 0 50%, 0 100%;
  background-repeat: no-repeat;
}

@media (min-width: 768px){
  .topbar-shell{
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav actions";
    column-gap: 1.25rem;
  }

  .topbar-nav{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
    width: auto;
  }

  .topbar-nav.is-open{
    display: flex;
  }

  .topbar-nav .nav-link-custom{
    padding: 0;
  }

  .topbar-dropdown{
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .topbar-dropdown-toggle{
    padding: 0;
  }

  .topbar-dropdown-menu{
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 15rem;
    z-index: 3500;
  }
}

.brand-mark{
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0,230,255,.35));
}


