/* ============================================================
   About Us Team — Public Styles
   All variables are set via inline CSS from AU_Shortcode.
   Scoped entirely to .au-team-section to prevent theme conflicts.
   ============================================================ */

/* ── CSS Custom Property defaults (overridden per-instance) ── */
.au-team-section {
    --au-primary:       #1a3a2a;
    --au-primary-mid:   #2d5a3d;
    --au-accent:        #c8973a;
    --au-text-card:     #1e1a14;
    --au-card-bg:       #ffffff;
    --au-section-bg:    #f5f0e8;
    --au-heading-font:  'Playfair Display', serif;
    --au-body-font:     'Raleway', sans-serif;
    --au-card-radius:   14px;
    --au-shadow-sm:     0 2px 16px rgba(26, 58, 42, 0.07);
    --au-shadow-md:     0 10px 32px rgba(26, 58, 42, 0.14);
    --au-shadow-lg:     0 12px 56px rgba(26, 58, 42, 0.16), 0 2px 10px rgba(26, 58, 42, 0.08);
    --au-transition:    0.25s ease;
}

/* ── Section wrapper ─────────────────────────────────────── */
.au-team-section {
    background: var(--au-section-bg);
    font-family: var(--au-body-font);
    color: var(--au-text-card);
    padding: 90px 32px;          /* was 60px 24px — more vertical stage presence */
    box-sizing: border-box;
    width: 100%;
}

/* Reset only within our scope — avoids touching global theme */
.au-team-section *,
.au-team-section *::before,
.au-team-section *::after {
    box-sizing: border-box;
}

