.wpw-team-showcase-wrap {
    --wpw-team-primary: #123a5d;
    --wpw-team-primary-2: #0c2948;
    --wpw-team-accent: #f4c45f;
    --wpw-team-card-bg: #ffffff;
    --wpw-team-text: #0b3155;
    --wpw-team-muted: #526987;
    --wpw-team-border: #dbe7f3;
    --wpw-team-radius: 26px;
    --wpw-team-padding: 18px;
    --wpw-team-gap: 24px;
    --wpw-team-shadow: 0 22px 55px rgba(14, 47, 77, .13);
    --wpw-team-image-height: 285px;
    --wpw-team-hover-scale: 1.08;
    position: relative;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wpw-team-showcase-wrap *,
.wpw-team-showcase-wrap *:before,
.wpw-team-showcase-wrap *:after {
    box-sizing: border-box;
}

.wpw-team-showcase-grid {
    display: grid;
    grid-template-columns: repeat(var(--wpw-team-cols, 3), minmax(0, 1fr));
    gap: var(--wpw-team-gap);
}

.wpw-team-showcase-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wpw-team-border);
    border-radius: var(--wpw-team-radius);
    background: var(--wpw-team-card-bg);
    box-shadow: var(--wpw-team-shadow);
    cursor: pointer;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease;
    isolation: isolate;
}

.wpw-team-showcase-card:before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -68px;
    bottom: -78px;
    border-radius: 50%;
    background: rgba(244, 196, 95, .17);
    z-index: -1;
}

.wpw-team-showcase-card:hover,
.wpw-team-showcase-card:focus-visible {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--wpw-team-primary) 34%, var(--wpw-team-border));
    box-shadow: 0 32px 70px rgba(14, 47, 77, .18);
    outline: 0;
}

.wpw-team-card-image {
    position: relative;
    height: var(--wpw-team-image-height);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef5fc, #fff7e5);
}

.wpw-team-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .42s cubic-bezier(.2, .8, .2, 1);
}

.wpw-team-showcase-card:hover .wpw-team-card-image img,
.wpw-team-showcase-card:focus-visible .wpw-team-card-image img {
    transform: scale(var(--wpw-team-hover-scale));
}

.wpw-team-card-image > span,
.wpw-team-profile-image > span {
    width: 98px;
    height: 98px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--wpw-team-primary), var(--wpw-team-primary-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.wpw-team-card-image em {
    position: absolute;
    left: 18px;
    top: 18px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--wpw-team-accent);
    color: var(--wpw-team-primary-2);
    font-size: 12px;
    font-weight: 950;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: .04em;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .12);
}

.wpw-team-card-content {
    padding: var(--wpw-team-padding);
}

.wpw-team-card-content small {
    display: block;
    margin: 0 0 7px;
    color: var(--wpw-team-muted);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 900;
}

.wpw-team-card-content h3 {
    margin: 0 0 10px;
    color: var(--wpw-team-text);
    font-size: 24px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.05em;
}

.wpw-team-card-content p {
    margin: 0 0 16px;
    color: var(--wpw-team-muted);
    font-size: 15px;
    line-height: 1.65;
}

.wpw-team-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 15px;
}

.wpw-team-socials a {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef6ff;
    color: var(--wpw-team-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 950;
    transition: transform .22s ease, background .22s ease, color .22s ease;
}

.wpw-team-socials a:hover,
.wpw-team-socials a:focus {
    transform: translateY(-2px);
    background: var(--wpw-team-primary);
    color: #fff;
}

.wpw-team-view-btn {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--wpw-team-primary), #215681);
    color: #fff;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(18, 58, 93, .19);
}

.wpw-team-no-members {
    padding: 30px;
    border: 1px dashed var(--wpw-team-border);
    border-radius: var(--wpw-team-radius);
    background: #fff;
    color: var(--wpw-team-text);
    text-align: center;
}

.wpw-team-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wpw-team-modal.is-open {
    display: flex;
}

.wpw-team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 27, 47, .72);
    backdrop-filter: blur(9px);
}

