/* ============================================
   TEAM CARDS - Hub Page Grid + Filters
   ============================================ */

/* --- Toolbar: Services + Search + Sort on one line --- */
.team-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 16px;
    flex-wrap: wrap;
}

.team-toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.team-search__input {
    width: 180px;
    padding: 7px 12px 7px 40px !important;
    border: 1.5px solid var(--altus-border, #e9ecef);
    border-radius: 20px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--altus-dark, #303030);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aca69c' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-position: 10px center;
    background-size: 14px 14px;
    background-repeat: no-repeat;
    outline: none;
    transition: border-color 0.2s, width 0.2s ease;
}

.team-search__input:focus {
    border-color: var(--altus-green, #1DCE79);
    width: 240px;
}

.team-search__input::placeholder {
    color: var(--altus-taupe, #aca69c);
    font-family: "Sora", sans-serif;
    font-size: 13px;
    font-style: normal;
    opacity: 1;
}

/* --- Sort Dropdown --- */
.team-sort__select {
    padding: 7px 28px 7px 12px;
    border: 1.5px solid var(--altus-border, #e9ecef);
    border-radius: 20px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--altus-dark, #303030);
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23303030' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.team-sort__select:focus {
    border-color: var(--altus-green, #1DCE79);
}

/* --- Filter Buttons --- */
.team-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 16px;
}

.team-filters__group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.team-filters__label {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--altus-white, #ffffff);
    background: var(--altus-dark, #303030);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
}

.team-filter-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1.5px solid var(--altus-border, #e9ecef);
    border-radius: 20px;
    background: var(--altus-white, #ffffff);
    color: var(--altus-dark, #303030);
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.team-filter-btn:hover {
    border-color: var(--altus-green, #1DCE79);
    color: var(--altus-green, #1DCE79);
}

.team-filter-btn.active {
    background: var(--altus-green, #1DCE79);
    border-color: var(--altus-green, #1DCE79);
    color: #ffffff;
}

.team-filter-clear {
    display: none;
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    background: var(--altus-dark, #303030);
    color: #ffffff;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-filter-clear:hover {
    background: #555;
}

.team-filter-clear.visible {
    display: inline-block;
}

/* --- Results Count --- */
.team-results-count {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--altus-taupe, #aca69c);
    margin-bottom: 16px;
    padding: 0 16px;
}

/* --- Card Grid --- */
.team-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 16px;
}

/* --- Individual Card --- */
.team-card {
    display: flex;
    flex-direction: column;
    background: var(--altus-white, #ffffff);
    border: 1px solid var(--altus-border, #e9ecef);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    position: relative;
}

.team-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--altus-green, #1DCE79);
}

.team-card.hidden {
    display: none;
}

/* Card Header: photo + basic info */
.team-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 12px;
}

.team-card__photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: none;
}

.team-card__photo--placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--altus-light-bg, #f6f5f5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--altus-taupe, #aca69c);
    font-size: 28px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
}

.team-card__info {
    flex: 1;
    min-width: 0;
}

.team-card__name {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--altus-dark, #303030);
    margin: 0 0 4px;
    line-height: 1.3;
    word-break: break-word;
}

.team-card__name a {
    color: inherit;
    text-decoration: none;
}

.team-card__name a:hover {
    color: var(--altus-green, #1DCE79);
}

.team-card__role {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--altus-taupe, #aca69c);
    margin: 0 0 4px;
    line-height: 1.3;
}

.team-card__location {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--altus-taupe, #aca69c);
    margin: 0;
}

/* Card Body: tags - flex-grow to fill remaining space */
.team-card__body {
    padding: 0 20px 16px;
    flex: 1;
}

.team-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.team-card__tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.team-card__tag:hover {
    opacity: 0.8;
}

.team-card__tag--services {
    background: var(--altus-green, #1DCE79);
    color: #ffffff;
}

.team-card__tag--industry {
    background: var(--altus-light-bg, #f6f5f5);
    color: var(--altus-dark, #303030);
    border: 1px solid var(--altus-border, #e9ecef);
}

/* Card Footer: always takes up space, content fades in on hover */
.team-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--altus-border, #e9ecef);
    margin-top: auto;
}

.team-card__footer .team-card__link {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.team-card:hover .team-card__footer .team-card__link {
    opacity: 1;
}

.team-card__link {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--altus-green, #1DCE79);
    text-decoration: none;
    pointer-events: none;
}

/* --- Responsive --- */
@media screen and (max-width: 1023px) {
    .team-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .team-toolbar {
        gap: 10px;
    }

    .team-toolbar__right {
        margin-left: 0;
        width: 100%;
    }

    .team-search__input {
        flex: 1;
        width: auto;
    }
}

@media screen and (max-width: 767px) {
    .team-toolbar {
        padding: 0 8px;
        gap: 8px;
    }

    .team-toolbar__right {
        flex-direction: row;
    }

    .team-search__input {
        width: 100%;
    }

    .team-search__input:focus {
        width: 100%;
    }

    .team-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
    }

    .team-filters {
        gap: 8px;
        padding: 0 8px;
    }

    .team-filter-btn {
        font-size: 13px;
        padding: 5px 12px;
    }
}

/* Separate services and industries into distinct rows */
.team-card__tags--services {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--brand-border, #e9ecef);
}
.team-card__tags--industries {
    /* Industries row sits below services */
}
