header {
  grid-area: header;
  background-color: var(--color-background);
  font-family: var(--font-family-playfair);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: fixed;
  width: 100%;
  padding: 10px 0px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Eco-Life title */
#header-title {
  color: var(--color-primary);
  margin: 0px;
  text-align: center;
}

/* Menu and profile buttons */
.header-buttons {
  cursor: pointer;
  position: fixed;
  border: none;
  background-color: var(--color-background);
}
#menu-button {
  top: 8px;
  left: 10px;
}
#logo-button {
  top: 13px;
  left: 15px;
}
#profile-button {
  right: 10px;
  top: 15px;
}

/* Menu function */
#menu-toggle {
  display: none;
}
#menu {
  max-height: 0px;
  overflow: hidden;
  position: absolute;
  width: 100%;
  background-color: var(--color-background);
  text-align: center;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}
#menu a[href="profile.html"] {
  display: none;
}
#menu-toggle:checked ~ #menu-container #menu {
  max-height: 400px;
}
#menu a:link,
#menu a:visited {
  text-decoration: none;
  padding: 0px 15px;
}
.nav-page {
  color: var(--color-primary);
  display: block;
  text-align: center;
  transition: text-decoration 0.3s ease, color 0.3s ease;
}
.nav-page:hover,
.nav-page:active {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Greeting */
#greeting {
  position: fixed;
  right: 60px;
  top: 0px;
  font-size: 1.2rem;
  color: var(--color-text);
  white-space: pre;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0.5rem;
}

/* RESPONSIVE DESIGN */

/* RD: PHONE */
@media (max-width: 767px) {
  #greeting {
    display: none;
  }
}

/* RD: PHONE + TABLET */
@media (max-width: 1024px) {
  .logo-function {
    display: none;
  }
}

/* RD: COMPUTER */
@media (min-width: 1025px) {
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  /* Remove menu drop down, add menu row */
  .menu-function {
    display: none;
  }
  #menu-container,
  #menu {
    position: static;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    width: 100%;
  }
  #menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding-top: 15px;
  }
  #menu.nav-page {
    display: inline-block;
    font-size: 1.1rem;
  }
}
