/**
 * Team Members section. Reuses the Directors section chrome (.directors-section)
 * and the .director-card style, but lays the cards out in a responsive grid that
 * grows with content (load more / infinite scroll) instead of a single-row carousel.
 */

/* Grid grows with content — override the carousel's fixed 100vh height.
   `section.team-members-section` outranks `.directors-section` so this wins. */
section.team-members-section {
    height: auto;
}

/* Grid: 1 col mobile, 2 tablet, 3 desktop, 4 large — matches the carousel's
   per-view sizing so cards look identical to the Directors section. */
.team-members-section .team-members-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .team-members-section .team-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .team-members-section .team-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .team-members-section .team-members-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.team-members-section .team-members-item {
    display: flex;
}

/* Empty state */
.team-members-section .team-members-empty {
    color: rgba(238, 237, 237, 0.7);
    font-family: "forma-djr-text", sans-serif;
    font-size: 1rem;
    margin: 0;
}

/* Load more: same look as the News Archive / header button. The sentinel is an
   invisible marker the script watches to auto-load the next page on scroll. */
.team-members-load-more-wrap {
    position: relative;
    text-align: center;
    margin-top: 3rem;
}

.team-members-scroll-sentinel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 1px;
    pointer-events: none;
}

.team-members-load-more.header-button {
    font-family: inherit;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.team-members-load-more.header-button:hover {
    border-color: #F65B1B;
    background: var(--Primary-100, #0B0B0B);
    box-shadow: 0 0 8px 4px rgba(246, 91, 27, 0.25);
    color: var(--Secondary-100, #F65B1B);
    transform: translateY(-1px);
}

.team-members-load-more.header-button.loading {
    opacity: 0.8;
    cursor: wait;
}
