/* Based on video at https://www.youtube.com/watch?v=8eFeIFKAKHw */

nav {
  height: clamp(1.875rem, round(1.458rem + 2.083vi, 0.05em), 3.125rem);
  background-color: var(--highlight-color-1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.links-container {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

nav a {
  height: 100%;
  padding-inline: clamp(1rem, 0.861rem + 0.444vw, 2.5rem); /* spacing before and after navbar words */
  padding-block: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  font-size: clamp(0.563rem, round(0.417rem + 0.778vi, 0.05em), 1rem);
  font-size: 1rem;
  font-weight: bold;
}

nav a:hover {
  background-color: var(--highlight-color-2);
}

nav .home-link {
  margin-right: auto;
}

nav .icon-link {
  padding-inline: 10px; /* spacing before and after navbar icons */
}

#sidebar-active {
  display: none;
}

.open-sidebar-button, .close-sidebar-button {
  display: none;
}

@media(max-width: 768px) {  /* same cutoff as Bootstrap 3 */
  .links-container{
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    right: -100%;
    z-index: 10;
    width: 200px;
    background-color: var(--panel-color);
    box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25);
    transition: 0.75s ease-out;
  }
  nav a {
    box-sizing: border-box;
    height: auto;
    width: 100%;
    padding: 10px 30px;
    justify-content: flex-start; 
  }

  nav img {
    padding-left: 20px;
    padding-top: 8px;
  }

  .open-sidebar-button, .close-sidebar-button {
    padding: 20px;
    display: block;
  }
  #sidebar-active:checked ~ .links-container {
    right: 0;
  }

  #sidebar-active:checked ~ #overlay {
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
  }
}


