/* ==========================================================================
   SRH Funds — About page (about.php)
   Shared: .page-hero (reuse on Contact / Insights), .team-card, .bio-modal
   ========================================================================== */

/* ── Page hero (title panel + image) ──────────────────────────────────── */
.page-hero__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.page-hero__copy {
    background: var(--stone);
    padding: 10%;               /* = 5% of the row (live Divi column padding) */
}
.page-hero__title {
    font-size: 75px;
    line-height: 1.1;
    font-weight: 500;
    padding-bottom: 10px;
}
.page-hero__media {
    background-color: #c9d3dc;
    background-size: cover;
    background-position: 50% 50%;
    min-height: 100%;
}

/* ── Section headings ─────────────────────────────────────────────────── */
.about-founder__heading,
.about-team__heading {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 500;
    padding-bottom: 10px;
}
.about-founder__heading {
    width: 80%;
    margin: 45px auto 8px;
    text-align: center;
}
.about-founder__row {
    display: flex;
    justify-content: center;
}
.about-founder__row .team-card { width: calc(47.25% + 7px); }

.about-team__heading { margin-top: 53px; width: 47.25%; }

/* ── Team grids ───────────────────────────────────────────────────────── */
.team-grid {
    display: grid;
    gap: 3%;
    row-gap: 30px;
}
.team-grid--4 { grid-template-columns: repeat(4, 1fr); padding: 28px 0 43px; }
.team-grid--3 {
    grid-template-columns: repeat(3, 1fr);
    width: 65%;
    padding: 15px 0 30px;
}

/* ── Team card ────────────────────────────────────────────────────────── */
.team-card {
    display: flex;
    flex-direction: column;
    background: var(--blue-200);
}
.team-card__media { overflow: hidden; }
.team-card__media img {
    width: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}
.team-card--lg .team-card__media img { aspect-ratio: 650 / 406; }
.team-card--md .team-card__media img { height: 323px; }
.team-card__media { margin-bottom: 12px; }
.team-card--sq .team-card__media img { aspect-ratio: 1 / 1; }

.team-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 9.3px;             /* live: 3% of the column */
}
.team-card--lg .team-card__body { padding: 19.3px; }
.team-card__name {
    font-size: 20px;
    line-height: 1.1;
    font-weight: 500;
    padding-bottom: 10px;
}
.team-card__position {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}
.team-card__company {
    font-size: 14px;
    line-height: 33px;
    margin: 0 0 14px;
}

