/* Staff Page — Card Grid */
/* ── Filter Bar (centered, like gallery) ── */
.staff-filter-bar {
    display: flex;
    justify-content: center;
    padding: 32px 0 0;
}

.segmented-control {
    display: inline-flex;
    background: white;
    border-radius: 18px;
    padding: 5px;
    gap: 0;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
    margin: 0 auto;
}

.segment {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
    z-index: 1;
}

.segment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.segment.active .segment-count {
    background: rgba(0, 0, 0, 0.2);
    color: var(--dark);
}

.segment:hover {
    color: var(--dark);
    background: rgba(16, 227, 206, 0.04);
}

.segment.active {
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 3px 12px rgba(16, 227, 206, 0.3), 0 0 0 1px rgba(16, 227, 206, 0.2);
    font-weight: 700;
}

/* ── Premium Staff Grid ── */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

/* ── Premium Staff Card ── */
.staff-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 5px 25px rgba(0,0,0,0.06),
        0 0 0 1px rgba(0,0,0,0.03);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Glass-border overlay on hover */
.staff-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    border: 1px solid rgba(16, 227, 206, 0.2);
    box-shadow: 0 25px 50px -12px rgba(16, 227, 206, 0.3);
}

.staff-card:hover::after {
    opacity: 1;
}

.staff-card:hover {
    transform: translateY(-10px);
}

/* ── Card Header ── */
.staff-card-header {
    background: linear-gradient(145deg, #f0fdfa 0%, #ccfbf1 30%, #f8fafc 100%);
    padding: 28px 24px 42px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Subtle decorative glow spots */
.staff-card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(16, 227, 206, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 227, 206, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* White wave overlay at bottom of header — rendered via pseudo-element */
.staff-card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 35px;
    background: white;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    pointer-events: none;
}

/* ── Avatar with animated ring — via pseudo-element ── */
.staff-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark), #6366f1, var(--primary));
    background-size: 300% 300%;
    animation: ring-rotate 4s ease-in-out infinite;
    transition: all 0.5s ease;
    box-shadow: 0 0 25px rgba(16, 227, 206, 0.15);
}

.staff-card:hover .staff-avatar {
    animation: ring-rotate 1.5s ease-in-out infinite;
    box-shadow: 0 0 45px rgba(16, 227, 206, 0.35);
}

@keyframes ring-rotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Inner white circle for the avatar image */
.staff-avatar::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: white;
    border-radius: 50%;
    z-index: 0;
}

.staff-avatar img {
    position: relative;
    z-index: 1;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 3px auto 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.staff-card:hover .staff-avatar img {
    transform: scale(1.12);
}

/* ── Card Body ── */
.staff-card-body {
    padding: 18px 20px 26px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Decorative divider line */
.staff-card-body::before {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
    margin: 0 auto 20px;
    transition: width 0.4s ease;
}

.staff-card:hover .staff-card-body::before {
    width: 80px;
}

.staff-name {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--dark);
    transition: color 0.3s ease;
}

.staff-card:hover .staff-name {
    background: linear-gradient(135deg, var(--dark), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.staff-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(16, 227, 206, 0.12), rgba(16, 227, 206, 0.05));
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.83rem;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 10px;
    border: 1px solid rgba(16, 227, 206, 0.15);
    transition: all 0.3s ease;
}

.staff-card:hover .staff-role {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(16, 227, 206, 0.3);
}

.staff-role i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.staff-card:hover .staff-role i {
    transform: rotate(-10deg);
}

.staff-dept {
    color: var(--text-gray);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 2px;
}

.staff-dept i {
    color: var(--primary);
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.staff-card:hover .staff-dept i {
    transform: scale(1.2);
}

/* ── Empty State ── */
.empty-state-modern {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.empty-icon-modern {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--surface), #f0fdfa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: var(--primary);
}

.empty-state-modern h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state-modern p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.staff-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .staff-filter-bar {
        padding: 24px 0 0;
    }

    .segment {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .segment-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.68rem;
    }

    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 30px;
    }

    .staff-card {
        border-radius: 18px;
    }

    .staff-card-header {
        padding: 22px 18px 36px;
    }

    .staff-avatar {
        width: 80px;
        height: 80px;
        padding: 3px;
    }

    .staff-card-body {
        padding: 14px 14px 22px;
    }

    .staff-card-body::before {
        margin-bottom: 14px;
    }

    .staff-name {
        font-size: 1rem;
    }

    .staff-role {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .staff-dept {
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .segmented-control {
        border-radius: 14px;
        padding: 4px;
    }

    .segment {
        padding: 7px 12px;
        font-size: 0.78rem;
        border-radius: 11px;
    }

    .segment-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
        padding: 0 4px;
    }

    .staff-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .staff-avatar {
        width: 72px;
        height: 72px;
    }

    .staff-name {
        font-size: 0.92rem;
    }

    .staff-role {
        font-size: 0.75rem;
    }
}
