/* ============================================================
   Team member detail page (team-detail.php)
   ============================================================ */
.td-section {
    background: #fff;
    padding: 30px 24px 90px;
}

.td-wrap {
    max-width: 1216px;
    margin: 0 auto;
}

/* Back */
.td-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #101828;
    font-family: "Libre Franklin", sans-serif;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 34px;
}

.td-back-ico {
    width: 34px;
    height: 34px;
    border: 1px solid #101828;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #101828;
}

/* Two-column layout: photo + identity on the left, bio on the right */
.td-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 60px;
    align-items: start;
}

.td-photo {
    background: #E4E4E4;
    line-height: 0;
    overflow: hidden;
}

.td-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.td-name {
    font-family: "Gilda Display", serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.22;
    color: #215D98;
    margin: 26px 0 12px;
}

.td-role {
    font-family: "Libre Franklin", sans-serif;
    /* 700 sat heavier than the serif name above it and pulled the eye to
       the designation instead of the person. 500 keeps it clearly the
       subtitle it is. */
    font-weight: 500;
    font-size: 19px;
    line-height: 1.3;
    color: #101828;
    margin: 0 0 8px;
}

.td-email {
    font-family: "Libre Franklin", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: #667085;
    margin: 0;
}

.td-email a {
    color: #667085;
    text-decoration: none;
}

.td-email a:hover {
    color: #215D98;
}

/* Bio */
.td-bio {
    font-family: "Libre Franklin", sans-serif;
    font-size: 16px;
    line-height: 30px;
    color: #475467;
    text-align: justify;
}

.td-bio p {
    margin: 0 0 20px;
}

.td-bio p:last-child {
    margin-bottom: 0;
}

.td-bio ul,
.td-bio ol {
    margin: 0 0 20px;
    padding-left: 22px;
}

.td-bio li {
    margin-bottom: 8px;
}

.td-bio a {
    color: #215D98;
}

.td-bio h3,
.td-bio h4 {
    font-family: "Libre Franklin", sans-serif;
    font-weight: 600;
    color: #101828;
    margin: 26px 0 12px;
    text-align: left;
}

/* Services offered */
.td-services {
    margin-top: 38px;
    padding-top: 28px;
    border-top: 1px solid #E4E7EC;
}

.td-services-label {
    font-family: "Libre Franklin", sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #101828;
    margin: 0 0 14px;
}

.td-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.td-tags span {
    display: inline-flex;
    align-items: center;
    font-family: "Libre Franklin", sans-serif;
    font-size: 13px;
    line-height: 1;
    color: #1C2B40;
    background: #F5F4F0;
    border: 1px solid #E4E7EC;
    border-radius: 100px;
    padding: 9px 16px;
}

/* More from the same designation */
.td-more {
    margin-top: 80px;
    padding-top: 46px;
    border-top: 1px solid #E4E7EC;
}

.td-more-head {
    font-family: "Gilda Display", serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.2;
    color: #101828;
    margin: 0 0 26px;
}

.td-more .ab-member {
    display: block;
    text-decoration: none;
}

/* The photo, name and email stay put while the bio scrolls past them.
   Desktop only — below 901px the grid is one column, where a stuck photo
   would just cover the text. The 100px offset clears the 80px header.
   No height condition here: the card must stay fixed on short laptop
   windows too. If it is ever taller than the window it scrolls inside
   itself, so its lower half can never end up pinned out of reach. */
@media (min-width: 901px) {
    .td-aside {
        position: sticky;
        top: 100px;
        align-self: start;
        max-height: calc(100vh - 120px);
        overflow: auto;
        scrollbar-width: none;
    }

    .td-aside::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 900px) {
    .td-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .td-photo {
        max-width: 340px;
    }

    .td-bio {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .td-section {
        padding: 24px 18px 60px;
    }

    .td-name {
        font-size: 26px;
    }

    .td-more {
        margin-top: 54px;
    }

    .td-more-head {
        font-size: 25px;
    }
}