/* "READ MORE ↗" */
.bio-link {
    align-self: flex-end;
    margin-top: auto;
    padding: 0 0 14px;
    line-height: 33px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 16px;
    text-transform: uppercase;
    color: var(--black);
}
.bio-link::after {
    content: "";
    width: 15px; height: 15px;
    transition: transform var(--ease);
}
.bio-link:hover { text-decoration: underline 1px; text-underline-offset: 4px; }
.bio-link:hover::after { transform: rotate(-180deg); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Firm boxes ───────────────────────────────────────────────────────── */
.about-firm--paralel { padding: 8px 0 58px; }
.about-firm--partner { padding: 0 0 4%; }

.firm-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3%;
    align-items: start;
    padding: 2% 5%;             /* live Divi row padding (% of section width) */
    color: var(--white);
}
.firm-box__copy { margin: 0 5px 0 -25px; }   /* live text column is offset 25px left, 20px wider */
.firm-box--light { background: #4984b0; }
.firm-box--dark  { background: var(--blue-700); }
.firm-box__heading {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 500;
    color: var(--white);
    padding-bottom: 10px;
}
.firm-box--dark { padding-top: calc(2% + 6px); }
.firm-box__copy h4 {
    font-size: 27px;
    line-height: 1.1;
    font-weight: 500;
    color: var(--white);
    padding-bottom: 10px;
    margin-bottom: 33px;
}
.firm-box__copy p {
    font-size: 22px;
    line-height: 1.5;
    text-align: justify;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .team-grid--3 { width: var(--row-width); }
}

/* ── Tablet parity with live (≤980px) ─────────────────────────────────── */
@media (max-width: 980px) {
    .page-hero__row { grid-template-columns: 1fr; }
    .page-hero__media { display: none; }
    .page-hero__copy { padding: 5%; }
    .page-hero__title { font-size: 60px; line-height: 66px; }

    .about-founder__heading { margin: 45px auto 8px; }
    .about-founder__row .team-card { width: calc(100% + 7px); max-width: none; margin-inline: -3px -4px; }
    .about-team__heading { width: 100%; margin-top: 89px; }

    .team-grid--4 { grid-template-columns: 1fr 1fr; gap: 30px 5.5%; padding: 57px 0 43px; }
    .team-grid--4 .team-card { margin-inline: -1px -2px; }
    .team-grid--3 { grid-template-columns: 1fr; width: 65%; gap: 30px; }
    .team-grid--3 .team-card { margin-inline: -2px -3px; }
    .team-grid--3 .team-card__body { padding: 15px 15px 4px; }
    .about-firm--paralel { padding-top: 28px; }

    .firm-box { grid-template-columns: 1fr; row-gap: 30px; padding: 2% 5% 0; }
    .firm-box__copy { margin: 0 0 0 7px; }
    .about-firm--paralel .firm-box { padding-bottom: 21px; }
}

/* ── Phone parity with live (≤767px) ──────────────────────────────────── */
@media (max-width: 767px) {
    .page-hero__title { font-size: 48px; line-height: 52.8px; }
    .about-founder__heading, .about-team__heading, .firm-box__heading { font-size: 32px; line-height: 35.2px; }
    .team-grid--4 { grid-template-columns: 1fr; }
    .team-card--md .team-card__media img { height: 323px; aspect-ratio: auto; }
    .firm-box__copy p { font-size: 22px; text-align: justify; }
    .firm-box__copy h4 { font-size: 27px; margin-bottom: 33px; }
    .team-card--lg .team-card__body { padding: 3%; }
    .team-grid--3 .team-card__body { padding: 3%; }
    .about-firm--paralel { padding-top: 10px; }
    .firm-box { padding: 2% 5% 0; }
}
.bio-link::after { background: var(--img-arrow-black) center / contain no-repeat; -webkit-mask: none; mask: none; }

/* ── Bio pop-up: live Divi Overlay values ─────────────────────────────────
   Desktop: 1006px panel at 1513px (66.5%), Divi 1/4 + 3/4 row.
   Tablet:  80% of the 95% overlay, full height, one column (78% wide).
   Phone:   95% of (viewport − 40px), 600px tall, one column (80% wide), photo 70% wide.
   Close button = .popup-close (style.css). */
.bio-modal {
    width: 66.5%; max-width: calc(100% - 32px);
    max-height: min(700px, calc(100vh - 60px));
    padding: 77.3px 0;
    border: 0;
    background: var(--white);
    overflow: auto;
}
.bio-modal__grid {
    display: grid;
    width: 78.8%; margin-inline: auto;
    grid-template-columns: 20.8% 1fr; column-gap: 5.5%;
}
.bio-modal__aside img { width: 100%; aspect-ratio: 165 / 164; object-fit: cover; }
.bio-modal__name { margin: 21.8px 0; font-size: 19px; line-height: 33px; color: var(--blue-700); }
.bio-modal__meta { margin: 0; font-size: 14px; line-height: 33px; }
.bio-modal__meta:first-of-type { padding-bottom: 14px; }
.bio-modal__text p { margin: 0 0 18px; font-size: 18px; line-height: 33px; }
.bio-modal__text p:last-child { margin-bottom: 0; }
body.modal-open { overflow: hidden; }

@media (max-width: 980px) {
    .bio-modal { width: 74.5%; max-width: none; height: 100vh; max-height: 100vh; padding: 50px 0; }
    .bio-modal__grid { width: 78%; grid-template-columns: 1fr; row-gap: 0; }
}
@media (max-width: 767px) {
    .bio-modal { width: calc((100% - 40px) * .95); height: min(600px, 100vh); max-height: min(600px, 100vh); }
    .bio-modal__grid { width: 80%; }
    .bio-modal__aside img { width: 70%; }
}

/* Team cards: live's Divi team members sit at scale(1.01) and grow to 1.02 on hover (300ms) */
.team-card { transform: scale(1.01); transition: transform 300ms; }
.team-card:hover { transform: scale(1.02); }
.team-card:has(.bio-link) { cursor: pointer; }   /* whole card opens the bio, like live */

/* BOLDEN-744: phones — every team card the same size (live made the Paralel cards 65% wide,
   so they were narrower than the SRH cards above). Full row width, square photos, same padding. */
@media (max-width: 767px) {
    .team-grid--3 { width: var(--row-width); }
    .team-grid--3 .team-card { margin-inline: -1px -2px; }
    .team-card--md .team-card__media img,
    .team-card--sq .team-card__media img { height: auto; aspect-ratio: 1 / 1; }
    .team-grid--4 .team-card__body,
    .team-grid--3 .team-card__body { padding: 3%; }
}
