@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

.navbar {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 66px;
  margin: 15px 20px;
  padding: 10px 128px;
  overflow: hidden;
  color: var(--site-text, #fff);
  background: var(--site-surface-2, #5e7594);
  border: 1px solid var(--site-border, #353d49);
  border-radius: var(--site-radius-md, 14px);
  box-shadow:
    0 10px 28px var(--site-shadow, rgba(0, 0, 0, 0.24)),
    inset 0 1px 0 color-mix(in srgb, var(--site-text, #fff) 12%, transparent);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 100;
}

.navbar a {
  color: var(--site-text, #fff);
  font-family: "Roboto", serif;
  text-decoration: none;
}

.navbar a:not(:first-child) {
  padding: 10px 13px;
  border-radius: var(--site-radius-sm, 10px);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.navbar a:not(:first-child):hover {
  color: var(--site-accent-text, #484c51);
  background: var(--site-accent-hover, #e7928f);
  transform: scale(1.05);
}

.navbar a:first-child {
  position: absolute;
  left: 10px;
  max-width: min(24vw, 320px);
  padding: 10px 14px;
  overflow: hidden;
  border-radius: var(--site-radius-sm, 10px);
  font-size: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  transform-origin: left center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
  white-space: nowrap;
}

.navbar a:first-child:hover {
  color: var(--site-accent-text, #484c51);
  background: var(--site-accent-hover, #e7928f);
  transform: translateX(10px) scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .navbar a:first-child,
  .navbar a:not(:first-child) {
    transition:
      background-color 0.15s ease,
      color 0.15s ease;
  }

  .navbar a:first-child:hover,
  .navbar a:not(:first-child):hover {
    transform: none;
  }
}

.navbar a:nth-last-child(2),
.navbar a:last-child {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  padding: 0;
  place-items: center;
}

.navbar a:nth-last-child(2) {
  right: 58px;
}

.navbar a:last-child {
  right: 10px;
}

@media only screen and (max-width: 860px) {
  .navbar {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    min-height: auto;
    padding: 10px;
  }

  .navbar a:first-child,
  .navbar a:nth-last-child(2),
  .navbar a:last-child {
    position: static;
    width: auto;
    height: auto;
    max-width: none;
    padding: 10px 12px;
  }

  .navbar a:first-child {
    flex-basis: 100%;
    font-size: 19px;
  }

  .navbar a:not(:first-child) {
    font-size: 13px;
  }
}
