#ahep-events-directory {
  background: #fff9f2;
  color: #14293a;
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  width: 100%;
}

#ahep-events-directory *,
#ahep-events-directory *::before,
#ahep-events-directory *::after {
  box-sizing: border-box;
}

#ahep-events-directory .ahep-dir__wrap {
  width: min(100% - 48px, 1160px);
  margin-inline: auto;
}

#ahep-events-directory .ahep-dir__hero {
  min-height: 400px;
  background-color: #005c54;
  background-position: center 57%;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  display: flex;
  align-items: center;
}

#ahep-events-directory .ahep-dir__hero-inner {
  padding-block: 72px;
  animation: ahep-dir-enter 550ms ease-out both;
}

#ahep-events-directory .ahep-dir__eyebrow,
#ahep-events-directory .ahep-dir__section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: inherit;
  margin: 0 0 12px;
}

#ahep-events-directory .ahep-dir__eyebrow::before,
#ahep-events-directory .ahep-dir__section-kicker::before {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  background: #f0b54d;
}

#ahep-events-directory h1,
#ahep-events-directory h2,
#ahep-events-directory h3 {
  font-family: jubilat, Georgia, serif;
  letter-spacing: 0;
  color: inherit;
}

#ahep-events-directory h1 {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 400;
  margin: 0 0 16px;
  max-width: 680px;
}

#ahep-events-directory .ahep-dir__lead {
  color: #fff;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  max-width: 700px;
  margin: 0;
}

#ahep-events-directory .ahep-dir__programme {
  background: #fff;
  padding-block: 48px 40px;
  border-bottom: 1px solid #cdd6d4;
}

#ahep-events-directory .ahep-dir__programme h2 {
  font: 400 26px/1.25 jubilat, Georgia, serif;
  max-width: 720px;
  margin: 0 0 30px;
}

#ahep-events-directory .ahep-dir__programme-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

#ahep-events-directory .ahep-dir__programme-filter {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 124px;
  padding: 18px 18px 17px;
  border: 0;
  border-top: 4px solid #efa947;
  background: #f7f5f1;
  color: #14293a;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

#ahep-events-directory .ahep-dir__programme-filter--support {
  border-top-color: #457dbf;
}

#ahep-events-directory .ahep-dir__programme-filter--connect {
  border-top-color: #f59797;
}

#ahep-events-directory .ahep-dir__programme-filter:hover,
#ahep-events-directory .ahep-dir__programme-filter.is-active {
  background: #e6f1ef;
  transform: translateY(-2px);
}

#ahep-events-directory .ahep-dir__programme-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #005c54;
  font: 600 24px/1.2 jubilat, Georgia, serif;
}

#ahep-events-directory .ahep-dir__programme-name i {
  font-size: 16px;
}

#ahep-events-directory .ahep-dir__programme-description {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}

#ahep-events-directory .ahep-dir__programme-note {
  color: #3e4c55;
  font-size: 15px;
  margin: 22px 0 0;
}

#ahep-events-directory .ahep-dir__content {
  padding-block: 58px 100px;
}

#ahep-events-directory .ahep-dir__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#ahep-events-directory .ahep-dir__section-kicker {
  color: #005c54;
  margin: 0;
}

#ahep-events-directory h2 {
  font-size: clamp(35px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 400;
  margin: 0;
}

#ahep-events-directory .ahep-dir__count {
  color: #5b6670;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  margin: 0 0 4px;
}

#ahep-events-directory .ahep-dir__controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #cdd6d4;
  margin-bottom: 0;
}

#ahep-events-directory .ahep-dir__event-group {
  padding-block: 54px 10px;
  border-bottom: 1px solid #cdd6d4;
}

#ahep-events-directory .ahep-dir__event-group[hidden],
#ahep-events-directory .ahep-dir__group-empty[hidden] {
  display: none !important;
}

#ahep-events-directory .ahep-dir__group-intro {
  max-width: 860px;
  margin-bottom: 22px;
}

