/* Header */


/* Sticky on all screens. Above the Directory's Google map, below the share
   and diary popovers (z-index 9999). */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  color: var(--dark-grey);
}


/* Menu - logo at the left, icon links centred on the page, People and Parks
   logo at the right. 90px tall, as on the People and Parks site. The outer
   columns are equal, so the links stay centred whatever the logo widths. */

.menu {
  width: 100%;
  position: relative;
}

.menu .menu_cont {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  min-height: 90px;
}

/* Phones - two rows: both logos on top, the icon links full width below */
@media (max-width: 640px) {
  .menu .menu_cont {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 70px auto;
    min-height: 0;
  }

  /* only the links stick - the header sticks with the 70px logo row above
     the top of the screen */
  .header {
    top: -70px;
  }

  .menu .menu_cont .logo_box {
    grid-row: 1;
    grid-column: 1;
  }

  .menu .menu_cont .pp_logo {
    grid-row: 1;
    grid-column: 2;
  }

  .menu .links {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 0;
  }

  /* equal widths, like an app tab bar */
  .menu .links .link {
    flex: 1 1 0;
    min-width: 0;
  }
}


/* Nature Dose logo - text placeholder until the new logo is designed */

.menu .logo_box {
  justify-self: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px 0 30px;
  color: var(--dark-grey);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.menu .logo_box span:last-child {
  font-size: 20px;
  color: var(--mid-green);
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 1500px) {
  .menu .logo_box {
    padding-left: 14px;
  }
}

@media (max-width: 900px) {
  .menu .logo_box,
  .menu .logo_box span:last-child {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .menu .logo_box {
    padding: 0 10px;
  }
}


/* People and Parks logo - top right, 120px wide on all screens. */

.menu .pp_logo {
  justify-self: end;
  display: flex;
  align-items: center;
  padding: 0 30px 0 14px;
}

.menu .pp_logo img {
  display: block;
  width: 120px;
  height: auto;
}

@media (max-width: 760px) {
  .menu .pp_logo img {
    width: 100px;
  }
}

@media (max-width: 1500px) {
  .menu .pp_logo {
    padding-right: 14px;
  }
}

@media (max-width: 640px) {
  .menu .pp_logo {
    padding: 0 10px;
  }
}


/* Icon links - icon with a small label underneath */

.menu .links {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0 20px;
}

.menu .links .link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 70px;
  padding: 8px 10px;
  box-sizing: border-box;
  color: var(--bright-blue);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.menu .links .link .icon {
  display: block;
  width: 24px;
  height: 24px;
}

.menu .links .link .icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.menu .links .link.active {
  color: var(--white);
  background: var(--bright-blue);
}

.menu .links .link:focus-visible {
  outline: 2px solid var(--dark-grey);
  outline-offset: -2px;
}

@media (max-width: 760px) {
  .menu .links {
    gap: 0 6px;
  }

  .menu .links .link {
    min-width: 0;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .menu .links {
    justify-content: space-evenly;
    gap: 0;
  }

  .menu .links .link {
    font-size: 11px;
    padding: 8px 4px;
  }

  .menu .links .link .icon {
    width: 22px;
    height: 22px;
  }
}



/* Phones - a shorter logo row on a very pale green, so the two logos read as
   a band of their own above the white tab bar. */
@media (max-width: 640px) {
  .header {
    top: -56px; /* the logo row scrolls away, the tab bar sticks */
  }

  .menu .menu_cont {
    grid-template-rows: 56px auto;
  }

  .menu .menu_cont .logo_box,
  .menu .menu_cont .pp_logo {
    justify-self: stretch;
    background: var(--palest-green);
  }

  .menu .menu_cont .pp_logo {
    justify-content: flex-end;
  }

  .menu .logo_box,
  .menu .logo_box span:last-child {
    font-size: 15px;
  }

  .menu .pp_logo img {
    width: 80px;
  }
}
