.team-directory .team-members-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 26px !important;
    align-items: stretch;
}

.team-directory .team-member-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    height: 100%;
    overflow: hidden !important;
    border: 1px solid #d7e1e8 !important;
    border-radius: 4px;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(7, 54, 93, 0.09) !important;
}

.team-directory .team-photo-wrap {
    position: relative !important;
    display: block !important;
    flex: 0 0 320px !important;
    width: 100% !important;
    height: 320px !important;
    overflow: hidden !important;
    background: #eaf0f4 !important;
}

.team-directory .team-photo-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: top center !important;
}

.team-directory .team-member-copy {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    visibility: visible !important;
    min-height: 210px;
    padding: 22px !important;
    opacity: 1 !important;
    background: #fff !important;
}

.team-directory .team-department-label {
    margin: 0 0 8px;
    color: #b58a3a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.team-directory .team-member-copy h3 {
    display: block !important;
    margin: 0 !important;
    color: #07365d !important;
    font: 25px/1.18 Georgia, serif !important;
}

.team-directory .team-role {
    display: block !important;
    margin: 8px 0 13px !important;
    color: #9d2459 !important;
    font-size: 13px;
    font-weight: 700 !important;
    line-height: 1.45;
}

.team-directory .team-bio {
    display: -webkit-box !important;
    overflow: hidden;
    margin: 0 0 15px;
    color: #607687;
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.team-directory .team-contact {
    margin-top: auto;
}

.team-directory .team-profile-link {
    display: inline-flex !important;
    align-items: center;
    margin-top: 14px;
    color: #075f9c !important;
    font-size: 12px;
    font-weight: 800;
}

.team-directory .profile-photo-cta {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 9px 12px;
    border-radius: 2px;
    background: rgba(7, 54, 93, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .2s ease, transform .2s ease;
}

.team-directory .team-photo-wrap:hover .profile-photo-cta {
    opacity: 1;
    transform: none;
}

.team-directory .support-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.team-directory .support-card .team-photo-wrap {
    flex-basis: 245px !important;
    height: 245px !important;
}

/* Support members are directory entries, not full agent profiles. */
.team-directory .support-grid {
    align-items: start;
}

.team-directory .support-card {
    height: auto !important;
}

.team-directory .support-card .team-member-copy {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 18px 20px 17px !important;
}

.team-directory .support-card .team-role {
    margin-bottom: 0 !important;
}

@media (max-width: 950px) {
    .team-directory .team-members-grid,
    .team-directory .support-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 580px) {
    .team-directory .team-members-grid,
    .team-directory .support-grid {
        grid-template-columns: 1fr !important;
    }

    .team-directory .team-photo-wrap,
    .team-directory .support-card .team-photo-wrap {
        flex-basis: 340px !important;
        height: 340px !important;
    }

    .team-directory .profile-photo-cta {
        opacity: 1;
        transform: none;
    }
}
