/*
 * Staff block: modal_cards / carousel / categorized_tabs / compact_grid + bio modal.
 *
 * Plain CSS (matches hero.css/documents.css/gallery.css) - no build step in
 * this project, Tailwind is loaded via the CDN Play script.
 */

/* ---- shared grid (modal_cards default + categorized_tabs panels) ------ */

.staff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .staff-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.staff-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.staff-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.staff-card__photo-btn {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: none;
    cursor: pointer;
    background: #f3f4f6;
}

.staff-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-card__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
}

.staff-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1.15rem 1.15rem;
}

.staff-card__name {
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.staff-card__role {
    font-size: 0.875rem;
    color: #6b7280;
}

.staff-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    margin-top: 0.15rem;
    border-radius: 9999px;
    background: var(--color-accent, #f59e0b);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}

.staff-card__more {
    margin-top: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-primary, #2563eb);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

.staff-card__more:hover {
    text-decoration: underline;
}

/* ---- compact_grid ------------------------------------------------------ */

.staff-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    text-align: center;
}

@media (min-width: 640px) {
    .staff-compact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .staff-compact-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.staff-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
}

.staff-compact__avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 9999px;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
    transition: box-shadow 0.15s ease;
}

.staff-compact:hover .staff-compact__avatar {
    box-shadow: 0 0 0 3px var(--color-primary, #2563eb);
}

.staff-compact__avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.staff-compact__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.25;
}

.staff-compact__role {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ---- carousel (native CSS scroll-snap - touch swipe works for free) --- */

.staff-carousel {
    position: relative;
}

.staff-carousel__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.staff-carousel__slide {
    flex: 0 0 85%;
    scroll-snap-align: start;
}

@media (min-width: 640px) {
    .staff-carousel__slide {
        flex-basis: 45%;
    }
}

@media (min-width: 1024px) {
    .staff-carousel__slide {
        flex-basis: 23%;
    }
}

.staff-carousel__nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 9999px;
    background: #fff;
    color: #111827;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.staff-carousel__nav:hover {
    background: var(--color-primary, #2563eb);
    color: #fff;
}

.staff-carousel__nav svg {
    width: 1.35rem;
    height: 1.35rem;
}

.staff-carousel__nav--prev {
    left: -0.75rem;
}

.staff-carousel__nav--next {
    right: -0.75rem;
}

@media (max-width: 640px) {
    .staff-carousel__nav {
        display: none;
    }
}

/* ---- categorized_tabs -------------------------------------------------- */

.staff-tabs__nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    scrollbar-width: thin;
}

.staff-tabs__tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.925rem;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.staff-tabs__tab:hover {
    color: var(--color-primary, #2563eb);
}

.staff-tabs__tab.is-active {
    color: var(--color-primary, #2563eb);
    border-bottom-color: var(--color-primary, #2563eb);
}

.staff-tabs__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 600;
}

.staff-tabs__tab.is-active .staff-tabs__count {
    background: var(--color-primary, #2563eb);
    color: #fff;
}

@media (max-width: 640px) {
    .staff-tabs__nav {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ---- bio modal ---------------------------------------------------------- */

.staff-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.staff-modal[hidden] {
    display: none;
}

.staff-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
}

body.staff-modal-open {
    overflow: hidden;
}

.staff-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 32rem;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.staff-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.staff-modal__close:hover {
    background: #e5e7eb;
}

.staff-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.staff-modal__photo {
    flex: 0 0 auto;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 9999px;
    object-fit: cover;
}

.staff-modal__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}

.staff-modal__role {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.1rem;
}

.staff-modal__badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: var(--color-accent, #f59e0b);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}

.staff-modal__bio {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #374151;
}

.staff-modal__bio p {
    margin-bottom: 0.75rem;
}

.staff-modal__bio ul,
.staff-modal__bio ol {
    margin: 0 0 0.75rem 1.25rem;
}

.staff-modal__bio a {
    color: var(--color-primary, #2563eb);
}

@media (max-width: 640px) {
    .staff-modal__dialog {
        padding: 1.5rem;
        max-height: 90vh;
    }
}
