.ntc-header__layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  position: relative;
}

.ntc-header__brand {
  justify-self: start;
}

.ntc-header__nav {
  justify-self: end;
}

.ntc-header__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ntc-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 0 8px;
  border-bottom: 2px solid transparent;
  color: hsl(var(--foreground-dark));
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease;
}

.ntc-header__nav-link:hover {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

.ntc-header__nav-link:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 4px;
}

.ntc-header__contacts {
  justify-self: end;
  flex-direction: row;
  gap: 24px;
}

.ntc-header__contacts > a {
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .ntc-header__layout {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 8px;
  }

  .ntc-header__nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ntc-header__contacts {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 767px) {
  .ntc-header__layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .ntc-header__brand {
    justify-self: center;
  }

  .ntc-header__nav {
    grid-column: 1;
  }

  .ntc-header__menu {
    gap: 28px;
  }

  .ntc-header__contacts {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    max-width: 100%;
  }

  .ntc-header__social {
    position: absolute;
    top: -2px;
    right: 0;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ntc-header__nav-link {
    transition: none;
  }
}
