/**
 * Staff index page – category sections and staff card grid
 */

:root {
    --staff-card-max-width: 1fr;
    --staff-card-min-width: 275px;
    --staff-card-height: 440px;
    --staff-photo-height: 350px;
    --staff-card-gap: 18px;
    --staff-info-width: 272px;
    --staff-orange: #ff6c2f;
    --staff-text: #231f20;
    --staff-page-h-padding: 80px;
    --staff-grid-gap-h: 1.5rem;
    --staff-page-background: #f2f2f2;
}



.staff-page-grid-area {
    width: 100%;
    padding: var(--staff-page-h-padding);
    box-sizing: border-box;
}

@media (max-width: 500px) {
    .staff-page-grid-area {
        --staff-page-h-padding: 20px;
    }
}

/* Title on its own row, left-aligned */
.staff-page-title {
    grid-column: 1 / -1;
    font-size: 64px;
    font-weight: 900; /* Black */
    line-height: 1.1;
    color: var(--staff-text);
    margin: 0 0 0.5rem;
    text-align: left;
}

.staff-page-title-first {
    font-style: italic;
    font-weight: 900; /* Black Italic */
}

.staff-page-title-rest {
    font-style: normal;
    font-weight: 900; /* Black */
}

/* Filter on its own row, right-aligned */
.staff-page-filter {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.staff-page-intro {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.staff-page-description {
    font-family: "Open Sans", sans-serif;
    color: var(--staff-text);
}

.staff-page-description p:last-child {
    margin-bottom: 0;
}

.staff-page-filter-label {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    color: var(--staff-text);
    margin: 0;
}

.staff-category-select {
    min-width: 180px;
    padding: 0.375rem 0.75rem;
    font-family: "Open Sans", sans-serif;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #fff;
    color: var(--staff-text);
}

/* Section is one grid row in .staff-page-inner; inner grid holds heading + cards; collapse via grid-template-rows */
.staff-category-section {
    margin-bottom: 80px;
}
.staff-category-section .staff-grid,
.staff-category-section .staff-grid-overridden {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.staff-category-section.is-hidden {
    display: none;
    opacity: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.staff-category-section-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

body .staff-category-heading,
h2.staff-category-heading {
    color: var(--staff-text);
    margin-bottom: 0 !important;
    border: 0 !important;
}

.staff-category-cta {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

/* Staff card – matches design spec */
.staff-card {
    flex: 0 0 auto;
    width: 302px;
    max-width: 100%;
    min-width: var(--staff-card-min-width);
}

.staff-card-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: var(--staff-card-gap);
    width: 100%;
    min-height: var(--staff-card-height);
    text-decoration: none;
    color: inherit;
    transition: outline 0.15s ease;
}

.staff-card-link:hover,
.staff-card-link:focus {
    text-decoration: none;
    color: inherit;
}

.staff-card-link:focus-visible {
    outline: 2px dashed currentColor;
    outline-offset: 4px;
}

.staff-card-photo {
    width: 100%;
    height: var(--staff-photo-height);
    flex: none;
    align-self: stretch;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
body .entry-content {
    .staff-card-photo img.staff-card-img, .staff-card-photo img.staff-card-placeholder-logo {
        border-width: 0;
    }
}

.staff-card-photo {
    position: relative;
    width: 100%;
    height: var(--staff-photo-height);
    flex: none;
    align-self: stretch;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #231f20;
}

.staff-card-photo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--staff-orange);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.staff-card-link:hover .staff-card-photo::before,
.staff-card-link:focus .staff-card-photo::before {
    opacity: 1;
}

.staff-card-link:hover .staff-card-photo:has(.staff-card-placeholder)::before,
.staff-card-link:focus .staff-card-photo:has(.staff-card-placeholder)::before {
    opacity: 0;
}

.staff-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%);
    display: block;
    position: relative;
    z-index: 1;
}

.staff-card-placeholder-logo {
    position: relative;
    z-index: 1;
    max-width: 60%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.staff-card-placeholder {
    display: contents;
}

.staff-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: var(--staff-info-width);
    max-width: 100%;
    flex: none;
    gap: 0;
}

.staff-card-name {
    display: flex;
    width: 100%;
    max-width: var(--staff-info-width);
    align-items: center;
    margin: 0;
    flex: none;
    order: 0;
    align-self: stretch;
    font-variation-settings: 'wdth' 100;
    color: var(--staff-text);
}

.staff-card-title {
    width: 100%;
    align-items: center;
    max-width: var(--staff-info-width);
    margin: 0;
    flex: none;
    order: 1;
    align-self: stretch;
    font-variation-settings: 'wdth' 100;
}


/* Reason Magazine CTA (link-out section) */
.staff-reason-magazine-cta {
    color: var(--staff-text);
    margin: 0;
}

.staff-reason-magazine-cta {
    a, a:link, a:visited {
        color: var(--staff-orange);
    }
}
