/* ==========================================================
   IBLA OUR TEAM PAGE
   Dedicated styles — scoped to .team-page
   ========================================================== */

.team-page {
    background: #ffffff;
}

.team-page .eyebrow,
.team-page .team-breadcrumbs {
    font-family: var(--font-ui);
}

/* Hero */

.team-page .team-hero {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-950);
}

.team-page .team-hero-media,
.team-page .team-hero-overlay {
    position: absolute;
    inset: 0;
}

.team-page .team-hero-media {
    z-index: -3;
}

.team-page .team-hero-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 47%;
}

.team-page .team-hero-overlay {
    z-index: -2;
    background:
        linear-gradient(
            90deg,
            rgba(4, 18, 38, 0.96) 0%,
            rgba(4, 18, 38, 0.9) 30%,
            rgba(4, 18, 38, 0.52) 58%,
            rgba(4, 18, 38, 0.12) 100%
        ),
        linear-gradient(
            180deg,
            rgba(4, 18, 38, 0.12),
            rgba(4, 18, 38, 0.22)
        );
}

.team-page .team-hero-layout {
    min-height: 540px;
    display: flex;
    align-items: center;
    padding-block: 66px;
}

.team-page .team-hero-content {
    width: min(100%, 720px);
    color: #ffffff;
}

.team-page .team-breadcrumbs {
    margin-bottom: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 11px;
    font-weight: 600;
}

.team-page .team-breadcrumbs a {
    color: var(--gold-400);
    text-decoration: none;
}

.team-page .team-breadcrumbs a:hover {
    color: #ffffff;
}

.team-page .team-hero .eyebrow {
    margin-bottom: 16px;
    color: var(--gold-400);
}

.team-page .team-hero h1 {
    max-width: 720px;
    margin: 0 0 22px;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(54px, 5.2vw, 78px);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: -0.025em;
}

.team-page .team-hero h1 span {
    display: block;
    color: #ffffff;
}

.team-page .team-hero-introduction {
    max-width: 610px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.68;
}

/* Introduction */

.team-page .team-introduction-section {
    padding-block: 80px;
    background: #ffffff;
}

.team-page .team-introduction-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 90px;
}

.team-page .team-introduction-heading h2 {
    max-width: 620px;
    margin: 0;
    color: var(--navy-900);
    font-family: var(--font-display);
    font-size: clamp(42px, 4vw, 62px);
    font-weight: 600;
    line-height: 1;
}

.team-page .team-introduction-heading h2 span {
    display: block;
    color: var(--gold-600);
}

.team-page .team-introduction-copy {
    padding-top: 25px;
}

.team-page .team-introduction-copy p {
    margin: 0;
    color: #526176;
    font-size: 16px;
    line-height: 1.75;
}

.team-page .team-introduction-copy p + p {
    margin-top: 18px;
}

/* Shared section headings */

.team-page .team-section-heading {
    max-width: 870px;
    margin-bottom: 42px;
}

.team-page .team-section-heading-centred {
    margin-inline: auto;
    text-align: center;
}

.team-page .team-section-heading h2 {
    margin: 0 0 16px;
    color: var(--navy-900);
    font-family: var(--font-display);
    font-size: clamp(42px, 3.8vw, 58px);
    font-weight: 600;
    line-height: 1;
}

.team-page .team-section-heading > p:last-child {
    max-width: 760px;
    margin: 0;
    color: #5c697b;
    font-size: 15px;
    line-height: 1.68;
}

.team-page .team-section-heading-centred > p:last-child {
    margin-inline: auto;
}

/* Executive directory */

.team-page .team-directory-section {
    padding-block: 84px;
    background:
        linear-gradient(180deg, #f8f9fb 0%, #ffffff 100%);
}

.team-page .team-executive-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.team-page .team-profile-card {
    position: relative;
    min-width: 0;
    min-height: 326px;
    padding: 28px 18px 23px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(10, 31, 60, 0.11);
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 10px 26px rgba(10, 31, 60, 0.045);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.team-page .team-profile-card:hover {
    transform: translateY(-4px);
    border-color: rgba(211, 155, 24, 0.45);
    box-shadow: 0 18px 38px rgba(10, 31, 60, 0.1);
}

.team-page .team-profile-featured {
    border-color: rgba(211, 155, 24, 0.46);
    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(211, 155, 24, 0.11),
            transparent 39%
        ),
        #ffffff;
}

.team-page .team-profile-label {
    position: absolute;
    top: 0;
    left: 16px;
    padding: 7px 12px;
    color: #ffffff;
    border-radius: 0 0 7px 7px;
    background: var(--gold-600);
    font-family: var(--font-ui);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.team-page .team-profile-photo,
.team-page .team-operation-photo {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--gold-400);
    border: 2px solid rgba(211, 155, 24, 0.45);
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 24%,
            rgba(255, 255, 255, 0.1),
            transparent 30%
        ),
        var(--navy-900);
    font-family: var(--font-display);
    line-height: 1;
}

