/*
 * Person card (template-parts/person-card.php), shared by the service experts and About
 * Us. Ported from the mock (.s-person, .dash). Selectors carry two classes so they
 * outrank the Elementor kit (.elementor-kit-N h3, a) while Elementor stays active.
 */

.gp-person.gp-person {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--gp-navy);
}
.gp-person .gp-person__name {
  margin: 0 0 6px;
  color: var(--gp-navy);
  font-family: var(--gp-font);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -.005em;
}
.gp-person .gp-person__role {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--gp-text);
  font-weight: 500;
  font-size: var(--gp-fs-label-xs);
  line-height: 1.6;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Specialism lines with an orange dash. */
.gp-dash.gp-dash { margin: 0 0 22px; padding: 0; list-style: none; }
.gp-dash.gp-dash li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 20px;
  color: var(--gp-text);
  font-size: 14px;
  line-height: 1.5;
}
.gp-dash.gp-dash li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 9px;
  height: 2px;
  background: var(--gp-accent);
}

/* Directly under the specialisms, so the link rows line up across cards even when one
   card has an extra link. */
.gp-person .gp-person__acts {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 14px 24px;
}
.gp-person .gp-person__acts .gp-tlink { justify-self: start; color: var(--gp-navy); text-decoration: none; }

/* Portrait: every person in the same 4:5 frame, in the photograph's own colours. */
.gp-person .gp-person__photo { width: min(100%, 220px); margin: 0 0 22px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--gp-surface-lt); }
.gp-person .gp-person__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* A person on their own (a service with one expert): photograph beside the details. */
.gp-person--solo.gp-person--photo { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 40px; align-items: start; }
.gp-person--solo.gp-person--photo .gp-person__photo { grid-row: 1 / span 5; width: 220px; margin: 0; }
.gp-person--solo.gp-person--photo > :not(.gp-person__photo) { grid-column: 2; }
@media (max-width: 720px) {
  .gp-person--solo.gp-person--photo { display: block; }
  .gp-person--solo.gp-person--photo .gp-person__photo { margin-bottom: 22px; }
}

/* ==========================================================================
   Phone and tablet pass (below 1101px only).
   ========================================================================== */
@media (max-width: 1100px) {
  /* Reach Out, Read Bio, Email, LinkedIn: each link a 44px target, without moving the
     underline. The rows are spaced so neighbouring targets never overlap. */
  .gp-person .gp-person__acts { gap: 24px 32px; }
  .gp-person .gp-person__acts .gp-tlink { position: relative; font-size: 11px; }
  .gp-person .gp-person__acts .gp-tlink::after { content: ''; position: absolute; inset: -12px -10px; }
}
@media (max-width: 720px) {
  .gp-person .gp-person__role { min-height: 0; margin-bottom: 18px; }
  .gp-dash.gp-dash li { font-size: 15px; }
}
@media (max-width: 599px) {
  /* Phones: in a list of people, each portrait (same 4:5 frame) sits beside the name, role
     and specialisms, with the links in a row beneath. A person shown on their own keeps
     the portrait above the details. */
  .gp-person--photo:not(.gp-person--solo) { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 20px; align-content: start; }
  .gp-person--photo:not(.gp-person--solo) .gp-person__photo { grid-row: 1 / span 3; width: 112px; margin: 0; }
  .gp-person--photo:not(.gp-person--solo) > :not(.gp-person__photo) { grid-column: 2; }
  .gp-person--photo:not(.gp-person--solo) .gp-person__name { margin-top: -4px; font-size: 18px; }
  .gp-person--photo:not(.gp-person--solo) .gp-person__role { margin-bottom: 12px; }
  .gp-person--photo:not(.gp-person--solo) .gp-dash { margin-bottom: 0; }
  .gp-person--photo:not(.gp-person--solo) .gp-dash li { margin-bottom: 6px; font-size: 15px; }
  .gp-person--photo:not(.gp-person--solo) .gp-person__acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 24px 16px; margin-top: 24px; }
  .gp-person--photo:not(.gp-person--solo) .gp-person__acts .gp-tlink::after { left: -8px; right: -8px; }
}
