/* Team page: groups of member cards - the card itself uses the theme's .team-wrapper3 */

.team-page__intro {
    max-width: 820px;
    margin-bottom: 50px;
}

.team-page__group + .team-page__group {
    margin-top: 90px;
}

.team-page__head {
    margin-bottom: 40px;
}

.team-page__head .section-title {
    margin-bottom: 10px;
}

.team-page__team-intro {
    max-width: 820px;
    margin: 0;
}

.team-wrapper3 .image-area img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 6;
    object-fit: cover;
}

.team-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 5 / 6;
    font-size: 72px;
    color: var(--primary-300, #66C2E6);
    background: var(--primary-50, #E6F5FB);
}

/* The theme only styles the name as a link; here it is plain text */
.team-wrapper3 .image-area .content-area {
    max-width: calc(100% - 40px);
}

.team-wrapper3 .image-area .content-area .text .title {
    color: var(--color-white);
    font-size: 24px;
    line-height: 1.2;
}

/* Name and role appear on hover; keep them visible for keyboard users and on touch screens */
.team-wrapper3:focus-within .image-area::after {
    bottom: 0;
}

.team-wrapper3:focus-within .image-area .content-area {
    opacity: 1;
    bottom: 30px;
}

@media (hover: none) {
    .team-wrapper3 .image-area::after {
        bottom: 0;
    }

    .team-wrapper3 .image-area .content-area {
        opacity: 1;
        bottom: 30px;
    }
}

/* Whole card links to the member's profile; social icons stay clickable above it */
.team-card__link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.team-card__link:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: -6px;
}

.team-wrapper3 .image-area .content-area {
    z-index: 3;
    pointer-events: none;
}

.team-wrapper3 .image-area .content-area .social-wrapper a {
    pointer-events: auto;
}

.team-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
}

/* Profile page */
.team-profile {
    padding: 80px 0 100px;
}

.team-profile__photo {
    overflow: hidden;
    border-radius: 12px;
}

.team-profile__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 6;
    object-fit: cover;
}

.team-profile__contact {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.team-profile__contact li {
    margin: 0;
    border-bottom: 1px solid var(--color-border, #E2E6EE);
}

.team-profile__contact a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--color-heading, inherit);
    word-break: break-word;
}

.team-profile__contact a:hover {
    color: var(--color-primary);
}

.team-profile__contact i {
    width: 20px;
    text-align: center;
    color: var(--color-primary);
}

.team-profile__team {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.team-profile__name {
    margin: 0 0 6px;
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.2;
}

.team-profile__role {
    margin: 0 0 28px;
    font-size: 18px;
    color: var(--color-body);
}

.team-profile__lead {
    margin: 0 0 24px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--color-heading, inherit);
}

.team-profile__empty {
    color: var(--color-body);
}

.team-profile__back {
    margin-top: 40px;
}

.team-profile__more {
    margin-top: 90px;
    padding-top: 60px;
    border-top: 1px solid var(--color-border, #E2E6EE);
}

.team-profile__more-title {
    margin-bottom: 32px;
    font-size: clamp(24px, 3vw, 32px);
}

.colleague-card {
    display: block;
    color: inherit;
}

.colleague-card__photo {
    display: block;
    overflow: hidden;
    margin-bottom: 14px;
    border-radius: 10px;
}

.colleague-card__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.colleague-card:hover .colleague-card__photo img {
    transform: scale(1.04);
}

.colleague-card__name {
    display: block;
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-heading, inherit);
}

.colleague-card:hover .colleague-card__name {
    color: var(--color-primary);
}

.colleague-card__role {
    display: block;
    font-size: 14px;
    color: var(--color-body);
}

@media (max-width: 767px) {
    .team-profile {
        padding: 48px 0 64px;
    }

    .team-profile__more {
        margin-top: 56px;
        padding-top: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .colleague-card__photo img {
        transition: none;
    }
}