/* ── Main wrapper card ───────────────────────────────────── */
.au-team-wrapper {
    max-width: 1380px;           /* was 1080px — fills wide viewports prominently */
    margin: 0 auto;
    background: linear-gradient(145deg, #fff 0%, var(--au-section-bg) 100%);
    border-radius: 24px;         /* was 20px */
    box-shadow: var(--au-shadow-lg);
    border: 1px solid rgba(200, 151, 58, 0.2);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* ── Organisation side panel ─────────────────────────────── */
.au-org-panel {
    background: linear-gradient(
        170deg,
        var(--au-primary) 0%,
        var(--au-primary-mid) 60%,
        #3d7050 100%
    );
    min-width: 310px;            /* was 260px */
    flex: 0 0 310px;
    padding: 64px 44px;          /* was 48px 32px */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Decorative background circles — scaled up with the panel */
.au-org-panel::before,
.au-org-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.au-org-panel::before {
    top: -70px; right: -70px;
    width: 260px; height: 260px; /* was 200px */
    background: rgba(200, 151, 58, 0.08);
}
.au-org-panel::after {
    bottom: -50px; left: -50px;
    width: 200px; height: 200px; /* was 160px */
    background: rgba(255, 255, 255, 0.04);
}

.au-org-panel__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: au-fade-up 0.8s ease both;
}

/* Logo */
.au-org-logo-wrap {
    width: 220px;                /* was 180px */
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.au-org-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}

.au-org-logo-wrap--initials {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(200, 151, 58, 0.4);
}

.au-org-logo-wrap--initials span {
    font-family: var(--au-heading-font);
    font-size: 3.5rem;           /* was 3rem */
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.au-org-name {
    font-family: var(--au-heading-font);
    font-size: 1.2rem;           /* was 1.05rem */
    font-weight: 600;
    color: #f5f0e8;
    margin: 24px 0 0;            /* was 20px */
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.au-divider-gold {
    width: 56px;                 /* was 50px */
    height: 2px;
    background: var(--au-accent);
    margin: 16px auto;           /* was 14px */
}

.au-org-tagline {
    font-size: 0.75rem;          /* was 0.7rem */
    font-weight: 500;
    color: rgba(245, 240, 232, 0.65);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Members panel ───────────────────────────────────────── */
.au-members-panel {
    flex: 1;
    padding: 56px 52px;          /* was 40px 36px */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.au-section-meta {
    margin-bottom: 36px;         /* was 28px */
    animation: au-fade-up 0.8s 0.1s ease both;
}

.au-section-subtitle {
    font-size: 0.75rem;          /* was 0.7rem */
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--au-accent);
    margin: 0 0 8px;             /* was 6px */
}

.au-section-title {
    font-family: var(--au-heading-font);
    font-size: 2.1rem;           /* was 1.5rem — real section heading presence */
    font-weight: 700;
    color: var(--au-primary);
    margin: 0;
    line-height: 1.15;
    border: none;
    padding: 0;
}

/* ── Members grid ────────────────────────────────────────── */
.au-members-grid {
    display: grid;
    gap: 24px;                   /* was 18px */
}

.au-cols-2 { grid-template-columns: repeat(2, 1fr); }
.au-cols-3 { grid-template-columns: repeat(3, 1fr); }
.au-cols-4 { grid-template-columns: repeat(4, 1fr); }
.au-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Member card ─────────────────────────────────────────── */
.au-member-card {
    background: var(--au-card-bg);
    border-radius: var(--au-card-radius);
    padding: 30px 22px;          /* was 20px 14px */
    text-align: center;
    border: 1px solid rgba(106, 76, 42, 0.1);
    box-shadow: var(--au-shadow-sm);
    cursor: pointer;
    transition: transform var(--au-transition), box-shadow var(--au-transition), border-color var(--au-transition);
    animation: au-fade-up 0.7s ease both;
    line-height: 1.4;
    position: relative;
    outline: none;
}

.au-member-card:hover,
.au-member-card:focus-visible {
    transform: translateY(-7px); /* was -5px — more satisfying lift */
    box-shadow: var(--au-shadow-md);
    border-color: rgba(200, 151, 58, 0.35);
}

.au-member-card:focus-visible {
    outline: 3px solid var(--au-accent);
    outline-offset: 2px;
}

/* Stagger animation delays */
.au-members-grid .au-member-card:nth-child(1)  { animation-delay: 0.20s; }
.au-members-grid .au-member-card:nth-child(2)  { animation-delay: 0.28s; }
.au-members-grid .au-member-card:nth-child(3)  { animation-delay: 0.36s; }
.au-members-grid .au-member-card:nth-child(4)  { animation-delay: 0.44s; }
.au-members-grid .au-member-card:nth-child(5)  { animation-delay: 0.52s; }
.au-members-grid .au-member-card:nth-child(6)  { animation-delay: 0.60s; }
.au-members-grid .au-member-card:nth-child(7)  { animation-delay: 0.68s; }
.au-members-grid .au-member-card:nth-child(8)  { animation-delay: 0.76s; }
.au-members-grid .au-member-card:nth-child(9)  { animation-delay: 0.84s; }
.au-members-grid .au-member-card:nth-child(10) { animation-delay: 0.92s; }

/* ── Avatar ──────────────────────────────────────────────── */
.au-avatar {
    width: 84px;                 /* was 64px — faces are clearly identifiable */
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 16px;         /* was 12px */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* Colour variants matching the Satso design palette */
.au-avatar--pine    { background: linear-gradient(135deg, #1a3a2a 0%, #5a7a52 100%); }
.au-avatar--earth   { background: linear-gradient(135deg, #6b4c2a 0%, #a0693a 100%); }
.au-avatar--gold    { background: linear-gradient(135deg, #a07828 0%, #c8973a 100%); }
.au-avatar--stone   { background: linear-gradient(135deg, #5a5248 0%, #8a8070 100%); }
.au-avatar--mid     { background: linear-gradient(135deg, #2d5a3d 0%, #5a9a70 100%); }
.au-avatar--special { background: linear-gradient(135deg, #5a3018 0%, #6b4c2a 100%); }

.au-avatar__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.au-avatar__initials {
    font-family: var(--au-heading-font);
    font-size: 1.6rem;           /* was 1.3rem */
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

.au-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;                 /* was 18px */
    height: 22px;
    background: var(--au-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;             /* was 9px */
    color: #fff;
    line-height: 1;
    pointer-events: none;
    border: 2px solid var(--au-card-bg);
}

/* Member text */
.au-member-name {
    font-family: var(--au-heading-font);
    font-size: 1rem;             /* was 0.88rem */
    font-weight: 600;
    color: var(--au-primary);
    margin: 0 0 6px;             /* was 4px */
    line-height: 1.3;
}

.au-member-title {
    font-size: 0.78rem;          /* was 0.72rem */
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #7a6a52;
    margin: 0;
    text-transform: uppercase;
}

.au-no-members {
    color: #7a6a52;
    font-style: italic;
    padding: 28px 0;
    margin: 0;
}

/* ── Modal overlay ───────────────────────────────────────── */
.au-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 18, 0.72);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.au-modal-overlay.au-is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Modal panel ─────────────────────────────────────────── */
.au-modal {
    background: #fff;
    border-radius: 22px;         /* was 20px */
    max-width: 680px;            /* was 600px — proportional to wider layout */
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
    position: relative;
    font-family: var(--au-body-font);
    color: var(--au-text-card);

    transform: translateY(30px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.au-is-open .au-modal--slide {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.au-is-open .au-modal--fade {
    transform: none;
    opacity: 1;
}

.au-is-open .au-modal--scale {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.au-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(26, 58, 42, 0.08);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background var(--au-transition), color var(--au-transition);
    z-index: 1;
    padding: 0;
}

.au-modal__close:hover,
.au-modal__close:focus-visible {
    background: var(--au-primary);
    color: #fff;
    outline: none;
}

/* ── Modal content (populated by JS) ────────────────────────── */
.au-modal__content {
    padding: 48px 52px 44px;     /* was 40px 40px 36px */
}

/* Header section */
.au-modal-header {
    display: flex;
    align-items: center;
    gap: 24px;                   /* was 20px */
    margin-bottom: 32px;         /* was 28px */
    padding-bottom: 28px;        /* was 24px */
    border-bottom: 1px solid rgba(106, 76, 42, 0.1);
}

.au-modal-avatar {
    width: 96px;                 /* was 80px */
    height: 96px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.au-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.au-modal-avatar .au-avatar__initials {
    font-size: 2.1rem;           /* was 1.8rem */
}

.au-modal-identity {
    flex: 1;
    min-width: 0;
}

.au-modal-name {
    font-family: var(--au-heading-font);
    font-size: 1.55rem;          /* was 1.35rem */
    font-weight: 700;
    color: var(--au-primary);
    margin: 0 0 6px;
    line-height: 1.2;
}

.au-modal-position {
    font-size: 0.8rem;           /* was 0.78rem */
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--au-accent);
    margin: 0;
}

/* Body sections */
.au-modal-section {
    margin-bottom: 26px;         /* was 22px */
}

.au-modal-section:last-child {
    margin-bottom: 0;
}

.au-modal-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a8a72;
    margin: 0 0 10px;            /* was 8px */
}

.au-modal-bio {
    font-size: 0.97rem;          /* was 0.94rem */
    line-height: 1.75;           /* was 1.7 */
    color: #3a3020;
    margin: 0;
}

.au-modal-bio p {
    margin: 0 0 14px;
}
.au-modal-bio p:last-child {
    margin-bottom: 0;
}

.au-modal-achievements {
    font-size: 0.93rem;          /* was 0.9rem */
    line-height: 1.7;
    color: #3a3020;
    margin: 0;
}

/* Social links */
.au-modal-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.au-modal-socials li {
    margin: 0;
    padding: 0;
}

.au-social-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;           /* was 7px 14px */
    border-radius: 30px;
    background: rgba(26, 58, 42, 0.06);
    border: 1px solid rgba(26, 58, 42, 0.12);
    color: var(--au-primary);
    font-size: 0.84rem;          /* was 0.82rem */
    font-weight: 500;
    text-decoration: none;
    transition: background var(--au-transition), color var(--au-transition), border-color var(--au-transition);
}

.au-social-link:hover,
.au-social-link:focus-visible {
    background: var(--au-primary);
    color: #fff;
    border-color: var(--au-primary);
    text-decoration: none;
    outline: none;
}

.au-social-link svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

/* ── Keyframe animations ─────────────────────────────────── */
@keyframes au-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet: stack the org panel on top */
@media (max-width: 1020px) {
    .au-team-wrapper {
        flex-direction: column;
        border-radius: 20px;
    }

    .au-org-panel {
        flex: none;
        min-width: 0;
        width: 100%;
        padding: 40px 32px;
    }

    .au-org-panel__inner {
        flex-direction: row;
        text-align: left;
        gap: 24px;
        justify-content: center;
        align-items: center;
    }

    .au-org-logo-wrap {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .au-org-logo-wrap--initials span {
        font-size: 2rem;
    }

    .au-org-name {
        margin-top: 0;
        font-size: 1.05rem;
    }

    .au-divider-gold {
        display: none;
    }

    .au-members-panel {
        padding: 40px 36px;
    }

    .au-section-title {
        font-size: 1.75rem;
    }
}

/* Large mobile: 2-col grid, reduce section padding */
@media (max-width: 680px) {
    .au-team-section {
        padding: 60px 20px;
    }

    .au-cols-3,
    .au-cols-4,
    .au-cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .au-members-panel {
        padding: 32px 24px;
    }

    .au-section-title {
        font-size: 1.55rem;
    }

    .au-modal__content {
        padding: 32px 28px 28px;
    }

    .au-modal-header {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .au-modal-socials {
        justify-content: center;
    }

    .au-modal-avatar {
        width: 80px;
        height: 80px;
    }
}

/* Small mobile: single column */
@media (max-width: 440px) {
    .au-team-section {
        padding: 48px 16px;
    }

    .au-cols-2,
    .au-cols-3,
    .au-cols-4,
    .au-cols-5 {
        grid-template-columns: 1fr;
    }

    .au-member-card {
        padding: 24px 18px;
    }
}

/* ── Accessibility: respect motion preferences ────────────── */
@media (prefers-reduced-motion: reduce) {
    .au-member-card,
    .au-modal,
    .au-modal-overlay,
    .au-org-panel__inner,
    .au-section-meta {
        animation: none !important;
        transition: none !important;
    }
}
