/* Meet our team — public hierarchy */
.our-team-page {
    padding-bottom: 3rem;
}

.our-team-page--member {
    padding-bottom: 1.5rem;
}

.our-team-page--member .our-team-hero {
    margin-top: 0;
}

.our-team-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0047ab 55%, #1eb53a 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 71, 171, 0.2);
}

.our-team-hero h3 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.our-team-hero p {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0;
}

.our-team-empty {
    border-radius: 12px;
    text-align: center;
    padding: 2rem;
}

/* Organisation chart — pyramid / reporting lines */
.org-chart-scroll {
    overflow-x: auto;
    padding: 1.75rem 0.75rem 2rem;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 72%);
    border: 1px solid rgba(0, 71, 171, 0.08);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.org-chart {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.org-chart--roots {
    padding-top: 0;
}

.org-chart--roots,
.org-chart--roots > .org-chart__item {
    width: 100%;
}

.org-chart ul {
    position: relative;
    padding-top: 1.75rem;
    margin: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    row-gap: 1.25rem;
}

.org-chart li.org-chart__item + li.org-chart__item {
    margin-top: 0;
}

.org-chart__item {
    position: relative;
    text-align: center;
    list-style: none;
    padding: 1.25rem 0.65rem 0;
    flex: 0 0 auto;
}

/* Short stem above each card. Rows wrap, so a single rail between siblings would break. */
.org-chart__item::before,
.org-chart__item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 1.25rem;
    background: rgba(0, 71, 171, 0.45);
    transform: translateX(-50%);
}

.org-chart__item::before {
    display: none;
}

/* Vertical line from parent down to sibling row */
.org-chart ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2rem;
    background: rgba(0, 71, 171, 0.45);
}

.org-chart--roots > .org-chart__item::before,
.org-chart--roots > .org-chart__item::after {
    display: none;
}

.org-chart--roots > .org-chart__item {
    padding-top: 0;
}

.org-chart__node {
    display: inline-flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.our-team-card {
    background: #fff;
    border: 1px solid rgba(0, 71, 171, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 35, 70, 0.08);
    width: 236px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

button.our-team-card {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    background: #fff;
    width: 236px;
    margin: 0;
    line-height: inherit;
}

.our-team-card:hover,
.our-team-card:focus {
    transform: translateY(-4px);
    border-color: rgba(0, 71, 171, 0.35);
    box-shadow: 0 14px 32px rgba(0, 71, 171, 0.16);
    outline: none;
}

.our-team-card:focus-visible {
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 71, 171, 0.55), 0 14px 32px rgba(0, 71, 171, 0.16);
}

.our-team-card--chair,
button.our-team-card.our-team-card--chair {
    width: 264px;
    border-color: rgba(30, 181, 58, 0.5);
    box-shadow: 0 10px 28px rgba(30, 181, 58, 0.16);
}

.our-team-card--leadership {
    border-color: rgba(0, 71, 171, 0.28);
}

.our-team-card__photo-wrap {
    background: linear-gradient(180deg, #f7f9fc 0%, #e7eef8 100%);
    padding: 1.15rem 1rem 0.35rem;
}

.our-team-card__photo {
    width: 152px;
    height: 152px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.16), 0 8px 18px rgba(15, 35, 70, 0.12);
}

.our-team-card--chair .our-team-card__photo {
    width: 172px;
    height: 172px;
    box-shadow: 0 0 0 3px rgba(30, 181, 58, 0.55), 0 10px 20px rgba(15, 35, 70, 0.14);
}

.our-team-card__photo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d0dae8;
    color: #5a6c7d;
    font-size: 2.5rem;
}

.our-team-card__body {
    padding: 0.85rem 0.9rem 1.05rem;
}

.our-team-card__name {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 0.4rem;
    line-height: 1.25;
}

.our-team-card__position {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #eef3fb;
    color: #1e3a5f;
    font-size: 0.78rem;
    line-height: 1.35;
}

.our-team-card--chair .our-team-card__position {
    background: rgba(30, 181, 58, 0.12);
    color: #146b24;
}

.our-team-card__period {
    margin: 0.45rem 0 0;
    color: #5a6c7d;
    font-size: 0.78rem;
    line-height: 1.35;
}

.our-team-card__hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0047ab;
}

.our-team-dialog[hidden] {
    display: none !important;
}

.our-team-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.our-team-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 48, 0.55);
}

.our-team-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 28, 48, 0.28);
    text-align: center;
}

.our-team-dialog__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(15, 28, 48, 0.12);
    cursor: pointer;
}

.our-team-dialog__portrait {
    position: relative;
    padding: 0;
    background: transparent;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    line-height: 0;
}

.our-team-dialog__photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.our-team-dialog__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 168px;
    max-height: none;
    background: linear-gradient(135deg, #1e3a5f 0%, #0047ab 58%, #1eb53a 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 3.5rem;
    line-height: 1;
}

.our-team-dialog__body {
    padding: 1.25rem 1.5rem 0.5rem;
}

.our-team-dialog__name {
    margin: 0 0 0.45rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e3a5f;
}

.our-team-dialog__period {
    margin: -0.25rem 0 0.9rem;
    color: #5a6c7d;
    font-size: 0.95rem;
}

.our-team-dialog__period[hidden] {
    display: none !important;
}

.our-team-dialog__position {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #eef3fb;
    color: #1e3a5f;
    font-weight: 600;
}

.our-team-dialog__bio {
    white-space: pre-wrap;
    color: #243044;
    line-height: 1.65;
    text-align: left;
    margin: 0;
    padding: 0.9rem 1rem;
    background: #f7f9fc;
    border-radius: 14px;
}

.our-team-dialog__bio.is-empty {
    text-align: center;
    color: #5a6c7d;
    font-style: italic;
    background: transparent;
    padding-top: 0.25rem;
}

.our-team-dialog__footer {
    display: flex;
    justify-content: flex-start;
    padding: 0.85rem 1.5rem 1.25rem;
}

.our-team-dialog__done {
    border: 0;
    border-radius: 10px;
    background: #e8eef8;
    color: #1e3a5f;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
}

.our-team-dialog__done:hover,
.our-team-dialog__close:hover {
    filter: brightness(0.96);
}

body.our-team-dialog-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .org-chart__item {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .our-team-card,
    button.our-team-card {
        width: 210px;
    }

    .our-team-card__photo,
    .our-team-card--chair .our-team-card__photo {
        width: 136px;
        height: 136px;
    }

    .our-team-card--chair,
    button.our-team-card.our-team-card--chair {
        width: 228px;
    }

    .our-team-dialog__name {
        font-size: 1.25rem;
    }
}
