/* ================================================================
   md/people – Design System (cb-team inspired)
   ================================================================ */

.md-people { font-family: inherit; }

/* ----------------------------------------------------------------
   Placeholder avatar (uses --bs-primary dynamically)
   ---------------------------------------------------------------- */
.md-people-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bs-primary) 12%, white);
    color: color-mix(in srgb, var(--bs-secondary) 45%, white);
    aspect-ratio: 1;
    width: 100%;
}
.md-people-placeholder svg {
    width: 100%;
    height: 100%;
}

/* ----------------------------------------------------------------
   Filter Bar – Segmented pill buttons with checkmarks
   ---------------------------------------------------------------- */
.md-people-filter-sticky {
    position: sticky;
    top: var(--md-people-sticky-top, 0px);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    transition: backdrop-filter 0.2s ease;
}
.md-people-filter-sticky.is-sticky {
  /* backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
   */
}

.md-people-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    max-width: 100%;
    overflow: hidden;
}

.md-people-filter-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    color: rgba(11, 15, 20, 0.88);
    transition: background-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.md-people-filter-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}
.md-people-filter-btn.active {
    background: var(--bs-secondary, #009EF3);
    color: #fff;
    transform: translateY(-1px);
}

/* Checkbox / Checkmark inside button */
.md-people-filter-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 3px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}
.md-people-filter-check svg {
    opacity: 0;
    transition: opacity 0.12s ease;
    color: #fff;
}
.md-people-filter-btn.active .md-people-filter-check {
    background: #fff;
    border-color: transparent;
}
.md-people-filter-btn.active .md-people-filter-check svg {
    opacity: 1;
    color: var(--bs-secondary, #009EF3);
}

/* ----------------------------------------------------------------
   Filtered item transition
   ---------------------------------------------------------------- */
.md-people-item {
    transform-origin: center center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.md-people-item.is-hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute !important;
    pointer-events: none;
    visibility: hidden;
    z-index: -1;
}

/* ----------------------------------------------------------------
   Photo Credit Overlay
   ---------------------------------------------------------------- */
.md-people-img-credit {
    position: absolute;
    bottom: 2px;
    right: 3px;
    z-index: 2;
    font-size: 0.55rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.45);
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------
   Contact Action Buttons – round icon buttons
   ---------------------------------------------------------------- */
.md-people-action {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.10);
    color: rgba(11, 15, 20, 0.92);
    text-decoration: none;
    transition: transform 0.15s ease, background-color 0.15s ease,
                border-color 0.15s ease, box-shadow 0.15s ease;
}
.md-people-action::after { content: none !important; }
.md-people-action:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
    color: rgba(11, 15, 20, 0.92);
}
.md-people-action svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* ================================================================
   GRID – Horizontal card (image left, text right)
   ================================================================ */

.md-people-grid-card {
    display: flex;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    min-height: 140px;
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.25s ease;
}
.md-people-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.md-people-grid-card__img-col {
    flex-shrink: 0;
    width: 110px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
}
.md-people-grid-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}
.md-people-grid-card:hover .md-people-grid-card__img { transform: scale(1.06); }

.md-people-grid-card__body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.md-people-grid-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}
.md-people-grid-card__fn {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
    line-height: 1.45;
}
.md-people-grid-card__contact {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

/* ================================================================
   CARDS – Bootstrap card with 1:1 image
   ================================================================ */

.md-people-card-classic {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.25s ease;
}
.md-people-card-classic:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.md-people-card-classic__img-wrap {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    position: relative;
    aspect-ratio: 1 / 1;
}

.md-people-card-classic__img-blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: blur(14px) brightness(0.78);
    transform: scale(1.12);
    transition: transform 0.5s ease;
}
.md-people-card-classic:hover .md-people-card-classic__img-blur { transform: scale(1.18); }

.md-people-card-classic__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: opacity 0.2s ease;
    text-align: center;
}

.md-people-card-classic__img--portrait {
    object-fit: contain;
    object-position: center top;
}

.md-people-card-classic__body {
    padding: 0.85rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.md-people-card-classic__fn {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0 0 0.35rem 0;
    line-height: 1.45;
}
.md-people-card-classic__name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}
.md-people-card-classic__fn-extra {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
    line-height: 1.45;
}
.md-people-card-classic__contact {
    display: flex;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.65rem;
}

/* ================================================================
   LIST – Staff Directory
   ================================================================ */

.md-people-list { display: flex; flex-direction: column; gap: 0.5rem; }

.md-people-list__item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.22s ease;
}
.md-people-list__item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.md-people-list__img-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    border: 2px solid rgba(0, 0, 0, 0.08);
    transition: border-color 0.22s ease;
}
.md-people-list__item:hover .md-people-list__img-wrap {
    border-color: var(--bs-primary, #009EF3);
}
.md-people-list__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.md-people-list__item:hover .md-people-list__img { transform: scale(1.1); }

.md-people-list__body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.md-people-list__meta { flex: 1; min-width: 0; }
.md-people-list__contact { display: flex; gap: 0.4rem; flex-shrink: 0; }

.md-people-list__name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}
.md-people-list__fn {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 400;
    margin: 0;
    line-height: 1.45;
}

@media (max-width: 575px) {
    .md-people-list__item { flex-wrap: wrap; }
    .md-people-list__body { flex-direction: column; align-items: flex-start; }
    .md-people-list__contact { margin-top: 0.35rem; }
}

/* ================================================================
   COMPACT – Modern card-based list (no raw table)
   ================================================================ */

.md-people-compact-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.md-people-compact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fff;
    border-radius: 0.5rem;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.md-people-compact-item:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}
.md-people-compact-item:hover {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.md-people-compact-item__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c2c2c;
    white-space: nowrap;
    min-width: 180px;
}
.md-people-compact-item__fn {
    flex: 1;
    font-size: 0.82rem;
    color: var(--bs-secondary-color, #6c757d);
    min-width: 0;
}
.md-people-compact-item__actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.md-people-compact-item__actions .md-people-action {
    width: 2rem;
    height: 2rem;
}
.md-people-compact-item__actions .md-people-action svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* ================================================================
   Responsive filter adjustments
   ================================================================ */
@media (max-width: 768.98px) {
    .md-people-filter-sticky {
        position: static !important;
        top: auto !important;
    }
    .md-people-filter-bar {
        border-radius: 1.25rem;
        padding: 0.4rem;
        gap: 0.4rem;
    }
    .md-people-filter-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.92rem;
    }
}
