/* ==========================================================================
   Business Directory - Figma 1760:486, 1765:2057 and 1765:2963
   ========================================================================== */

body.business-directory-body {
  background: var(--white);
}

body.bd-modal-open {
  overflow: hidden;
}

.bd-shell {
  width: min(1600px, calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

.bd-page .bd-hero__image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

/* Intro and directory controls */
.bd-intro {
  position: relative;
  z-index: 3;
  min-height: 662px;
  padding: 75px 0 34px;
  overflow: visible;
  background: var(--nudgee-light);
}

.bd-intro__inner {
  position: relative;
}

.bd-intro.bd-intro--filters-only {
  min-height: 0;
}

.bd-intro--filters-only .bd-filter {
  margin-top: 0;
}

.bd-intro__lead,
.bd-intro__copy {
  width: min(1056px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.bd-intro__lead {
  position: relative;
  margin-top: 0;
  margin-bottom: 126px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: 0.96px;
  color: var(--gold-accent);
}

.bd-intro__lead::before {
  content: "";
  position: absolute;
  top: 55px;
  right: calc(100% + 32px);
  width: max(0px, calc((100vw - 1056px) / 2 - 32px));
  height: 1px;
  background: var(--gold-accent);
}

.bd-intro__copy {
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.74;
  letter-spacing: 0.48px;
  color: var(--black);
}

.bd-intro__copy p {
  margin: 0;
}

.bd-intro__copy p + p {
  margin-top: 28px;
}

.bd-intro__copy a {
  color: var(--nudgee-royal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bd-filter {
  position: relative;
  display: grid;
  grid-template-columns: 608px 1px 350px 1px 154px;
  gap: 40px;
  align-items: center;
  margin-top: 158px;
}

.bd-search {
  display: flex;
  align-items: center;
  height: 51px;
  padding: 0 20px;
  border: 1px solid #ffdba7;
  border-radius: 38px;
  background: var(--white);
  color: var(--nudgee-royal);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bd-search:focus-within {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(201, 161, 91, 0.2);
}

.bd-search svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.bd-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  color: var(--nudgee-royal);
}

.bd-search input::placeholder {
  color: var(--nudgee-royal);
  opacity: 1;
}

.bd-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.bd-filter__divider {
  display: block;
  width: 1px;
  height: 50px;
  background: var(--gold-accent);
}

.bd-category {
  position: relative;
  display: flex;
  justify-content: center;
}

.bd-category__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 274px;
  height: 51px;
  padding: 0 20px 0 30px;
  border: 1px solid #ffdba7;
  border-radius: 29px;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  color: var(--nudgee-royal);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bd-category__toggle:hover,
.bd-category__toggle:focus-visible {
  border-color: var(--gold-accent);
  box-shadow: 0 7px 18px rgba(11, 27, 51, 0.1);
}

.bd-category__toggle svg {
  width: 14px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.bd-category.is-open .bd-category__toggle svg {
  transform: rotate(180deg);
}

.bd-category__menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 16px;
  width: 863px;
  max-height: min(720px, calc(100vh - 180px));
  padding: 10px;
  overflow-y: auto;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.bd-category.is-open .bd-category__menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

.bd-category__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 7px 13px 7px 30px;
  border: 1px solid var(--nudgee-light);
  border-radius: 27px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.42px;
  color: var(--nudgee-ink);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bd-category__option:hover,
.bd-category__option:focus-within {
  border-color: #ffdba7;
  background: rgba(234, 232, 227, 0.5);
}

.bd-category__option.is-selected {
  background: var(--nudgee-light);
}

.bd-category__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bd-category__option i {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-left: 12px;
  border: 1px solid #767676;
  border-radius: 2px;
  background: var(--white);
}

.bd-category__option input:checked + i {
  border-color: var(--nudgee-ink);
  background: var(--nudgee-ink);
}

.bd-category__option input:checked + i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid var(--gold-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bd-filter__submit {
  height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 38px;
  background: linear-gradient(119deg, #ffdba7 0%, #c9a15b 100%);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  color: var(--nudgee-ink);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bd-filter__submit:hover,
.bd-filter__submit:focus-visible {
  box-shadow: 0 8px 20px rgba(11, 27, 51, 0.18);
  transform: translateY(-2px);
}

/* Featured Sponsors panel (Figma 2608:1162) — royal panel, heading centred
   above the tiles, which all share one row */
.bd-featured {
  margin: 0 0 32px;
  padding: 36px 35px 46px;
  border-radius: 10px;
  background: var(--nudgee-royal);
}

.bd-featured[hidden] {
  display: none;
}

.bd-featured__title {
  margin: 0 0 34px;
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  text-align: center;
}

/* one row whatever the sponsor count: the tiles cap at the standard 294px and
   shrink together once the full set no longer fits the panel */
.bd-featured__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-featured__grid > .bd-card {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: 294px;
}

/* narrow tiles wrap their copy onto more lines — let the row grow instead of
   clipping it, all tiles keeping the same height */
.bd-featured__grid .bd-card__button {
  height: auto;
  min-height: 382px;
}

/* Card grid */
.bd-results {
  min-height: 1902px;
  padding: 30px 0 190px;
  background: var(--white);
}

.bd-results__count {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.42px;
  color: #767676;
}

.bd-results__count strong {
  color: var(--black);
}

.bd-grid {
  display: grid;
  /* 5 x 294px at the full 1600px shell; as the shell narrows (1400-1920px
     laptops) drop to 4 columns instead of spilling past the edge */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-card {
  width: auto;
  min-width: 0;
}

.bd-card.is-hidden {
  display: none;
}

.bd-card__button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 382px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--nudgee-light);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  text-align: left;
  color: var(--black);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bd-card__button:hover,
.bd-card__button:focus-visible {
  box-shadow: 0 14px 30px rgba(11, 27, 51, 0.23);
  transform: translateY(-5px);
}

.bd-card__button:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: 4px;
}

.bd-card__logo {
  display: flex;
  flex: 0 0 188px;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: var(--white);
}

.bd-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.bd-card__button:hover .bd-card__logo img,
.bd-card__button:focus-visible .bd-card__logo img {
  transform: scale(1.035);
}

.bd-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: 0 13px 13px;
}

.bd-card__name {
  display: flex;
  min-height: 76px;
  align-items: center;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--nudgee-royal);
}

.bd-card__category {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--black);
}

.bd-card__location {
  margin-top: 1px;
  font-family: var(--font-head);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.36px;
  color: var(--black);
}

.bd-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.bd-card__tags i,
.bd-modal__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 0.36px;
  text-transform: uppercase;
}

.bd-card__tags i {
  background: var(--nudgee-royal);
  color: var(--white);
}

.bd-modal__tags span {
  background: var(--nudgee-royal);
  color: var(--white);
}

.bd-results__empty {
  margin: 60px 0;
  font-family: var(--font-display);
  font-size: 28px;
  text-align: center;
  color: var(--nudgee-royal);
}

/* Business detail modal */
.bd-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 75px 80px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease-out, visibility 0s linear 0.3s;
}

.bd-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease-out, visibility 0s;
}

.bd-modal__panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(305px, auto) minmax(625px, auto);
  width: min(1600px, 100%);
  min-height: 930px;
  margin: auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.99);
  transition: transform 0.3s ease-out;
}

.bd-modal.is-open .bd-modal__panel {
  transform: translateY(0) scale(1);
}

.bd-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  width: 53px;
  height: 53px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--gold-accent);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  color: var(--nudgee-royal);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.bd-modal__close:hover,
