/*
 * staff-cards.css — Faculty directory cards for public structure pages.
 * Scoped under .staff-page-wrapper so it overrides the base .staff-card rules in
 * public.css. Refined institutional look: elevated card in a responsive grid, a
 * brand-purple left accent, a small circular avatar (kept small so low-resolution
 * photos stay crisp), clear type hierarchy, and a subtle hover lift.
 */

.staff-page-wrapper {
    padding: 0.5rem 0 2rem;
}

/* ---- Unit section (multi-unit pages) ---- */
.staff-page-wrapper .staff-unit-section {
    max-width: 1120px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.staff-page-wrapper .staff-unit-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading, #151363);
    margin: 0 0 1.75rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.staff-page-wrapper .staff-unit-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 56px;
    height: 3px;
    transform: translateX(-50%);
    background: var(--gradient-surface, linear-gradient(90deg, #7E38EF, #600CEB));
    border-radius: 999px;
}

.staff-page-wrapper .staff-unit-desc {
    text-align: center;
    color: var(--text-muted, #6c757d);
    margin: -1rem auto 1.75rem;
    max-width: 640px;
}

/* ---- Stacked single column: one card per row, centered ---- */
.staff-page-wrapper .staff-card-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 820px;
    margin: 0 auto;
}

/* ---- The card: horizontal, elevated, brand left-accent ---- */
.staff-page-wrapper .staff-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    background: var(--surface-card, #fff);
    border: 1px solid var(--border-subtle, #e8e8f0);
    border-radius: var(--radius-md, 16px);
    padding: 1.35rem 1.6rem 1.35rem 1.75rem;
    box-shadow: var(--shadow-soft, 0 4px 24px rgba(21, 19, 99, 0.06));
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Left accent stripe (brand gradient) — brightens/widens on hover */
.staff-page-wrapper .staff-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-surface, linear-gradient(180deg, #7E38EF, #600CEB));
    opacity: 0.6;
    transition: width 0.22s ease, opacity 0.22s ease;
}

.staff-page-wrapper .staff-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-violet, 0 18px 40px -12px rgba(96, 12, 235, 0.45));
    border-color: transparent;
}

.staff-page-wrapper .staff-card:hover::before {
    width: 6px;
    opacity: 1;
}

/* ---- Circular avatar with a soft brand ring (small = crisp for low-res photos) ---- */
.staff-page-wrapper .staff-card-photo {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    aspect-ratio: auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-primary-soft, #efe7fd);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px var(--color-primary-soft, #efe7fd), 0 8px 18px rgba(21, 19, 99, 0.14);
}

.staff-page-wrapper .staff-card-photo img {
    width: 104px;
    height: 104px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    display: block;
}

.staff-page-wrapper .staff-card-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-purple, #600CEB);
    opacity: 0.45;
}

/* ---- Body: role (title) -> name (accent) -> credentials (muted) ---- */
.staff-page-wrapper .staff-card-body {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

/* Role / position — the card title */
.staff-page-wrapper .staff-card-position {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-heading, #151363);
    line-height: 1.35;
    margin: 0;
}

/* Full name — brand-purple accent line */
.staff-page-wrapper .staff-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-purple, #600CEB);
    line-height: 1.4;
    margin: 0.15rem 0 0;
}

.staff-page-wrapper .staff-card-credentials {
    font-weight: 400;
    color: var(--text-muted, #6c757d);
}

.staff-page-wrapper .staff-card-bio,
.staff-page-wrapper .staff-card-degree,
.staff-page-wrapper .staff-card-qualification,
.staff-page-wrapper .staff-card-subjects {
    font-size: 0.85rem;
    color: var(--text-muted, #6c757d);
    margin: 0.25rem 0 0;
    line-height: 1.5;
    font-style: normal;
}

/* ---- Contacts ---- */
.staff-page-wrapper .staff-card-contacts {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.staff-page-wrapper .staff-card-contact {
    font-size: 0.82rem;
    color: var(--brand-purple, #600CEB);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.staff-page-wrapper .staff-card-contact:hover {
    text-decoration: underline;
}

.staff-page-wrapper .staff-contact-ico {
    opacity: 0.8;
}

/* ---- Narrow screens: stack avatar above text, centered ---- */
@media (max-width: 520px) {
    .staff-page-wrapper .staff-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.75rem 1.25rem;
    }

    .staff-page-wrapper .staff-card-body {
        align-items: center;
    }

    .staff-page-wrapper .staff-card-contacts {
        justify-content: center;
    }
}

/* ---- Unit index (cyclic-commissions landing) — same visual language ---- */
.staff-page-wrapper .staff-unit-index {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

.staff-page-wrapper .staff-unit-card {
    display: block;
    background: var(--surface-card, #fff);
    border: 1px solid var(--border-subtle, #e8e8f0);
    border-radius: var(--radius-md, 16px);
    padding: 1.1rem 1.6rem;
    box-shadow: var(--shadow-soft, 0 4px 24px rgba(21, 19, 99, 0.06));
    text-decoration: none;
    color: inherit;
    min-width: 210px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.staff-page-wrapper .staff-unit-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-violet, 0 18px 40px -12px rgba(96, 12, 235, 0.45));
    color: var(--brand-purple, #600CEB);
}

.staff-page-wrapper .staff-unit-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading, #151363);
    margin: 0 0 0.25rem;
}

.staff-page-wrapper .staff-unit-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #6c757d);
    margin: 0;
}