.team-page .team-profile-photo {
    width: 122px;
    height: 122px;
    margin-bottom: 24px;
    font-size: 34px;
}

.team-page .team-profile-photo img,
.team-page .team-operation-photo img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    border-radius: inherit;
    background: #e9edf2;
}

.team-page .team-profile-fallback {
    position: relative;
    z-index: 1;
}

.team-page .team-profile-photo img[src] + .team-profile-fallback,
.team-page .team-operation-photo img[src] + .team-profile-fallback {
    visibility: hidden;
}

.team-page .team-profile-initials span {
    position: relative;
    z-index: 1;
}

.team-page .team-profile-copy {
    width: 100%;
    min-width: 0;
}

.team-page .team-profile-copy h3,
.team-page .team-operation-card h3 {
    margin: 0;
    color: var(--navy-900);
    font-family: var(--font-display);
    font-weight: 600;
}

.team-page .team-profile-copy h3 {
    font-size: 23px;
    line-height: 1.06;
}

.team-page .team-profile-copy p,
.team-page .team-operation-card p {
    color: #536174;
    font-family: var(--font-body);
}

.team-page .team-profile-copy p {
    max-width: 210px;
    margin: 10px auto 0;
    font-size: 12.5px;
    line-height: 1.55;
}

.team-page .team-profile-copy::after {
    content: "";
    width: 28px;
    height: 2px;
    margin: 17px auto 0;
    display: block;
    background: var(--gold-500);
}

/* Operations */

.team-page .team-operations-section {
    padding-block: 80px;
    background: #ffffff;
}

.team-page .team-operations-grid {
    width: min(100%, 1040px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.team-page .team-operation-card {
    min-width: 0;
    min-height: 178px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(10, 31, 60, 0.11);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(10, 31, 60, 0.05);
}

.team-page .team-operation-photo {
    width: 88px;
    height: 88px;
    min-width: 88px;
    font-size: 27px;
}

.team-page .team-operation-card > div:last-child {
    min-width: 0;
}

.team-page .team-operation-card h3 {
    font-size: 22px;
    line-height: 1.08;
}

.team-page .team-operation-card p {
    margin: 9px 0 0;
    font-size: 13px;
    line-height: 1.5;
}

.team-page .team-operation-card p::after {
    content: "";
    width: 26px;
    height: 2px;
    margin-top: 13px;
    display: block;
    background: var(--gold-500);
}

/* Expertise */

.team-page .team-expertise-section {
    padding-block: 80px;
    background: #f7f8fa;
}

.team-page .team-expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.team-page .team-expertise-card {
    min-width: 0;
    min-height: 260px;
    padding: 30px 23px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(10, 31, 60, 0.1);
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
}

.team-page .team-expertise-icon {
    width: 78px;
    height: 78px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
}

.team-page .team-expertise-icon img {
    width: 78px;
    height: 78px;
    display: block;
}

.team-page .team-expertise-card h3 {
    margin: 0 0 12px;
    color: var(--navy-900);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.05;
}

.team-page .team-expertise-card p {
    margin: 0;
    color: #5c697b;
    font-size: 13px;
    line-height: 1.6;
}

/* Working principles */

.team-page .team-principles-section {
    padding-block: 80px;
    background: #ffffff;
}

.team-page .team-principles-panel {
    overflow: hidden;
    border: 1px solid rgba(10, 31, 60, 0.1);
    border-radius: 22px;
    background:
        linear-gradient(145deg, #f8fafc, #ffffff);
    box-shadow: 0 18px 48px rgba(10, 31, 60, 0.065);
}

.team-page .team-principles-heading {
    padding: 35px 35px 25px;
    text-align: center;
}

.team-page .team-principles-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-family: var(--font-display);
    font-size: clamp(38px, 3vw, 50px);
    font-weight: 600;
    line-height: 1;
}

.team-page .team-principles-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(10, 31, 60, 0.08);
}

.team-page .team-principles-grid article {
    min-width: 0;
    min-height: 222px;
    padding: 27px 18px;
    text-align: center;
    border-right: 1px solid rgba(10, 31, 60, 0.08);
}

.team-page .team-principles-grid article:last-child {
    border-right: 0;
}

.team-page .team-principles-grid article > span {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
}

.team-page .team-principles-grid img {
    width: 52px;
    height: 52px;
    display: block;
}

.team-page .team-principles-grid h3 {
    margin: 0 0 9px;
    color: var(--navy-900);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.team-page .team-principles-grid p {
    margin: 0;
    color: #5d6a7b;
    font-size: 12px;
    line-height: 1.55;
}

/* CTA */

.team-page .team-cta-section {
    padding-block: 0 80px;
    background: #ffffff;
}

.team-page .team-cta-panel {
    min-height: 245px;
    padding: 45px 50px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 60px;
    color: #ffffff;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(211, 155, 24, 0.18),
            transparent 34%
        ),
        linear-gradient(130deg, var(--navy-950), var(--navy-900));
    box-shadow: 0 25px 60px rgba(4, 18, 38, 0.18);
}

.team-page .team-cta-panel .eyebrow {
    color: var(--gold-400);
}

.team-page .team-cta-panel h2 {
    max-width: 750px;
    margin: 0 0 13px;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 600;
    line-height: 0.98;
}

.team-page .team-cta-panel h2 span {
    display: block;
    color: var(--gold-400);
}

.team-page .team-cta-panel > div:first-child > p:last-child {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.65;
}

.team-page .team-cta-actions {
    min-width: 220px;
    display: grid;
    gap: 12px;
}

.team-page .team-cta-actions .button {
    width: 100%;
    min-height: 47px;
    justify-content: center;
}

.team-page .team-cta-actions .button-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.48);
    background: transparent;
}

