/* Team / advisory / working groups pages */
.team-page {
    padding: 3rem 0 5rem;
    background: #ffffff;
}

.team-page-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 2.5rem;
}

.team-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 3.5rem 0 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.team-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.team-card-photo {
    overflow: hidden;
    border-radius: 4px;
    background: #f3f4f6;
    aspect-ratio: 1;
}

.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-card-info {
    background: rgba(var(--nav-cta-rgb, 74, 133, 133), 0.12);
    padding: 1rem 0.75rem;
    margin-top: 0;
}

.team-card--text .team-card-info {
    border-radius: 4px;
    margin-top: 0;
}

.team-card-name {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}

.team-card-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}

/* Working groups */
.team-page--wg {
    background: linear-gradient(180deg, #f0f6f8 0%, #ffffff 38%, #ffffff 100%);
    padding: 3rem 0 4.5rem;
}

.team-page-title--wg {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    color: #0f172a;
    margin-bottom: 0.75rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.team-page-title--wg::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 72px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--nav-cta, #4a8585), transparent);
}

.wg-page-intro {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #475569;
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.wg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem 2rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.wg-card {
    background: #ffffff;
    border: 1px solid rgba(74, 133, 133, 0.14);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 10px 28px rgba(26, 77, 77, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.wg-card:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 133, 133, 0.28);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 18px 40px rgba(26, 77, 77, 0.14);
}

.wg-card-media {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e8eef0;
    text-decoration: none;
}

.wg-card-media--static {
    display: block;
}

.wg-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.wg-card-media-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15, 45, 45, 0.35) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.wg-card:hover .wg-card-media img {
    transform: scale(1.06);
}

.wg-card:hover .wg-card-media-shade {
    opacity: 1;
}

.wg-card-body {
    padding: 1.35rem 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(74, 133, 133, 0.08) 0%, #ffffff 100%);
}

.wg-card-title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.3125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.65rem;
    line-height: 1.3;
}

.wg-card-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #64748b;
    margin: 0 0 1.15rem;
    flex: 1;
}

.wg-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--nav-cta, #4a8585) 0%, #1a4d4d 100%);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.wg-card-cta:hover {
    color: #ffffff;
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(26, 77, 77, 0.35);
}

.wg-card-cta-icon {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.wg-card-cta:hover .wg-card-cta-icon {
    transform: translateX(3px);
}

/* Working group detail (committee) page */
.wg-detail {
    background: #ffffff;
}

.wg-detail-hero {
    position: relative;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.wg-detail-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 45, 45, 0.35) 0%,
        rgba(15, 45, 45, 0.75) 55%,
        rgba(15, 45, 45, 0.92) 100%
    );
}

.wg-detail-hero__inner {
    position: relative;
    z-index: 1;
    padding: 2.5rem 1rem 2.25rem;
    width: 100%;
}

.wg-detail-back {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.wg-detail-back:hover {
    color: #ffffff;
    text-decoration: underline;
}

.wg-detail-hero__title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.wg-detail-body {
    padding: 2.75rem 1rem 4rem;
}

.wg-detail-intro {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
}

.wg-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.75rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.wg-member-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(74, 133, 133, 0.14);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(26, 77, 77, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wg-member-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 16px 36px rgba(26, 77, 77, 0.12);
}

.wg-member-card__photo {
    aspect-ratio: 1;
    background: #e8eef0;
    overflow: hidden;
}

.wg-member-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.wg-member-card__info {
    padding: 1rem 0.85rem 1.15rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(74, 133, 133, 0.18) 0%, rgba(74, 133, 133, 0.08) 100%);
}

