/* === whoswho.css === */

/* ---------------------------------------------------
   1) Container & Rows
   --------------------------------------------------- */
.whoswho {
  display: flex;
  flex-direction: column;
  gap: 2rem;               /* vertical space between rows */
}

.whoswho-row {
  display: flex;
  gap: 2rem;               /* horizontal space between cards */
  justify-content: flex-start;
  position: relative;      /* for desktop row divider */
}

/* ---------------------------------------------------
   2) Desktop: two-across + vertical divider if two items
   --------------------------------------------------- */
@media (min-width: 651px) {
  .whoswho-item {
    flex: 0 0 calc((100% - 2rem) / 2);
    max-width:    calc((100% - 2rem) / 2);
  }

  /* only apply vertical divider if there are 2+ cards */
  .whoswho-row:has(.whoswho-item:nth-child(2))::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background-color: var(--divider-color);
  }
}

.content-right .whoswho {
  padding-left: var(--content-right-left-padding);
  padding-right: var(--content-right-right-padding);
}

/* ---------------------------------------------------
   3) Image wrapper with top/bottom framing lines
   --------------------------------------------------- */
.whoswho-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;          /* or 4/3 if preferred */
  overflow: hidden;
}

.whoswho-img-wrapper img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;  /* or center top if you want to bias upward */
  
}

.whoswho-img-wrapper::before,
.whoswho-img-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--divider-color);
}
.whoswho-img-wrapper::before { top: 0; }
.whoswho-img-wrapper::after  { bottom: 0; }

/* ---------------------------------------------------
   4) Text under each image
   --------------------------------------------------- */
.whoswho-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
}

.whoswho-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.whoswho-bio {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------------------------------------------------
   5) Mobile: image left, text right + mobile divider
   --------------------------------------------------- */
@media (max-width: 650px) {
  .whoswho-row {
    flex-direction: column;
  }

  .whoswho-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    position: relative;    /* for vertical line between image & text */
  }

  .whoswho-img-wrapper {
    flex: 0 0 40%;
  }
  
  .whoswho-text {
    padding-top: 0;
  }

  .whoswho-item::before {
    content: "";
    position: absolute;
    left: calc(40% + 0.5rem);
    top: 0; bottom: 0;
    width: 1px;
    background-color: var(--divider-color);
  }

  /* remove desktop vertical divider entirely */
  .whoswho-row::after {
    display: none;
  }
}
