/* Hero-local, nonmodal navigation; Bootstrap Collapse supplies the transition. */
.hero--has-directions {
  --psy-directions-width: min(360px, calc(100vw - 32px));
}

.hero-directions-toggle {
  position: absolute;
  z-index: 3;
  right: 0;
  left: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  padding: 22px 14px;
  border: 1px solid rgb(255 255 255 / 40%);
  border-inline-end: 0;
  border-radius: 9px 0 0 9px;
  background: var(--ed-green);
  color: white;
  box-shadow: 0 6px 24px #102b2426;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .03em;
  writing-mode: vertical-rl;
  cursor: pointer;
  transition: background-color .2s, opacity .2s;
}

.hero-directions-toggle:hover {
  background: var(--ed-green-dark);
}

.hero--directions-open .hero-directions-toggle {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.hero .hero-directions-panel {
  position: absolute;
  z-index: 4;
  inset-inline-end: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--psy-directions-width);
  max-width: calc(100% - 32px);
  height: auto;
  max-height: calc(100% - 32px);
  border-radius: 10px;
  box-shadow: 0 12px 38px #102b242b;
}

.hero-directions-panel__inner {
  width: var(--psy-directions-width);
  max-height: min(520px, calc(100svh - 120px));
  padding: 26px;
  border: 1px solid #dce3d8;
  border-radius: 10px;
  background: #f8f7f2;
  overflow-y: auto;
  overscroll-behavior: auto;
}

.hero-directions-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-directions-panel__header h2 {
  margin: 0;
  font-family: var(--ed-serif);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--ed-ink);
}

.hero-directions-close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d4dfd5;
  border-radius: 50%;
  background: transparent;
  color: var(--ed-green);
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.hero-directions-close:hover {
  background: #e7eee5;
}

.hero-directions-panel .hero-topics {
  display: block;
  position: static;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ed-green-dark);
  font-size: 15px;
  line-height: 1.4;
}

.hero-directions-panel .hero-topics li {
  margin: 0;
  border-top: 1px solid #dce3d8;
}

.hero-directions-panel .hero-topics li:before {
  content: none;
}

.hero-directions-panel .hero-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 13px 8px;
  color: var(--ed-green-dark);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
}

.hero-directions-panel .hero-topics a:after {
  content: '→';
  padding-inline-start: 12px;
  font-size: 19px;
}

.hero-directions-panel .hero-topics a:hover {
  background: #e7eee5;
  text-decoration: none;
}

.hero-directions-toggle:focus-visible,
.hero-directions-close:focus-visible,
.hero-directions-panel a:focus-visible {
  outline: 3px solid #b8873a;
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .hero-directions-toggle {
    top: auto;
    bottom: 24px;
    left: 22px;
    right: auto;
    transform: none;
    writing-mode: horizontal-tb;
    padding: 12px 18px;
    border: 1px solid #b9cbbd;
    border-radius: 6px;
    background: #f8f7f2;
    color: var(--ed-green-dark);
    letter-spacing: 0;
  }

  .hero-directions-toggle:hover {
    background: #e7eee5;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hero--has-directions .hero-content {
    padding-bottom: 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-directions-panel.collapsing,
  .hero-directions-toggle {
    transition: none;
  }
}