.wg-member-card__name {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.wg-member-card__role {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

@media (max-width: 576px) {
    .wg-members-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .wg-detail-hero {
        min-height: 180px;
    }

    .team-page--wg {
        padding: 2rem 0 3.5rem;
    }

    .wg-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .wg-card:hover {
        transform: translateY(-3px);
    }
}

.team-page-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
}

/* Advisory Board — polished cards, same layout */
.team-page--advisory {
    background: linear-gradient(180deg, #f0f6f8 0%, #ffffff 45%, #ffffff 100%);
}

.team-page--advisory .team-page-title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    color: #0f172a;
    margin-bottom: 2.75rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.team-page--advisory .team-page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 72px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--nav-cta, #4a8585), transparent);
}

.team-grid.team-grid--advisory {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    justify-content: center;
    gap: 2rem 2.25rem;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.team-card--advisory {
    width: 100%;
    min-width: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(74, 133, 133, 0.14);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(26, 77, 77, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.team-card--advisory:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 133, 133, 0.28);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 16px 40px rgba(26, 77, 77, 0.14);
}

.team-card--advisory .team-card-photo {
    position: relative;
    width: 100%;
    border-radius: 0;
    background: #e8eef0;
    aspect-ratio: 1;
    overflow: hidden;
}

.team-card--advisory .team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.45s ease;
}

.team-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.15rem;
    background: linear-gradient(
        165deg,
        rgba(15, 45, 45, 0.9) 0%,
        rgba(26, 77, 77, 0.88) 50%,
        rgba(74, 133, 133, 0.85) 100%
    );
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.team-card--advisory:hover .team-card-overlay,
.team-card--advisory:focus-within .team-card-overlay {
    opacity: 1;
    visibility: visible;
}

.team-card--advisory:hover .team-card-photo img {
    transform: scale(1.06);
}

.team-card-overlay__label {
    font-family: 'Inter', sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.team-card-overlay__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.65;
    margin: 0;
    text-align: center;
    max-height: 85%;
    overflow-y: auto;
}

.team-card--advisory .team-card-info {
    background: linear-gradient(180deg, rgba(74, 133, 133, 0.16) 0%, rgba(74, 133, 133, 0.07) 100%);
    padding: 1.1rem 1rem 1.3rem;
    margin-top: 0;
    border-top: none;
}

.team-card--advisory .team-card-name {
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.team-card--advisory .team-card-meta {
    color: var(--nav-cta, #3d6f6f);
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
}

@media (max-width: 992px) {
    .team-grid.team-grid--advisory {
        grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
        gap: 1.5rem;
    }
}

/* Our Team page */
.team-page--our-team {
    background: linear-gradient(180deg, #f0f6f8 0%, #ffffff 42%, #ffffff 100%);
    padding: 3rem 0 4.5rem;
}

.team-page--our-team .team-page-title,
.team-page--our-team .team-section-title--our-team {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    color: #0f172a;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.team-page--our-team .team-page-title {
    margin-bottom: 2.75rem;
}

.team-page--our-team .team-page-title::after,
.team-page--our-team .team-section-title--our-team::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 72px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--nav-cta, #4a8585), transparent);
}

.team-page--our-team .team-section-title--our-team {
    margin: 3.5rem 0 2.25rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.team-grid--our-state {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 1.35rem 1.5rem;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.team-card--our-state {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 148px;
    padding: 1.35rem 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(74, 133, 133, 0.14);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 6px 20px rgba(26, 77, 77, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.team-card--our-state:hover,
.team-card--our-state:focus-within {
    transform: translateY(-4px);
    border-color: rgba(74, 133, 133, 0.28);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 14px 32px rgba(26, 77, 77, 0.12);
}

.team-card-state-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, var(--nav-cta, #4a8585) 0%, #1a4d4d 100%);
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}

.team-card-state-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.85rem;
    border: 2px solid rgba(74, 133, 133, 0.2);
    flex-shrink: 0;
}

.team-card-state-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card--our-state .team-card-info {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.team-card--our-state .team-card-name {
    font-size: 1.0625rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.team-card--our-state .team-card-meta {
    color: var(--nav-cta, #3d6f6f);
    font-weight: 600;
    font-size: 0.8125rem;
    margin: 0;
}

.team-card-state-bio {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(
        165deg,
        rgba(15, 45, 45, 0.92) 0%,
        rgba(26, 77, 77, 0.9) 100%
    );
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.team-card-state-bio p {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.55;
    margin: 0;
    text-align: center;
}

.team-card--our-state:hover .team-card-state-bio,
.team-card--our-state:focus-within .team-card-state-bio {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 576px) {
    .team-page {
        padding: 2rem 0 3.5rem;
    }

    .team-grid--our-state {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .team-card--our-state {
        min-height: 132px;
        padding: 1rem 0.65rem;
    }

    .team-card-state-bio {
        opacity: 1;
        visibility: visible;
        background: linear-gradient(180deg, transparent 25%, rgba(15, 45, 45, 0.92) 100%);
        align-items: flex-end;
        padding-bottom: 0.75rem;
    }

    .team-card-state-bio p {
        font-size: 0.6875rem;
        max-height: 50%;
        overflow-y: auto;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .team-grid.team-grid--advisory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.85rem;
    }

    .team-card--advisory:hover {
        transform: translateY(-3px);
    }

    .team-card-overlay {
        opacity: 1;
        visibility: visible;
        background: linear-gradient(180deg, transparent 30%, rgba(15, 45, 45, 0.92) 100%);
        justify-content: flex-end;
        padding-bottom: 0.85rem;
    }

    .team-card-overlay__label {
        font-size: 0.5625rem;
    }

    .team-card-overlay__text {
        font-size: 0.6875rem;
        line-height: 1.45;
        max-height: 45%;
    }

    .team-card--advisory .team-card-info {
        padding: 0.85rem 0.65rem 1rem;
    }

    .team-card--advisory .team-card-name {
        font-size: 1rem;
    }
}