#ahep-events-directory .ahep-dir__group-tag {
  color: #005c54;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 8px;
}

#ahep-events-directory .ahep-dir__group-tag--support {
  color: #356fac;
}

#ahep-events-directory .ahep-dir__group-tag--connect {
  color: #b95662;
}

#ahep-events-directory .ahep-dir__group-intro h2 {
  font-size: clamp(31px, 3.4vw, 42px);
  line-height: 1.15;
  margin: 0 0 16px;
}

#ahep-events-directory .ahep-dir__group-intro > p:last-child {
  color: #3e4c55;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

#ahep-events-directory .ahep-dir__group-empty {
  color: #66727a;
  font-size: 14px;
  padding: 4px 0 32px;
  margin: 0;
}

#ahep-events-directory .ahep-dir__filters {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

#ahep-events-directory .ahep-dir__filter {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #455562;
  font: 600 14px/1.2 Montserrat, sans-serif;
  min-height: 50px;
  padding: 13px 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

#ahep-events-directory .ahep-dir__filter:hover,
#ahep-events-directory .ahep-dir__filter.is-active {
  color: #005c54;
  border-bottom-color: #005c54;
}

#ahep-events-directory .ahep-dir__filter--support.is-active {
  border-bottom-color: #457dbf;
}

#ahep-events-directory .ahep-dir__filter--connect.is-active {
  border-bottom-color: #f59797;
}

#ahep-events-directory .ahep-dir__search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(100%, 260px);
  height: 40px;
  border: 1px solid #9db9b5;
  background: #fff;
  border-radius: 4px;
  padding-inline: 12px;
  margin-bottom: 8px;
  color: #005c54;
}

#ahep-events-directory .ahep-dir__search:focus-within {
  border-color: #005c54;
  box-shadow: 0 0 0 2px #005c5433;
}

#ahep-events-directory .ahep-dir__search input {
  all: unset;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  font: 400 14px Montserrat, sans-serif;
  color: #14293a;
}

#ahep-events-directory .ahep-dir__search input::placeholder {
  color: #64717a;
}

#ahep-events-directory .ahep-dir__event {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  border-top: 1px solid #cdd6d4;
  padding-block: 32px;
  animation: ahep-dir-enter 350ms ease-out both;
}

#ahep-events-directory .ahep-dir__event[hidden],
#ahep-events-directory .ahep-dir__empty[hidden] {
  display: none !important;
}

#ahep-events-directory .ahep-dir__date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 88px;
  min-height: 88px;
  background: #005c54;
  color: #fff;
  text-align: center;
}

#ahep-events-directory .ahep-dir__date-day {
  font: 400 38px/1 jubilat, Georgia, serif;
}

#ahep-events-directory .ahep-dir__date-month {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 6px;
}

#ahep-events-directory .ahep-dir__event-body {
  min-width: 0;
}

#ahep-events-directory .ahep-dir__category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #005c54;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 7px;
}

#ahep-events-directory .ahep-dir__category::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #f0b54d;
}

#ahep-events-directory .ahep-dir__category--support::before {
  background: #457dbf;
}

#ahep-events-directory .ahep-dir__category--connect::before {
  background: #f59797;
}

#ahep-events-directory h3 {
  font-size: clamp(25px, 2.5vw, 32px);
  line-height: 1.18;
  font-weight: 600;
  max-width: 710px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

#ahep-events-directory .ahep-dir__summary {
  color: #3e4c55;
  font-size: 15px;
  line-height: 1.55;
  max-width: 680px;
  margin: 0 0 15px;
}

#ahep-events-directory .ahep-dir__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: #35434d;
  font-size: 13px;
  font-weight: 600;
}

#ahep-events-directory .ahep-dir__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#ahep-events-directory .ahep-dir__meta i {
  color: #005c54;
  font-size: 15px;
}

#ahep-events-directory .ahep-dir__audience {
  color: #66727a;
  font-size: 13px;
  margin: 11px 0 0;
}

#ahep-events-directory .ahep-dir__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  align-self: center;
  min-height: 44px;
  background: #005c54;
  border-radius: 4px;
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