/* Standard desktop browser-fit */

@media (min-width: 1021px) and (max-height: 850px) {
    .team-page .team-hero,
    .team-page .team-hero-layout {
        min-height: 470px;
    }

    .team-page .team-hero-layout {
        padding-block: 48px;
    }

    .team-page .team-breadcrumbs {
        margin-bottom: 24px;
    }

    .team-page .team-hero h1 {
        font-size: clamp(50px, 4.6vw, 66px);
    }

    .team-page .team-introduction-section,
    .team-page .team-directory-section,
    .team-page .team-operations-section,
    .team-page .team-expertise-section,
    .team-page .team-principles-section {
        padding-block: 64px;
    }

    .team-page .team-cta-section {
        padding-bottom: 64px;
    }

    .team-page .team-profile-card {
        min-height: 300px;
        padding-top: 24px;
    }

    .team-page .team-profile-photo {
        width: 108px;
        height: 108px;
        margin-bottom: 19px;
    }

    .team-page .team-expertise-card {
        min-height: 235px;
        padding-block: 25px;
    }

    .team-page .team-principles-grid article {
        min-height: 195px;
        padding-block: 23px;
    }
}

/* Medium desktop and tablet */

@media (max-width: 1180px) {
    .team-page .team-executive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-page .team-profile-card {
        min-height: 315px;
    }

    .team-page .team-profile-card:nth-child(4),
    .team-page .team-profile-card:nth-child(5) {
        grid-column: span 1;
    }

    .team-page .team-expertise-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-page .team-principles-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-page .team-principles-grid article {
        border-bottom: 1px solid rgba(10, 31, 60, 0.08);
    }

    .team-page .team-principles-grid article:nth-child(3) {
        border-right: 0;
    }

    .team-page .team-principles-grid article:nth-child(4),
    .team-page .team-principles-grid article:nth-child(5) {
        border-bottom: 0;
    }
}