.bd-modal__close:focus-visible {
  background: var(--nudgee-light);
  box-shadow: 0 0 0 3px rgba(201, 161, 91, 0.25);
  transform: rotate(90deg);
}

.bd-modal__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.bd-modal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 393px;
  gap: 80px;
  align-items: start;
  min-height: 305px;
  padding: 29px 87px 25px;
}

.bd-modal__identity {
  align-self: center;
}

.bd-modal__identity h2 {
  margin: 0 0 25px;
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--nudgee-royal);
}

.bd-modal__category,
.bd-modal__location {
  margin: 0;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.74;
  letter-spacing: 0.48px;
  color: var(--black);
}

.bd-modal__category {
  font-weight: 700;
  text-transform: uppercase;
}

.bd-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.bd-modal__tags span {
  font-size: 14px;
  letter-spacing: 0.42px;
}

.bd-modal__logo {
  display: flex;
  width: 393px;
  height: 251px;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  background: var(--white);
}

.bd-modal__logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bd-modal__body {
  display: grid;
  /* contacts column sizes to its longest line (website/email on one line),
     capped at half the body so the About column keeps a readable width */
  grid-template-columns: fit-content(50%) minmax(0, 1fr);
  gap: 80px;
  min-height: 625px;
  padding: 44px 87px 70px;
  background: var(--nudgee-ink);
  color: var(--white);
}

