/* ============================================
   SINGLE TEAM MEMBER — Profile Page Styles
============================================ */

/* ── Outer Wrap ─────────────────────────── */
.rsd-single-team-wrap {
    padding: 48px 24px 60px;
    width: 100%;
    box-sizing: border-box;
}

.rsd-single-team-inner {
    max-width: 1060px;
    margin: 0 auto;
}

/* ── Back Link ──────────────────────────── */
.rsd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    margin-bottom: 36px;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsd-back-link i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.rsd-back-link:hover {
    color: #c0392b;
}

.rsd-back-link:hover i {
    transform: translateX(-4px);
}

/* ── Grid Layout ────────────────────────── */
.rsd-single-team-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0 52px;
    align-items: start;  /* Critical — allows sticky to work */
}

/* ── LEFT Sidebar
   position:sticky + align-self:start
   are BOTH required for sticky in grid  ── */
.rsd-single-team-sidebar {
    position: sticky;
    top: 32px;          /* Adjust to your header height */
    align-self: start;  /* ← THIS is what makes sticky work in grid */
}

/* ── Photo ──────────────────────────────── */
.rsd-single-team-photo {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.rsd-single-team-photo img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.rsd-single-team-photo-fallback {
    width: 100%;
    height: 320px;
    background: #ececec;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsd-single-team-photo-fallback span {
    font-size: 5rem;
    font-weight: 700;
    color: #aaa;
}

/* ── Quick Info Card ────────────────────── */
.rsd-single-team-quickinfo {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rsd-qi-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #444;
}

.rsd-qi-item i {
    color: #c0392b;
    font-size: 0.9rem;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.rsd-qi-item a {
    color: #444;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s ease;
}

.rsd-qi-item a:hover {
    color: #c0392b;
}

/* Status Badge */
.rsd-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.6;
}

.rsd-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.rsd-status-inactive {
    background: #f3f3f3;
    color: #999;
}

/* ── Social Icons ───────────────────────── */
.rsd-single-team-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rsd-single-team-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2c2c2c;
    color: #fff;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.rsd-single-team-socials a:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* ── Main Bio Area ──────────────────────── */
.rsd-single-team-main {
    min-width: 0;
}

.rsd-single-team-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.2;
    color: #1a1a1a;
}

.rsd-single-team-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #c0392b;
    margin: 0 0 28px;
}

.rsd-single-team-bio {
    font-size: 1rem;
    line-height: 1.85;
    color: #333;
}

.rsd-single-team-bio p {
    margin-bottom: 1.2em;
}

.rsd-single-team-bio p:last-child {
    margin-bottom: 0;
}

.rsd-single-team-bio a {
    color: #c0392b;
    text-decoration: underline;
}

.rsd-single-team-bio a:hover {
    color: #a93226;
}

/* ── Responsive ─────────────────────────── */
@media ( max-width: 860px ) {

    .rsd-single-team-wrap {
        padding: 28px 0 48px;
    }

    .rsd-single-team-inner {
        padding: 0;
    }

    .rsd-back-link {
        padding: 0 16px;
        margin-bottom: 24px;
        display: flex;
    }

    /* Single column with named areas — 
       controls exact order of every element */
    .rsd-single-team-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "main"
            "info"
            "socials";
        gap: 0;
        padding: 0px 20px;
    }

    /* ── KEY FIX ────────────────────────────
       display:contents "unwraps" the sidebar
       making photo/quickinfo/socials direct
       grid children so grid-area works on them
    ──────────────────────────────────────── */
    .rsd-single-team-sidebar {
        display: contents;
        position: static;
    }

    /* Each element now slots into its named area */
    .rsd-single-team-photo     { grid-area: photo;   }
    .rsd-single-team-main      { grid-area: main;    }
    .rsd-single-team-quickinfo { grid-area: info;    }
    .rsd-single-team-socials   { grid-area: socials; }

    /* Photo — full bleed */
    .rsd-single-team-photo {
        border-radius: 0;
        margin-bottom: 0;
    }

    .rsd-single-team-photo img {
        height: 320px;
        object-position: center top;
        border-radius: 0;
        width: 100%;
    }

    /* Main — name + bio */
    .rsd-single-team-main {
        padding: 24px 16px 8px;
        order: unset; /* clear any previous order values */
    }

    /* Quick info */
    .rsd-single-team-quickinfo {
        border-radius: 0;
        margin-bottom: 0;
        padding: 20px 16px;
        background: #f4f4f4;
        position: static;
    }

    /* Socials */
    .rsd-single-team-socials {
        padding: 16px 16px 24px;
    }

    .rsd-single-team-socials a {
        width: 44px;
        height: 44px;
    }
}

@media ( max-width: 480px ) {

    .rsd-single-team-photo img {
        height: 260px;
    }

    .rsd-single-team-name {
        font-size: 1.35rem;
    }

    .rsd-back-link {
        font-size: 0.8rem;
    }
}
