header {
    width: 100%;
}

header nav {
    display: none;
    width: 100%;
    padding: 0 1.4rem;
    background-color: var(--bg-color);
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    z-index: 99;
    transform: translateY(0);
    transition: bottom 2s ease, transform 1s ease;
}

header nav.active {
    bottom: 0;
}

/* Add this if we need scrolling effect to disappear
header nav.scroll {
    transform: translateY(100%);
}
*/ 

header nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.1rem;
    width: 4rem;
    height: 3rem;
    color: #000;
}

header nav a i {
    font-size: 1.2rem;
}

header nav a span {
    font-size: 0.6rem;
}

header nav a:hover {
    background-color: #000;
    color: #fff;
}


/* Header (optimized) */
header {
  width: 100%;
}

/* Bottom mobile navigation */
header nav {
  display: none;
  width: 100%;
  padding: 0 1.4rem;
  background: var(--bg-color);
  position: fixed;
  inset-inline: 0;
  bottom: -100%;
  z-index: 99;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition: bottom 0.5s ease;
}

/* Visible state */
header nav.active {
  bottom: 0;
}

/* Nav links */
header nav a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: center;
  justify-content: center;

  width: 4rem;
  height: 3rem;

  color: #000;
  font-size: 0.75rem;
  text-decoration: none;
}

header nav a i {
  font-size: 1.2rem;
}

/* Hover effect */
header nav a:hover {
  background: #000;
  color: #fff;
}
