

/* ==========================================================================
   Fellows directory
   Add the class "fellows-directory" to the Divi section module.

   This is deliberately self-contained: the markup uses Foundation classes
   (grid-x, cell, small-3, medium-6, large-4) which may or may not be
   loaded on the Divi site. Everything below overrides those rather than
   relying on them, so the layout is identical either way.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
.fellows-directory {
  --fd-gap-x: 2rem;
  --fd-gap-y: 2.25rem;
  --fd-thumb: 84px;
  --fd-thumb-gap: 1rem;
  --fd-name: 1.0625rem;
  --fd-meta: 0.9375rem;
  --fd-meta-colour: #6b7280;
  --fd-rule: #e5e7eb;
  --fd-filter-bg: #9cbfa5;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */
.fellows-directory .facetwp-facet {
  margin-bottom: 0;
}

.fellows-directory .facetwp-dropdown,
.fellows-directory .facetwp-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 2px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.3;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.fellows-directory .facetwp-dropdown {
  /* room for Divi's own select arrow */
  padding-right: 2.5rem;
}

.fellows-directory .facetwp-input-wrap {
  position: relative;
  display: block;
}

.fellows-directory .facetwp-input-wrap .facetwp-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   The grid
   .facetwp-template is the direct parent of the .fellow cards.
   -------------------------------------------------------------------------- */
.fellows-directory .facetwp-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--fd-gap-x);
  row-gap: var(--fd-gap-y);
  align-items: start;
}

/* Neutralise the Foundation column classes so they can't fight the grid */
.fellows-directory .fellow {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  /* Foundation Equalizer sets inline heights; this stops that mattering */
  height: auto !important;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.fellows-directory .fellow > .grid-x {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: var(--fd-thumb-gap);
  margin: 0;
  padding: 0;
}

.fellows-directory .fellow .small-3 {
  flex: 0 0 var(--fd-thumb);
  width: var(--fd-thumb);
  max-width: var(--fd-thumb);
  padding: 0;
  margin: 0;
}

.fellows-directory .fellow .small-9 {
  flex: 1 1 auto;
  min-width: 0; /* lets long names wrap instead of overflowing */
  padding: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Photo
   Forces a consistent square regardless of the source crop.
   -------------------------------------------------------------------------- */
.fellows-directory .fellow .small-3 a {
  display: block;
  line-height: 0;
}

.fellows-directory .fellow img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top; /* favours faces over feet */
  border-radius: 2px;
  background: #f3f4f6;
}

/* --------------------------------------------------------------------------
   Text
   -------------------------------------------------------------------------- */
.fellows-directory .fellow .title {
  display: block;
  font-size: var(--fd-name);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.2em;
  text-wrap: balance;
}

.fellows-directory .fellow .title a {
  text-decoration: none;
}

.fellows-directory .fellow .title a:hover,
.fellows-directory .fellow .title a:focus-visible {
  text-decoration: underline;
}

.fellows-directory .fellow .meta {
  display: block;
  font-size: var(--fd-meta);
  line-height: 1.4;
  color: var(--fd-meta-colour);
}

/* --------------------------------------------------------------------------
   Pager
   -------------------------------------------------------------------------- */
.fellows-directory .facetwp-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--fd-rule);
}

.fellows-directory .facetwp-page {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--fd-rule);
  border-radius: 2px;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.fellows-directory .facetwp-page.active {
  border-color: currentColor;
  font-weight: 600;
}

.fellows-directory .facetwp-page.dots {
  border-color: transparent;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Loading state
   FacetWP adds .facetwp-loading to the template while refreshing.
   -------------------------------------------------------------------------- */
.fellows-directory .facetwp-template.facetwp-loading {
  opacity: 0.4;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive
   Mirrors the intent of medium-6 / large-4 in the markup.
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .fellows-directory .facetwp-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fellows-directory {
    --fd-thumb: 72px;
    --fd-gap-y: 1.75rem;
  }
  .fellows-directory .facetwp-template {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Accessibility floor
   -------------------------------------------------------------------------- */
.fellows-directory a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .fellows-directory .facetwp-template.facetwp-loading {
    transition: none;
  }
}





/* Mapplic ________________________________________________________ */

.map-wrapper {
   /* border: solid 1px #13153f; */
   background: #8CB89F;
   margin: 0 0 1rem;
   padding: 1rem;
   float: left;
   width: 100%;
}

.mapplic-element {
   /* background: #f7f7f8;*/
   padding-left: 3px;
}


.mapplic-map-image {
   background: white;
}

/* a narrower sidebar */
body .mapplic-sidebar {
   width: 25%;
   float: right;
   background: #13153f;
}

body .mapplic-container {
   width: 75%;
   float: left;
}