@media (max-width: 1020px) {
    .team-page .team-hero,
    .team-page .team-hero-layout {
        min-height: 510px;
    }

    .team-page .team-hero-media img {
        object-position: 62% center;
    }

    .team-page .team-hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(4, 18, 38, 0.96) 0%,
                rgba(4, 18, 38, 0.84) 48%,
                rgba(4, 18, 38, 0.28) 100%
            );
    }

    .team-page .team-introduction-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .team-page .team-introduction-copy {
        padding-top: 0;
    }

    .team-page .team-operations-grid {
        grid-template-columns: 1fr;
    }

    .team-page .team-operation-card {
        min-height: 150px;
    }

    .team-page .team-cta-panel {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .team-page .team-cta-actions {
        width: min(100%, 470px);
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 700px) {
    .team-page .team-hero {
        min-height: 540px;
    }

    .team-page .team-hero-layout {
        min-height: 540px;
        padding-block: 44px 38px;
        align-items: flex-start;
    }

    .team-page .team-hero-media img {
        object-position: 64% center;
    }

    .team-page .team-hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(4, 18, 38, 0.95) 0%,
                rgba(4, 18, 38, 0.8) 66%,
                rgba(4, 18, 38, 0.42) 100%
            ),
            linear-gradient(
                180deg,
                rgba(4, 18, 38, 0.08),
                rgba(4, 18, 38, 0.6)
            );
    }

    .team-page .team-breadcrumbs {
        margin-bottom: 28px;
        font-size: 10px;
    }

    .team-page .team-hero h1 {
        max-width: 330px;
        font-size: clamp(43px, 13vw, 56px);
        line-height: 0.98;
    }

    .team-page .team-hero-introduction {
        max-width: 330px;
        font-size: 14px;
        line-height: 1.62;
    }

    .team-page .team-introduction-section,
    .team-page .team-directory-section,
    .team-page .team-operations-section,
    .team-page .team-expertise-section,
    .team-page .team-principles-section {
        padding-block: 58px;
    }

    .team-page .team-introduction-heading h2,
    .team-page .team-section-heading h2 {
        font-size: 39px;
    }

    .team-page .team-introduction-copy p,
    .team-page .team-section-heading > p:last-child {
        font-size: 14px;
    }

    .team-page .team-section-heading {
        margin-bottom: 30px;
    }

    .team-page .team-executive-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .team-page .team-profile-card {
        min-height: 0;
        padding: 19px 17px;
        flex-direction: row;
        align-items: center;
        gap: 17px;
        text-align: left;
    }

    .team-page .team-profile-label {
        left: auto;
        right: 14px;
        font-size: 7px;
    }

    .team-page .team-profile-photo {
        width: 84px;
        height: 84px;
        min-width: 84px;
        margin: 0;
        font-size: 24px;
    }

    .team-page .team-profile-copy p {
        max-width: none;
        margin-inline: 0;
    }

    .team-page .team-profile-copy::after {
        margin-inline: 0;
    }

    .team-page .team-operation-card {
        min-height: 124px;
        padding: 18px 17px;
        gap: 15px;
    }

    .team-page .team-operation-photo {
        width: 74px;
        height: 74px;
        min-width: 74px;
        font-size: 23px;
    }

    .team-page .team-operation-card h3 {
        font-size: 20px;
    }

    .team-page .team-expertise-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .team-page .team-expertise-card {
        min-height: 0;
        padding: 24px 20px;
    }

    .team-page .team-principles-heading {
        padding: 28px 20px 20px;
    }

    .team-page .team-principles-heading h2 {
        font-size: 36px;
    }

    .team-page .team-principles-grid {
        grid-template-columns: 1fr;
    }

    .team-page .team-principles-grid article {
        min-height: 0;
        padding: 21px 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(10, 31, 60, 0.08);
    }

    .team-page .team-principles-grid article:nth-child(4) {
        border-bottom: 1px solid rgba(10, 31, 60, 0.08);
    }

    .team-page .team-principles-grid article:last-child {
        border-bottom: 0;
    }

    .team-page .team-cta-section {
        padding-bottom: 58px;
    }

    .team-page .team-cta-panel {
        min-height: 0;
        padding: 32px 23px;
        border-radius: 18px;
    }

    .team-page .team-cta-panel h2 {
        font-size: 39px;
    }

    .team-page .team-cta-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .team-page .team-hero h1 {
        font-size: 40px;
    }

    .team-page .team-introduction-heading h2,
    .team-page .team-section-heading h2,
    .team-page .team-cta-panel h2 {
        font-size: 35px;
    }

    .team-page .team-profile-card {
        padding: 17px 14px;
        gap: 13px;
    }

    .team-page .team-profile-photo {
        width: 72px;
        height: 72px;
        min-width: 72px;
        font-size: 21px;
    }

    .team-page .team-profile-copy h3 {
        font-size: 21px;
    }

    .team-page .team-profile-copy p {
        font-size: 11.5px;
    }

    .team-page .team-operation-card {
        padding-inline: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-page .team-profile-card {
        transition: none;
    }
}

