/* Horizontal professional listings, with portrait and compact contact actions. */
#profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
#profile-grid > .profile {
  grid-column: auto;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto auto;
  column-gap: 22px;
  row-gap: 8px;
  padding: 0;
  min-height: 250px;
  border: 1px solid #baa57e;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 18px #1824340d;
  overflow: hidden;
  transform: none;
}
#profile-grid .card-top {
  grid-column: 1;
  grid-row: 1 / 6;
  align-self: stretch;
  position: relative;
  display: block;
  width: auto;
  margin: 0;
  min-height: 250px;
}
#profile-grid .portrait {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  background: #edf0f2;
}
#profile-grid .role {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.75rem;
  letter-spacing: 1px;
  line-height: 1.5;
  margin: 18px 22px 0 0;
  color: #806030;
}
#profile-grid h3 {
  grid-column: 2;
  grid-row: 2;
  margin: 0 22px 0 0;
  font-size: 1.5rem;
  line-height: 1.25;
  color: #182434;
}
#profile-grid .bio {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  margin: 0 22px 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #626b75;
  max-width: 720px;
}
#profile-grid .phone {
  grid-column: 2;
  grid-row: 4;
  border: 0;
  padding: 0;
  margin: 0 22px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.5px;
  color: #626b75;
}
#profile-grid .actions {
  grid-column: 2;
  grid-row: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 18px 16px 0;
  padding: 0;
}
#profile-grid .actions a,
#profile-grid .actions button {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 11px;
  background: #fff;
  box-shadow: 0 3px 12px #18243412;
  cursor: pointer;
}
#profile-grid .actions .call {
  color: #9b7134;
  border: 1px solid #e2d5bf;
}
#profile-grid .actions .whatsapp {
  color: #16794b;
  border: 1px solid #d9e7df;
  background: #fff;
}
#profile-grid .actions svg {
  height: 23px;
  width: 23px;
  flex-shrink: 0;
}
#profile-grid .actions a:hover,
#profile-grid .actions button:hover {
  background: #f5f6f7;
  filter: none;
  box-shadow: 0 4px 14px #18243420;
}
@media (max-width: 620px) {
  #profile-grid {
    gap: 12px;
  }
  #profile-grid > .profile {
    grid-template-columns: 106px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
    min-height: 236px;
    border-radius: 10px;
  }
  #profile-grid .card-top {
    min-height: 236px;
  }
  #profile-grid .role {
    margin: 12px 12px 0 0;
    letter-spacing: 0.3px;
    font-size: 0.75rem;
  }
  #profile-grid h3 {
    font-size: 1.125rem;
    margin-right: 12px;
    overflow-wrap: break-word;
  }
  #profile-grid .bio {
    font-size: 1rem;
    line-height: 1.4;
    margin-right: 12px;
    overflow-wrap: break-word;
  }
  #profile-grid .phone {
    font-size: 0.875rem;
    margin-right: 12px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  #profile-grid .actions {
    gap: 8px;
    margin: 2px 12px 12px 0;
  }
  #profile-grid .actions a,
  #profile-grid .actions button {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
  }
}
@media (max-width: 359px) {
  #profile-grid > .profile {
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 10px;
  }
}

/* Larger portraits and short, number-free profile details. */
#profile-grid {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
#profile-grid > .profile {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  min-height: 320px;
}
#profile-grid .card-top {
  grid-row: 1 / 5;
  min-height: 320px;
}
#profile-grid .portrait {
  object-fit: contain;
  background: #eef0f2;
}
#profile-grid .actions {
  grid-row: 4;
}
@media (max-width: 620px) {
  #profile-grid {
    gap: 16px;
  }
  #profile-grid > .profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    min-height: 0;
    column-gap: 0;
    row-gap: 6px;
  }
  #profile-grid .card-top {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    height: min(84vw, 320px);
    width: 100%;
    margin: 0;
  }
  #profile-grid .portrait {
    object-fit: contain;
    object-position: center;
    width: 100%;
    height: 100%;
  }
  #profile-grid .role {
    grid-column: 1;
    grid-row: 2;
    margin: 8px 14px 0;
    letter-spacing: 0.5px;
  }
  #profile-grid h3 {
    grid-column: 1;
    grid-row: 3;
    font-size: 1.25rem;
    margin: 0 14px;
    line-height: 1.25;
  }
  #profile-grid .bio {
    grid-column: 1;
    grid-row: 4;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 14px;
    max-width: none;
  }
  #profile-grid .actions {
    grid-column: 1;
    grid-row: 5;
    margin: 4px 14px 12px;
    gap: 10px;
  }
  #profile-grid .actions a,
  #profile-grid .actions button {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }
}

#profile-grid .profile {
  cursor: pointer;
}
#profile-grid h3 a {
  color: inherit;
  text-decoration: none;
}
#profile-grid h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#profile-grid .profile-photo-link {
  display: block;
  position: absolute;
  inset: 0;
}
#profile-grid .profile-photo-link:focus-visible {
  outline: 3px solid #b1915b;
  outline-offset: -4px;
  z-index: 1;
}
