/* Contenedor principal */
.topbar {

  --nav-height: 78px;
  --topbar-bg: #1f1414;
  --topbar-current-height: var(--nav-height);
  --topbar-nav-link-size: 0.88rem;
  --topbar-burger-menu-link-size: 1.2rem;

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: var(--topbar-bg);
}

/* Contenedor interno centrado */
.topbar-inner {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-branding {
  flex: 0 0 auto;
  min-width: 0;

  display: flex;
  align-items: center;
}

/* Logo */
.topbar-logo-ants img {
  height: 48px;
  width: auto;
  display: block;
  justify-content: flex-start;
  transition: transform 0.25s ease;
}

.topbar-logo-ants:hover img {
  transform: scale(1.05);
}

.topbar-menu-toggle {
  display: none;
}

/* Logo */
.topbar-logo-umu img {
  height: 55px;
  width: auto;
  display: block;

  transition: transform 0.25s ease;
}

.topbar-logo-umu:hover img {
  transform: scale(1.05);
}

.topbar-logo-umu {
  margin-left: 0;
}

.topbar-actions {
  min-width: 0;
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: 3rem;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.topbar-nav-link {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading, "Space Grotesk", sans-serif);
  font-size: var(--topbar-nav-link-size);
  font-weight: 500;
  text-transform: lowercase;
  transition: opacity 0.15s ease;
}

.topbar-nav-link:hover {
  opacity: 0.82;
}
/* =========================
   Header dropdown menu
   ========================= */

.topbar-nav-item {
  position: relative;
}

.topbar-submenu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  min-width: 180px;
  padding: 0.65rem;

  background: #1f1414;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);

  display: grid;
  gap: 0.25rem;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;

  z-index: 50;
}

.topbar-submenu::before {
  content: "";
  position: absolute;

  left: 0;
  right: 0;
  top: -0.75rem;
  height: 0.75rem;
}

.topbar-nav-item:hover .topbar-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.topbar-submenu-link {
  display: block;
  padding: 0.55rem 0.7rem;

  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading, "Space Grotesk", sans-serif);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 8px;

  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.topbar-submenu-link:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

@media (max-width: 1180px) {
  .topbar-inner {
    gap: 1rem;
  }

  .topbar-nav {
    gap: 0.65rem;
  }

}

@media (max-width: 980px) {
  body.site-menu-open {
    overflow: hidden;
  }

  body.site-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(31, 20, 20, 0.97);
    pointer-events: auto;
  }

  .topbar {
    position: relative;
    top: auto;
  }

  body.site-menu-open .topbar {
    z-index: 1000;
  }

  .topbar-inner {
    min-height: 68px;
    height: auto;
    padding: 0.65rem 1rem;
    gap: 0.8rem;
  }

  body.site-menu-open .topbar-inner {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .topbar-branding {
    flex: 1 1 auto;
    gap: 0;
  }

  .topbar-actions {
    min-width: 0;
    margin-left: 0;
    display: block;
  }

  .topbar-logo-ants {
    margin-right: 0;
    width: auto;
  }

  .topbar-logo-umu {
    display: none;
  }

  .topbar-menu-toggle {
    order: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
  }

  .topbar-menu-toggle__bar {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .topbar-menu-toggle.is-open .topbar-menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .topbar-menu-toggle.is-open .topbar-menu-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .topbar-menu-toggle.is-open .topbar-menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .topbar-nav {
    position: fixed;
    top: var(--topbar-current-height);
    right: 0;
    left: 0;
    bottom: auto;
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0.55rem 1rem 0.9rem;
    background: rgba(31, 20, 20, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-current-height));
  }

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

  body.site-menu-open .topbar-nav.is-open {
    position: fixed;
    inset: var(--topbar-current-height) 0 auto 0;
    z-index: 1001;
    width: 100%;
    max-height: calc(100vh - var(--topbar-current-height));
    padding: 0.55rem 1rem 0.9rem;
    box-sizing: border-box;
    background: transparent;
    border-top: 0;
  }

  .topbar-nav-item {
    width: 100%;
  }

  .topbar-nav-link {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-size: var(--topbar-burger-menu-link-size);
    line-height: 1.3;
  }


  .topbar-submenu {
    display: none;
  }

  .topbar-submenu::before {
    content: none;
  }

}


@media (max-width: 640px) {
    /* Logo */
  .topbar-logo-ants img {
    height: 34px;
    width: auto;
  }

  .topbar-inner {
    min-height: 62px;
  }


}
