If the state of an element changes, you can smoothly transition in between the states.
button:hover {
background-color: #00162d;
color: white;
border: black solid 3px;
transition: all 500ms ease-in-out;
}