/* Directory page (/directory, tools/wix/directory.js). Layout after Colorlib's "Listed" template
   (search bar above a grid of cards: picture, type label, name, place, description, link), in Movement of
   Recovery's colours and fonts:
   MOR blue #353876 (home hero), navy #292c64 (footer), orange #ff8b00, red-orange #ff4e27 (selected menu
   item), black, light grey #f0f0f0; Work Sans SemiBold headings, Azeret Mono text, Gilroy labels. */
.mor-dir {
  --mor-blue: #353876; --mor-navy: #292c64; --mor-orange: #ff8b00; --mor-red: #ff4e27; --mor-grey: #f0f0f0;
  --head: worksans-semibold, 'work sans', sans-serif;
  --text: azeret-mono, 'azeret mono', ui-monospace, monospace;
  --label: gilroy, 'helvetica neue', arial, sans-serif;
  position: relative; pointer-events: auto; color: #000; background: #fff;
}
.mor-dir *, .mor-dir *::before, .mor-dir *::after { box-sizing: border-box; }
/* the Wix menu bar stays above the page (this page comes after the header, so it would paint over it) */
html:is([data-mor-page="directory"], [data-mor-page^="portfolio"]) header { z-index: 50 !important; }
.mor-dir { z-index: 0; }

/* hero: the MOR PROJECT photo under a MOR-blue wash, below the site's header */
.mor-dir-hero {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(41, 44, 100, .55) 45%, rgba(53, 56, 118, .9) 100%), var(--hero) var(--hero-pos, center 30%) / cover no-repeat, var(--mor-blue);
  padding: calc(var(--mor-header, 80px) + clamp(56px, 9vw, 130px)) 20px clamp(64px, 9vw, 120px);
}
.mor-dir-hero__inner { max-width: 860px; margin: 0 auto; }
.mor-dir-crumbs { font: 13px/1.4 var(--label); display: flex; gap: 10px; justify-content: center; margin: 0 0 22px; color: rgba(255, 255, 255, .8); }
.mor-dir-crumbs a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mor-dir-eyebrow { font: 700 14px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--mor-orange); margin: 0 0 14px; }
.mor-dir-title { font: 700 clamp(34px, 5.4vw, 66px)/1.05 var(--head); letter-spacing: -.02em; margin: 0 0 20px; color: #fff; }
.mor-dir-lead { font: 14px/1.7 var(--text); max-width: 640px; margin: 0 auto; color: rgba(255, 255, 255, .92); }

/* listings */
.mor-dir-list { background: #fff; padding: clamp(48px, 6vw, 84px) 20px clamp(64px, 8vw, 110px); }
.mor-dir-wrap { max-width: 1180px; margin: 0 auto; }
.mor-dir-search { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 0 0 18px; }
.mor-dir-field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 200px; min-width: 0; }
.mor-dir-field--grow { flex: 2 1 320px; }
.mor-dir-field label { font: 700 13px/1.2 var(--label); color: #000; }
.mor-dir-field :is(input, select) {
  height: 48px; width: 100%; border: 1px solid #c9c9d6; border-radius: 0; background: #fff; color: #000;
  font: 13px/1.2 var(--text); padding: 0 14px; appearance: none; -webkit-appearance: none;
}
.mor-dir-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23353876' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.mor-dir-field :is(input, select):focus { outline: 2px solid var(--mor-blue); outline-offset: 1px; border-color: var(--mor-blue); }
.mor-dir-btn {
  height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--mor-red); color: #fff;
  font: 700 14px/1 barlow-medium, barlow, var(--label); display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
}
.mor-dir-btn:hover { background: var(--mor-blue); }
.mor-dir-btn:focus-visible { outline: 2px solid var(--mor-blue); outline-offset: 2px; }
.mor-dir-count { font: 13px/1.4 var(--text); color: #555; margin: 0 0 28px; }

.mor-dir-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 26px; }
.mor-dl { display: flex; flex-direction: column; background: #fff; }
.mor-dl[hidden] { display: none; }
.mor-dl__img { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--mor-grey); }
.mor-dl__img.has-logo { background: #fff; border: 1px solid #e3e3ea; }
.mor-dl__img.has-logo img { width: 100%; height: 100%; object-fit: contain; padding: 14%; display: block; }
.mor-dl__img.has-logo img[src*="/4736."] { padding: 2%; }  /* HRB's logo file has its own margin */
.mor-dl__ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: var(--mor-blue); }
.mor-dl__ph img { width: 46%; height: auto; opacity: .9; display: block; }
.mor-dl__img:hover img { transform: scale(1.03); transition: transform .3s ease; }
.mor-dl__body { padding: 18px 14px 0; display: flex; flex-direction: column; flex: 1; }
.mor-dl__type { font: 700 12px/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--mor-red); margin: 0 0 12px; }
.mor-dl__name { font: 700 20px/1.25 var(--head); margin: 0 0 10px; color: #000; }
.mor-dl__name a { color: inherit; text-decoration: none; }
.mor-dl__name a:hover { color: var(--mor-blue); text-decoration: underline; text-underline-offset: 3px; }
.mor-dl__place { font: 600 12px/1.4 var(--label); color: var(--mor-blue); display: flex; gap: 6px; align-items: center; margin: 0 0 10px; }
.mor-dl__desc {
  font: 12px/1.7 var(--text); color: #333; margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mor-dl__link { margin-top: auto; font: 700 13px/1.2 var(--label); color: var(--mor-blue); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.mor-dl__link:hover { color: var(--mor-red); text-decoration: underline; text-underline-offset: 3px; }
.mor-dl__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.mor-dl__links .mor-dl__link { margin-top: 0; }
.mor-dl__link--map { color: #555; font-weight: 600; }
.mor-dir-empty { font: 14px/1.6 var(--text); text-align: center; padding: 40px 0; }
.mor-dir-note { font: 12px/1.6 var(--text); color: #555; text-align: center; margin: 56px auto 0; max-width: 640px; }

@media (max-width: 1000px) {
  .mor-dir-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
}
@media (max-width: 640px) {
  .mor-dir-cards { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .mor-dir-search { gap: 12px; }
  .mor-dir-field, .mor-dir-field--grow { flex-basis: 100%; }
  .mor-dir-btn { width: 100%; justify-content: center; }
  .mor-dir-count, .mor-dir-note { text-align: center; }
  .mor-dl__img { aspect-ratio: 16 / 9; }  /* a wide strip: 123 full-width squares made the page very long */
  .mor-dl__img.has-logo img { padding: 6% 22%; }
  .mor-dl__ph img { width: auto; height: 62%; }
  .mor-dl__body { text-align: center; align-items: center; }
  .mor-dl__place { justify-content: center; }
  .mor-dl__links { justify-content: center; }
}

/* The header stays at the top while scrolling the long directory (2 Dec 2026). The page is built from Wix's
   Contact page, whose header is "sticky" but stretched to the whole page height, so it never stuck: it now takes
   only its own height. Solid black, as the menu bar looks at the top, so the menu reads over white cards. */
html[data-mor-page="directory"] header { align-self: start !important; height: auto !important; background: #000 !important; }