.bd-modal__panel.has-no-contacts .bd-modal__body {
  grid-template-columns: minmax(0, 1fr);
}

.bd-modal__panel.has-no-contacts .bd-modal__contacts {
  display: none;
}

.bd-modal__contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 300px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-modal__contacts li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 28px;
}

.bd-modal__contacts li[hidden] {
  display: none;
}

.bd-modal__contacts svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--gold-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bd-modal__contacts a,
.bd-modal__contacts p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.74;
  letter-spacing: 0.48px;
  color: var(--gold-accent);
}

#bdModalAddress { white-space: pre-line; }

.bd-modal__contacts a:hover,
.bd-modal__contacts a:focus-visible {
  color: #ffdba7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bd-modal__about {
  max-width: 1046px;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.74;
  letter-spacing: 0.48px;
}

.bd-modal__about h3 {
  margin: 0 0 28px;
  font: inherit;
  font-weight: 700;
}

.bd-modal__about p {
  margin: 0;
}

.bd-modal__about p + p {
  margin-top: 28px;
}

@media (max-width: 1399px) {
  .bd-featured__grid {
    gap: 28px;
  }

  .bd-filter {
    grid-template-columns: minmax(380px, 608px) 1px 320px 1px 154px;
    gap: 24px;
  }

  .bd-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }

  .bd-card {
    width: auto;
  }

  .bd-results {
    min-height: 0;
  }

  .bd-modal {
    padding: 40px;
  }

  .bd-modal__panel {
    min-height: min(930px, calc(100vh - 80px));
  }
}