#ahep-events-directory .ahep-dir__action:hover {
  background: #14293a;
  color: #fff;
  transform: translateY(-2px);
}

#ahep-events-directory .ahep-dir__filter:focus-visible,
#ahep-events-directory .ahep-dir__programme-filter:focus-visible,
#ahep-events-directory .ahep-dir__action:focus-visible,
#ahep-events-directory .ahep-dir__search input:focus-visible {
  outline: 2px solid #f0b54d;
  outline-offset: 3px;
}

#ahep-events-directory .ahep-dir__empty {
  padding: 44px 0;
  color: #5b6670;
  font-size: 16px;
  margin: 0;
}

#ahep-events-directory .ahep-dir__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes ahep-dir-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  #ahep-events-directory .ahep-dir__controls {
    align-items: center;
    gap: 12px;
  }

  #ahep-events-directory .ahep-dir__search {
    width: min(100%, 300px);
    margin: 0;
  }

  #ahep-events-directory .ahep-dir__programme-filters {
    gap: 12px;
  }

  #ahep-events-directory .ahep-dir__event {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 20px;
  }

  #ahep-events-directory .ahep-dir__date {
    width: 76px;
    min-height: 76px;
  }

  #ahep-events-directory .ahep-dir__action {
    grid-column: 2;
    justify-self: start;
    align-self: start;
    margin-top: -2px;
  }
}

@media (max-width: 600px) {
  #ahep-events-directory .ahep-dir__wrap {
    width: min(100% - 32px, 1160px);
  }

  #ahep-events-directory .ahep-dir__hero {
    min-height: 390px;
    background-position: 47% center;
  }

  #ahep-events-directory .ahep-dir__hero-inner {
    padding-block: 50px;
  }

  #ahep-events-directory h1 {
    font-size: 44px;
  }

  #ahep-events-directory .ahep-dir__lead {
    font-size: 15px;
    max-width: 330px;
  }

  #ahep-events-directory .ahep-dir__programme {
    padding-block: 34px 28px;
  }

  #ahep-events-directory .ahep-dir__programme h2 {
    font-size: 23px;
    margin-bottom: 20px;
  }

  #ahep-events-directory .ahep-dir__programme-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #ahep-events-directory .ahep-dir__programme-filter {
    min-height: 0;
    padding: 13px 15px;
  }

  #ahep-events-directory .ahep-dir__programme-name {
    font-size: 21px;
  }

  #ahep-events-directory .ahep-dir__filter {
    font-size: 13px;
  }

  #ahep-events-directory .ahep-dir__search {
    width: min(100%, 235px);
  }

  #ahep-events-directory .ahep-dir__content {
    padding-block: 40px 70px;
  }

  #ahep-events-directory .ahep-dir__heading-row {
    align-items: start;
    margin-bottom: 14px;
  }

  #ahep-events-directory .ahep-dir__event-group {
    padding-block: 38px 8px;
  }

  #ahep-events-directory .ahep-dir__group-intro {
    margin-bottom: 18px;
  }

  #ahep-events-directory .ahep-dir__group-intro h2 {
    font-size: 30px;
  }

  #ahep-events-directory .ahep-dir__event {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    padding-block: 25px;
  }

  #ahep-events-directory .ahep-dir__date {
    width: 62px;
    min-height: 68px;
  }

  #ahep-events-directory .ahep-dir__date-day {
    font-size: 29px;
  }

  #ahep-events-directory .ahep-dir__date-month {
    font-size: 9px;
  }

  #ahep-events-directory h3 {
    font-size: 25px;
  }

  #ahep-events-directory .ahep-dir__meta {
    display: grid;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ahep-events-directory .ahep-dir__hero-inner,
  #ahep-events-directory .ahep-dir__event {
    animation: none;
  }

  #ahep-events-directory .ahep-dir__action,
  #ahep-events-directory .ahep-dir__filter,
  #ahep-events-directory .ahep-dir__programme-filter {
    transition: none;
  }
}