/* ==========================================================
   IBLA OUR TEAM MOBILE POLISH V1
   Mobile-only contrast, composition and browser-fit refinement
   ========================================================== */

@media (max-width: 700px) {
    /*
     * Strengthen the hero contrast with a neutral navy overlay.
     * The image remains visible but no longer competes with the copy.
     */
    .team-page .team-hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(4, 18, 38, 0.98) 0%,
                rgba(4, 18, 38, 0.94) 44%,
                rgba(4, 18, 38, 0.78) 72%,
                rgba(4, 18, 38, 0.48) 100%
            ),
            linear-gradient(
                180deg,
                rgba(4, 18, 38, 0.14),
                rgba(4, 18, 38, 0.46)
            );
    }

    /*
     * Move the group further right so the heading receives a
     * calmer and more readable background on narrow screens.
     */
    .team-page .team-hero-media img {
        object-position: 71% center;
    }

    /*
     * Keep the copy readable while slightly reducing the vertical
     * footprint of the hero on a standard mobile viewport.
     */
    .team-page .team-hero,
    .team-page .team-hero-layout {
        min-height: 515px;
    }

    .team-page .team-hero-layout {
        padding-top: 38px;
        padding-bottom: 32px;
    }

    .team-page .team-breadcrumbs {
        margin-bottom: 23px;
    }

    .team-page .team-hero .eyebrow {
        margin-bottom: 12px;
    }

    .team-page .team-hero h1 {
        margin-bottom: 17px;
    }

    /*
     * Tighten spacing between the directory, operations and
     * expertise sections without reducing card readability.
     */
    .team-page .team-directory-section {
        padding-bottom: 50px;
    }

    .team-page .team-operations-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .team-page .team-expertise-section {
        padding-top: 50px;
    }

    .team-page .team-section-heading {
        margin-bottom: 26px;
    }

    .team-page .team-executive-grid,
    .team-page .team-operations-grid,
    .team-page .team-expertise-grid {
        gap: 10px;
    }
}

@media (max-width: 390px) {
    .team-page .team-hero-media img {
        object-position: 74% center;
    }

    .team-page .team-hero,
    .team-page .team-hero-layout {
        min-height: 500px;
    }

    .team-page .team-hero-layout {
        padding-top: 34px;
        padding-bottom: 28px;
    }
}

/* ==========================================================
   IBLA OUR TEAM MOBILE READABILITY V1
   Mobile-only body copy and role-label refinement
   ========================================================== */

@media (max-width: 700px) {
    .team-page .team-hero-introduction {
        font-size: 14.5px;
        line-height: 1.66;
    }

    .team-page .team-introduction-copy p,
    .team-page .team-section-heading > p:last-child {
        font-size: 14.5px;
        line-height: 1.7;
    }

    .team-page .team-profile-copy p {
        font-size: 12.5px;
        line-height: 1.55;
    }

    .team-page .team-operation-card p {
        font-size: 12.5px;
        line-height: 1.55;
    }

    .team-page .team-expertise-card p {
        font-size: 13px;
        line-height: 1.62;
    }

    .team-page .team-principles-grid p {
        font-size: 12.25px;
        line-height: 1.58;
    }

    .team-page .team-cta-panel > div:first-child > p:last-child {
        font-size: 13.5px;
        line-height: 1.65;
    }
}

@media (max-width: 390px) {
    .team-page .team-hero-introduction,
    .team-page .team-introduction-copy p,
    .team-page .team-section-heading > p:last-child {
        font-size: 14px;
    }

    .team-page .team-profile-copy p,
    .team-page .team-operation-card p {
        font-size: 12px;
    }
}

/* ==========================================================
   IBLA OUR TEAM TABLET FIX V3
   Safe 701–1020px layout with strict viewport containment
   ========================================================== */