@media (max-width: 1199px) {
  .bd-featured__grid {
    gap: 24px;
  }

  .bd-intro {
    min-height: 0;
    padding: 64px 0 72px;
  }

  .bd-intro__lead {
    margin-bottom: 42px;
  }

  .bd-filter {
    grid-template-columns: minmax(0, 1fr) 280px 140px;
    gap: 18px;
    margin-top: 72px;
  }

  .bd-filter__divider {
    display: none;
  }

  .bd-category__toggle {
    width: 100%;
  }

  .bd-category__menu {
    width: min(720px, calc(100vw - 64px));
    grid-template-columns: repeat(2, 1fr);
  }

  .bd-results {
    padding: 40px 0 110px;
  }

  .bd-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .bd-modal {
    padding: 24px;
  }

  .bd-modal__panel {
    grid-template-rows: auto auto;
    min-height: 0;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .bd-modal__head {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    min-height: 270px;
    padding: 32px 72px 28px 48px;
  }

  .bd-modal__logo {
    width: 280px;
    height: 190px;
  }

  .bd-modal__contacts {
    min-width: 250px;
  }

  .bd-modal__identity h2 {
    font-size: 34px;
  }

  .bd-modal__body {
    grid-template-columns: fit-content(50%) minmax(0, 1fr);
    gap: 45px;
    min-height: 0;
    padding: 42px 48px 56px;
  }
}

/* two columns get too tight for full website/email lines — stack contacts
   above About Us, as on mobile */
@media (max-width: 991px) {
  .bd-featured {
    padding: 32px 30px 40px;
  }

  .bd-featured__title {
    margin-bottom: 30px;
    font-size: 34px;
  }

  /* tablet and below: the tiles get too narrow for one row — wrap them */
  .bd-featured__grid {
    flex-wrap: wrap;
    gap: 20px;
  }

  .bd-featured__grid > .bd-card {
    flex: 0 1 294px;
  }

  .bd-modal__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .bd-modal__contacts {
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .bd-featured {
    padding: 28px 22px 34px;
  }

  .bd-featured__title {
    margin-bottom: 26px;
    font-size: 30px;
  }


  .bd-page .gp-hero__title {
    font-size: 48px;
  }

  .bd-intro {
    padding: 52px 0 60px;
  }

  .bd-intro__lead {
    margin-bottom: 32px;
    font-size: 27px;
    line-height: 1.4;
    letter-spacing: 0.5px;
  }

  .bd-intro__lead::before {
    display: none;
  }

  .bd-intro__copy {
    font-size: 15px;
  }

  .bd-filter {
    grid-template-columns: minmax(0, 1fr) 140px;
    margin-top: 48px;
  }

  .bd-search {
    grid-column: 1 / -1;
  }

  .bd-category__menu {
    left: auto;
    right: 0;
    width: min(560px, calc(100vw - 32px));
    grid-template-columns: repeat(2, 1fr);
    transform: translateY(-8px);
  }

  .bd-category.is-open .bd-category__menu {
    transform: translateY(0);
  }

  .bd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .bd-card__button {
    height: 370px;
  }

  /* keep the featured tiles the same height as the grid's at this breakpoint */
  .bd-featured__grid .bd-card__button {
    min-height: 370px;
  }

  .bd-card__logo {
    flex-basis: 178px;
  }

  .bd-card__name {
    font-size: 17px;
  }

  .bd-modal {
    align-items: flex-start;
    padding: 12px;
  }

  .bd-modal__panel {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .bd-modal__close {
    position: sticky;
    top: 12px;
    float: none;
    margin: 12px 12px -65px auto;
  }

  .bd-modal__head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 68px 28px 32px;
  }

  .bd-modal__identity h2 {
    margin-bottom: 18px;
    font-size: 30px;
  }

  .bd-modal__category,
  .bd-modal__location {
    font-size: 14px;
  }

  .bd-modal__logo {
    grid-row: 1;
    width: 100%;
    height: 160px;
    padding: 10px 60px;
  }

  .bd-modal__identity {
    grid-row: 2;
  }

  .bd-modal__body {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 38px 28px 52px;
  }

  .bd-modal__contacts,
  .bd-modal__about {
    min-width: 0;
    font-size: 14px;
  }

  .bd-modal__contacts a {
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .bd-page .gp-hero__title {
    font-size: 40px;
  }

  .bd-filter {
    grid-template-columns: 1fr;
  }

  .bd-search,
  .bd-category,
  .bd-filter__submit {
    grid-column: 1;
  }

  .bd-category__menu {
    width: min(360px, calc(100vw - 28px));
    grid-template-columns: 1fr;
  }

  .bd-grid {
    grid-template-columns: 294px;
    justify-content: center;
  }

  .bd-card {
    width: 294px;
  }

  .bd-card__button {
    height: 382px;
  }

  /* the tile height steps back up here — keep the featured tiles in step */
  .bd-featured__grid .bd-card__button {
    min-height: 382px;
  }

  .bd-card__logo {
    flex-basis: 188px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-search,
  .bd-category__toggle,
  .bd-category__toggle svg,
  .bd-category__menu,
  .bd-category__option,
  .bd-filter__submit,
  .bd-card__button,
  .bd-card__logo img,
  .bd-modal,
  .bd-modal__panel,
  .bd-modal__close {
    transition: none;
  }

  .bd-filter__submit:hover,
  .bd-card__button:hover,
  .bd-modal__panel,
  .bd-modal__close:hover {
    transform: none;
  }
}