.wpw-team-modal-dialog {
    position: relative;
    width: min(940px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .32);
    border: 1px solid rgba(255, 255, 255, .22);
    animation: wpwTeamPopup .24s ease both;
}

@keyframes wpwTeamPopup {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wpw-team-modal-close {
    position: absolute;
    right: 20px;
    top: 18px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: var(--wpw-team-accent);
    color: var(--wpw-team-primary-2);
    font-size: 30px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
}

.wpw-team-profile {
    display: grid;
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1.4fr);
    gap: 0;
    min-height: 500px;
}

.wpw-team-profile-left {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, var(--wpw-team-primary), var(--wpw-team-primary-2));
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
}

.wpw-team-profile-left:before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -80px;
    top: -70px;
    border-radius: 50%;
    background: rgba(244, 196, 95, .28);
    z-index: -1;
}

.wpw-team-profile-image {
    width: 100%;
    aspect-ratio: 1/1.05;
    overflow: hidden;
    border-radius: 26px;
    background: #eef5fc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
}

.wpw-team-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpw-team-profile-socials {
    margin: 20px 0 0;
}

.wpw-team-profile-socials a {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.wpw-team-profile-socials a:hover {
    background: var(--wpw-team-accent);
    color: var(--wpw-team-primary-2);
}

.wpw-team-profile-info {
    padding: 54px 46px 42px;
}

.wpw-team-profile-info > span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--wpw-team-accent);
    color: var(--wpw-team-primary-2);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.wpw-team-profile-info h2 {
    margin: 17px 0 7px;
    color: var(--wpw-team-text);
    font-size: clamp(34px, 4vw, 54px);
    line-height: .95;
    letter-spacing: -.07em;
    font-weight: 950;
}

.wpw-team-profile-info h4 {
    margin: 0 0 22px;
    color: var(--wpw-team-muted);
    font-size: 18px;
    font-weight: 900;
}

.wpw-team-profile-description {
    color: var(--wpw-team-muted);
    font-size: 16px;
    line-height: 1.75;
}

.wpw-team-profile-description p:first-child {
    margin-top: 0;
}

.wpw-team-contact-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.wpw-team-contact-list a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 15px;
    border-radius: 15px;
    background: #f4f8fc;
    color: var(--wpw-team-primary);
    text-decoration: none;
    font-weight: 900;
}

@media (max-width: 1024px) {
    .wpw-team-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .wpw-team-showcase-grid {
        grid-template-columns: 1fr;
    }

    .wpw-team-profile {
        grid-template-columns: 1fr;
    }

    .wpw-team-profile-left,
    .wpw-team-profile-info {
        padding: 26px;
    }

    .wpw-team-modal {
        padding: 14px;
    }

    .wpw-team-modal-dialog {
        border-radius: 24px;
    }
}

/* Popup layout fix: keep the original look, but center the popup, keep the image at the top,
   and make only the right-side profile content scroll. */
html.wpw-team-modal-active,
html.wpw-team-modal-active body {
    overflow: hidden;
}

.wpw-team-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    align-items: center !important;
    justify-content: center !important;
}

.wpw-team-modal-dialog {
    width: min(940px, calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 48px));
    max-height: min(760px, calc(100dvh - 48px));
    margin: auto;
    overflow: hidden;
}

.wpw-team-modal-body {
    height: 100%;
    max-height: inherit;
    overflow: hidden;
}

.wpw-team-profile {
    height: min(760px, calc(100vh - 48px));
    height: min(760px, calc(100dvh - 48px));
    min-height: 500px;
    max-height: inherit;
    overflow: hidden;
}

.wpw-team-profile-left {
    justify-content: flex-start;
    min-height: 0;
}

.wpw-team-profile-info {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.wpw-team-contact-list-top {
    margin: 14px 0 22px;
}

.wpw-team-contact-list-top + h4 {
    margin-top: 0;
}

@media (max-width: 720px) {
    .wpw-team-modal-dialog {
        width: min(100%, calc(100vw - 28px));
        overflow: auto;
    }

    .wpw-team-modal-body,
    .wpw-team-profile {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .wpw-team-profile {
        min-height: 0;
    }

    .wpw-team-profile-info {
        max-height: none;
        overflow: visible;
    }
}
