/* Shared navigation within the Resources library */
.resource-library-nav {
  position: fixed;
  top: 82px;
  left: 0;
  right: 0;
  z-index: 40;
  background: hsla(32, 20%, 97%, 0.98);
  border-bottom: 1px solid hsl(32, 15%, 88%);
  box-shadow: 0 8px 18px -18px hsla(30, 8%, 15%, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.resource-library-main {
  padding-top: 56px;
}

.resource-library-nav-inner {
  position: relative;
  max-width: 80rem;
  min-height: 56px;
  margin: 0 auto;
  padding: 0 1rem;
}

.resource-library-nav-desktop {
  display: none;
  min-height: 56px;
  align-items: stretch;
  justify-content: center;
}

.resource-library-link {
  position: relative;
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.4rem;
  color: hsl(30, 8%, 40%);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.resource-library-link:hover,
.resource-library-link:focus-visible {
  color: hsl(210, 50%, 28%);
  background: hsla(32, 20%, 94%, 0.7);
}

.resource-library-link[aria-current="page"] {
  color: hsl(210, 50%, 28%);
}

.resource-library-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0;
  height: 2px;
  background: hsl(35, 50%, 62%);
}

.resource-library-nav-mobile {
  display: block;
  min-height: 56px;
}

.resource-library-current {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border: 0;
  background: transparent;
  color: hsl(210, 50%, 28%);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.resource-library-current svg {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  transition: transform 0.2s ease;
}

.resource-library-current[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.resource-library-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0.75rem;
  right: 0.75rem;
  max-height: calc(100vh - 138px);
  overflow-y: auto;
  padding: 0.35rem 0;
  background: hsl(32, 20%, 97%);
  border: 1px solid hsl(32, 15%, 88%);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 14px 28px -18px hsla(30, 8%, 15%, 0.35);
  -webkit-overflow-scrolling: touch;
}

.resource-library-mobile-menu[hidden] {
  display: none;
}

.resource-library-mobile-menu .resource-library-link {
  display: flex;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-size: 0.8125rem;
  text-align: left;
  white-space: normal;
}

.resource-library-mobile-menu .resource-library-link[aria-current="page"] {
  background: hsl(32, 20%, 94%);
}

.resource-library-mobile-menu .resource-library-link[aria-current="page"]::after {
  display: none;
}

@media (min-width: 1024px) {
  .resource-library-nav-inner {
    padding: 0 1.5rem;
  }

  .resource-library-nav-desktop {
    display: flex;
  }

  .resource-library-nav-mobile {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-library-current svg {
    transition: none;
  }
}
