/* ==========================================================================
   Our Team (page-our-team.php) — Page-Specific Styles
   ========================================================================== */

/* Tab container — pill style (matches final) */
.team-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 44px;
}
.team-tabs {
    display: inline-flex;
    background: #EEF1F8;
    border-radius: 50px;
    padding: 5px;
    gap: 4px;
}
.team-tab {
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #6E7582;
    padding: 9px 24px;
    border: none;
    background: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.team-tab:hover:not(.active) {
    color: #223763;
    background: none;
    box-shadow: none;
}
.team-tab.active {
    background: #fff;
    color: #223763;
    box-shadow: 0 2px 8px rgba(34, 55, 99, 0.10);
}
.team-tab-title { 
    font: inherit; 
    color: inherit; 
}
.team-tab-count {
    font-size: 10.5px;
    font-weight: 700;
    color: #3864C0;
}

/* Team section */
.team-section {
    padding: 90px 80px;
    background: #F8FAFD;
}

/* Section heading */
.team-heading-wrap {
    text-align: center;
    margin-bottom: 56px;
}
.team-heading-wrap .pa-eyebrow {
    font-size: 11px;
    margin-bottom: 20px;
    display: inline-flex;
}
.team-heading-wrap .pa-eyebrow::after {
    content: '';
    display: inline-block; 
    width: 24px; 
    height: 1px;
    background: #3864C0; 
    flex-shrink: 0;
}
.team-heading {
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 38px; 
    font-weight: 700;
    letter-spacing: -0.025em; 
    line-height: 1.15;
    color: #223763; 
    margin: 0 auto 16px;
}
.team-description {
    font-size: 15px; 
    color: #3F4552;
    line-height: 1.65; 
    margin: 0 auto; 
    max-width: 560px;
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Team card (matches final) */
.team-card {
    background: #fff;
    border: 1px solid #EEF1F8;
    border-radius: 20px;
    padding: 36px 24px 28px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(34, 55, 99, 0.10);
}

.team-card-avatar {
    width: 80px; 
    height: 80px; 
    border-radius: 50%;
    background: linear-gradient(135deg, #3864C0 0%, #223763 100%);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 22px; 
    font-weight: 700; 
    color: #fff;
    margin: 0 auto 18px;
    box-shadow: 0 6px 18px rgba(56,100,192,0.20);
}
.team-card-name {
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: #223763;
    line-height: 1.3;
    display: block;
}
.team-card-role {
    font-size: 12px;
    font-weight: 500;
    color: #6E7582;
    margin: 6px 0 0;
}
.team-card-sub {
    font-size: 11px;
    color: #A0AABB;
    font-style: italic;
    margin: 5px 0 0;
    line-height: 1.4;
}

/* Team panel visibility */
.team-panel {
    display: none;
}
.team-panel.active {
    display: block;
}

/* Responsive team grid */
.resp-team-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ─── Modal (matches final) ──────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 50, 0.55);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.modal-box {
    position: relative;
    background: #fff;
    border-radius: 18px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 36px 36px 32px;
    box-shadow: 0 32px 80px rgba(15, 25, 50, 0.22);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.28s ease;
}
.modal-backdrop.is-open .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close,
.modal-close:focus,
.modal-close:active {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: #F5F7FB;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #223763;
    padding: 0;
    transition: background 0.2s ease;
    box-shadow: none;
}
.modal-close:hover {
    background: #E4EBF8;
    color: #223763;
    box-shadow: none;
}

/* Modal header layout */
.modal-header {
    display: flex; 
    align-items: flex-start; 
    gap: 18px;
}
.modal-avatar {
    width: 64px; height: 64px; 
    border-radius: 50%;
    background: linear-gradient(135deg, #3864C0 0%, #223763 100%);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 20px; 
    font-weight: 700; 
    color: #fff;
    flex-shrink: 0;
    margin-bottom: 16px;
}
.modal-text-wrap {
    flex: 1; 
    padding-top: 4px;
}
.modal-empty-state {
    font-size: 14px; 
    color: #6E7582; 
    font-style: italic;
    margin: 0; 
    line-height: 1.6; 
    display: none;
}
.modal-name {
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #223763;
    margin: 0 0 4px;
    line-height: 1.2;
    padding-right: 25px;
}
.modal-role {
    font-size: 13px;
    font-weight: 600;
    color: #3864C0;
    margin: 0 0 2px;
    letter-spacing: 0.02em;
}
.modal-sub {
    font-size: 12.5px;
    color: #6E7582;
    font-style: italic;
    margin: 0;
}

.modal-divider {
    border: none;
    border-top: 1px solid #EDEEF1;
    margin: 20px 0;
}

.modal-field-label {
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #9FB7E8;
    margin: 0 0 6px;
}
.modal-field-value {
    font-size: 14px;
    color: #3F4552;
    line-height: 1.6;
    margin: 0 0 18px;
}
.modal-field-value span {
    display: inline-block;
    border-radius: 50px;
    font-size: 14px;
    color: #223763;
    font-weight: 400;
    margin: 0 6px 6px 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .team-section { 
        padding: 72px 48px; 
    }
    .resp-team-grid,
    .team-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 22px !important;
    }
}

@media (max-width: 850px) {
    .resp-team-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 700px) {
    .team-section { 
        padding: 72px 20px; 
    }
    .team-tabs-wrap { 
        margin-bottom: 32px; 
    }
    .team-tabs {
        display: flex;
        width: 100%;
        padding: 4px;
        gap: 2px;
    }
    .team-tab {
        flex: 1;
        padding: 10px 6px;
        font-size: 12px;
        justify-content: center;
        text-align: center;
        line-height: 1.25;
    }
    .team-tab-count { 
        margin-left: 5px; 
    }
    .resp-team-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .team-card {
        padding: 24px 16px 20px;
    }
    .team-card-avatar { 
        width: 60px; 
        height: 60px; 
        font-size: 17px; 
    }
    .team-card-name { 
        font-size: 13px; 
    }
    .team-card-role { 
        font-size: 11.5px; 
    }
    .team-card-sub { 
        font-size: 10.5px; 
    }
    .modal-box {
        padding: 28px 22px 24px;
        width: 95%;
    }
    .modal-name { 
        font-size: 17px; 
    }
}

@media (max-width: 380px) {
    .team-tab { 
        padding: 9px 6px; 
        font-size: 11px; 
        white-space: normal; 
        line-height: 1.2; 
    }
    .team-tab-count { 
        font-size: 9.5px; 
        margin-left: 4px; 
    }
}