@media (min-width: 701px) and (max-width: 1020px) {
    .team-page,
    .team-page main,
    .team-page main > section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: clip;
    }

    .team-page main > section > .container {
        width: min(calc(100% - 40px), var(--container));
        max-width: calc(100% - 40px);
        min-width: 0;
        margin-inline: auto;
        box-sizing: border-box;
    }

    .team-page *,
    .team-page *::before,
    .team-page *::after {
        box-sizing: border-box;
    }

    .team-page .team-introduction-section,
    .team-page .team-directory-section,
    .team-page .team-operations-section,
    .team-page .team-expertise-section,
    .team-page .team-principles-section {
        position: relative;
        width: 100%;
        min-height: 0;
        height: auto;
        padding-block: 62px;
        overflow: visible;
    }

    .team-page .team-cta-section {
        width: 100%;
        padding: 0 0 62px;
        overflow: visible;
    }

    .team-page .team-introduction-layout {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .team-page .team-introduction-heading,
    .team-page .team-introduction-copy,
    .team-page .team-section-heading {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
        transform: none;
    }

    .team-page .team-section-heading {
        margin-bottom: 30px;
    }

    .team-page .team-section-heading h2 {
        max-width: 100%;
        font-size: 46px;
        line-height: 1.02;
        overflow-wrap: normal;
    }

    /* Executive leadership: safe two-column flow */

    .team-page .team-executive-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        align-items: stretch;
        gap: 16px;
        overflow: visible;
    }

    .team-page .team-profile-card,
    .team-page .team-profile-card:nth-child(n) {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 300px;
        height: auto;
        grid-column: auto;
        grid-row: auto;
        margin: 0;
        padding: 25px 18px 22px;
        overflow: hidden;
        transform: none;
    }

    .team-page .team-profile-card:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 8px);
        max-width: calc(50% - 8px);
        justify-self: center;
    }

    .team-page .team-profile-photo {
        width: 104px;
        height: 104px;
        min-width: 104px;
        flex: 0 0 104px;
        margin: 0 0 20px;
    }

    .team-page .team-profile-copy {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .team-page .team-profile-copy h3,
    .team-page .team-profile-copy p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    /* Operations: full-width horizontal cards */

    .team-page .team-operations-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .team-page .team-operation-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 126px;
        height: auto;
        padding: 19px 21px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 18px;
        overflow: hidden;
        text-align: left;
    }

    .team-page .team-operation-photo {
        width: 80px;
        height: 80px;
        min-width: 80px;
        flex: 0 0 80px;
    }

    .team-page .team-operation-card > div:last-child {
        width: auto;
        max-width: calc(100% - 98px);
        min-width: 0;
    }

    .team-page .team-operation-card h3,
    .team-page .team-operation-card p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .team-page .team-operation-card p::after {
        margin-inline: 0;
    }

    /* Expertise: safe two-column layout */

    .team-page .team-expertise-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .team-page .team-expertise-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 245px;
        height: auto;
        overflow: hidden;
    }

    /* Principles: two columns plus full-width final item */

    .team-page .team-principles-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        overflow: hidden;
    }

    .team-page .team-principles-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-page .team-principles-grid article,
    .team-page .team-principles-grid article:nth-child(n) {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 185px;
        height: auto;
        grid-column: auto;
        padding: 23px 17px;
        border-right: 1px solid rgba(10, 31, 60, 0.08);
        border-bottom: 1px solid rgba(10, 31, 60, 0.08);
        overflow: hidden;
    }

    .team-page .team-principles-grid article:nth-child(even) {
        border-right: 0;
    }

    .team-page .team-principles-grid article:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }

    /* CTA: contained stacked panel */

    .team-page .team-cta-panel {
        width: min(calc(100% - 40px), var(--container));
        max-width: calc(100% - 40px);
        min-width: 0;
        min-height: 0;
        height: auto;
        margin-inline: auto;
        padding: 38px 34px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 27px;
        overflow: hidden;
        transform: none;
    }

    .team-page .team-cta-panel > div {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
    }

    .team-page .team-cta-panel h2 {
        max-width: 100%;
        font-size: 47px;
        line-height: 1;
        overflow-wrap: normal;
    }

    .team-page .team-cta-actions {
        width: min(100%, 520px);
        max-width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .team-page .site-footer,
    .team-page .footer-main,
    .team-page .footer-bottom {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: relative;
        clear: both;
        transform: none;
    }

    .team-page .footer-main,
    .team-page .footer-bottom {
        width: min(calc(100% - 40px), var(--container));
        max-width: calc(100% - 40px);
        margin-inline: auto;
    }
}
