:root {
  --border: 1px solid var(--psc-dark-teal);
  --menu-border: 1px dashed var(--psc-dark-teal);
  --shadow: var(--psc-dark-teal) 0px 6px 24px 0px, var(--psc-dark-teal) 0px 0px 0px 1px;
}

/* top nav at top, side nav below */


.primary-header__layout {
  display: flex;
  flex-direction: column;
}

.site-id {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 1.5rem;
  margin: 2rem 1.5rem;
}

.logo {
  height: clamp(var(--logo), 56px, 100%);
  border-right: 2px solid var(--white);
  padding-right: 1.5rem;
}

.logo img {
  min-height: 3.5rem;
  max-width: clamp(15rem, 100%, 300px);
}

.site {
  height: var(--site);
  display: flex;
  align-items: center;
}

.site h2 {
  font-size: 1.25rem; 
  line-height: 120%;
  margin: 0rem;
  color: var(--white);
}

@media (max-width: 62em) {
  .site h2 {
    font-size: 1rem; 
    line-height: 150%;
  }

}
.nav-container {
  display: flex;
    height: 0;
    align-items: flex-end;
    width: 100%;
    justify-content: flex-end;
}

.nav-container ul {
  list-style: none;
  background: var(--white);
  border-radius: var(--corners) var(--corners) 0 0;
  width: inherit;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.nav-container a {
  text-decoration: none;
  color: inherit;
}

.nav-container button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  color: inherit;
}

.btn {
  display: block;
  background-color: var(--psc-dark-teal);
  color: var(--white);
  text-align: center;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 5px;
}

.menu-bar {
  display: flex;
  justify-items: end;
  position: relative;
  z-index: 999;
  width: min(32rem, 100%);
  margin: 0 0.25rem;
}

#nav-menu {
  border-bottom: var(--border);
  grid-area: header;
}

.menu {
  display: flex;
  align-items: center;
  grid-area: menu;
}

#hamburger, .menu {
  border: 1px solid var(--psc-dark-teal);
  border-bottom: none;
}

.top-menu {
  flex: 1;
  width: 100%;
  margin: 0.25rem;
}

.top-menu:last-of-type {
  border-left: 1px solid var(--psc-dark-teal);
}

.top-menu ul:nth-child(1) {
  border-right: var(--menu-border);
}

.dropdown {
  display: flex;
  width: clamp(15rem, min(55rem, 65dvw), 90dvw);
  background-color: var(--white);
  border-radius: var(--corners);
  position: absolute;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.97) translateX(-10px);
  transition: 0.2s ease-in-out;
  box-shadow: var(--shadow);
  right: min(.25rem, 0.5dvw);
  align-items: flex-start;
}

.dropdown.active {
  visibility: visible;
  opacity: 1;
  transform: scale(1) translateX(0);
  flex-direction: initial;
  z-index: 9999;
}

.dropdown ul {
  display: flex;
  flex-direction: column;
  flex: 1 1 50%;
  margin: 0.5rem;
  padding: 0.5rem;
  font-size: 0.95rem;
}

.dropdown-icon {
  height: 35px;
  width: 23px;
  margin-block: 0.5rem;
}

.dropdown ul p {
  margin-top: 0.75rem;
  margin-top: min(1dvh, 0.75rem);
}

.menu .dropdown-section-title {
  font-size: 1.1rem;
  font-weight: 600;  
}

.menu .dropdown-link {
  display: flex;
  gap: 0.5rem;
  border-radius: 7px;
  transition: 0.1s ease-in-out;
  align-items: center;
}

.menu .dropdown-section-title, .menu .dropdown-link span {
  color: var(--psc-mid-grey);
  letter-spacing: -0.75px;
}

.menu .dropdown-link-title {
  font-weight: 500;
  display: block;
}

.menu .dropdown-link-desc {
  font-size: 0.9rem;
}

.menu .nav-link {
  font-size: calc(.85rem + 0.15vmax);
  letter-spacing: -0.6px;
  width: 100%;
}

.menu .nav-link:hover,
.dropdown-link:hover {
  color: var(--psc-dark-teal);
}

.dropdown li[role="menuitem"] {
  margin-block: 0.15rem
}

.dropdown-btn {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.dropdown-btn .arrow {
  --btn: 2rem;
  flex: 0 0 var(--btn);
  height: var(--btn);
  transform: rotate(0deg);
  --svg: url(/_assets/svg/down-arrow.svg);
  border: 1px transparent solid;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  background-color: var(--primary-color);
  mask: var(--svg);
  border-radius: 100%;
}

.arrow.flip {  
  transform: rotate(180deg);
}

#hamburger {
  display: none;
}

@media (max-width: 62em) {

  .site-id {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1rem 1.5rem;   
  }

  .logo {
    border-right: none;
    padding-right: 0;
  }

  .logo img {
    min-height: 2.8rem;
  }

  .site h2 {
    font-size: calc(var(--base) + 0.5dvw);
    margin: 0;
    z-index: 9999;
  }

  .nav-container {
    --hamburger: min(15dvw,3rem);
    justify-content: center;
    height: 0;
    width: 100%;
}

.menu-bar {
  flex-direction: column;
  height: var(--hamburger);
  width: 100%;
  }

  #hamburger {
    display: flex;
    width: var(--hamburger);
    height: var(--hamburger);
    margin-left: auto;
    background: var(--white);
    border-radius: var(--corners) var(--corners) 0 0;
  }

  #hamburger svg.hb {
    width: var(--hamburger);
    height: var(--hamburger);
    stroke: var(--psc-dark-teal);
  }

  .menu {
    display: none;
    width: 100%;
    padding: 1rem;
  }

  .top-menu:last-of-type {
    border-left: none;
  }
  
 .top-menu:last-of-type {
    border-left: none;
  }

  .top-menu ul:nth-child(1) {
    border-right: none;
    border-bottom: var(--menu-border);
  }


.top-menu {
    margin: .25rem 0;
}

.top-menu [aria-expanded="true"] .label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--psc-dark-teal);
}

.dropdown {
    display: none;
    border: none;
    border-radius: 5px;
    position: relative;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }

  .menu.show,
  .dropdown.active {
    display: flex;
    flex-direction: column;
    transform: none;
  }

  .menu.show {
    padding: 1rem;
    box-shadow: 0 var(--shadow) var(--shadow) var(--shadow) var(--psc-dark-teal-25pc);
    border-radius: 0 0 var(--corners) var(--corners);
    --shadow: 0.5rem;
    border: 1px solid var(--psc-dark-teal);
    border-top: none;
   }
 
  .menu .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    /* font-weight: 600; */
    font-size: calc(0.9rem + 0.2vmax);
    margin: 0;
    color: var(--psc-mid-grey);
  }

  .menu li:first-child .dropdown {
    min-width: 100%;
  }

  .menu > li:not(:last-child) {
    padding-bottom: 1rem;
    border-bottom: var(--border);
  }
  
  .dropdown ul {
    padding: 0.5rem;
    width: 100%;
    margin: 0.5rem;
  }
}