/* Team member cards and the compact character/leader cards. */

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    scroll-margin-top: 8rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.1rem;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.card-header img {
    flex: none;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    transition:
        width 0.2s ease,
        height 0.2s ease,
        transform 0.2s ease;
}

.card:hover .card-header img {
    transform: scale(1.05);
}

.card-titles {
    min-width: 0;
}

.card-titles h3 {
    margin: 0 0 0.15rem;
    font-size: 1.2rem;
}

.card-titles p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-header:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: -3px;
}

.bio {
    display: none;
}

.bio-inner {
    display: none;
}

.bio a {
    color: var(--green);
    text-decoration: none;
}

.bio a:hover {
    color: var(--mint);
    text-decoration: underline;
}

.card.expanded {
    grid-column: 1 / -1;
    border-color: var(--green);
}

.card.expanded:hover {
    transform: none;
}

.card.expanded .card-header {
    padding: 1.1rem 1.1rem 0.75rem;
}

.card.expanded .card-header img {
    width: 5.5rem;
    height: 5.5rem;
}

.card.expanded .bio {
    display: block;
    max-width: none;
    margin: 0 1.1rem;
    padding: 1rem 0 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.7;
    animation: bio-in 0.25s ease both;
}

@keyframes bio-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.expanded .bio > a {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

/* ── Compact character and leader cards ── */

.b_card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.b_card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
    color: var(--text);
    text-decoration: none;
}

.b_card img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.b_card:hover img {
    transform: scale(1.05);
}

.b_card h3 {
    margin: 0.75rem 0 0.15rem;
    font-size: 1.25rem;
}

.b_card > p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card_h {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.b_card > .card_h {
    margin-bottom: 0.9rem;
}

.card_h .card-titles h3 {
    margin: 0 0 0.15rem;
    font-size: 1.25rem;
}

.card_h .card-titles p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .b_card,
    .card {
        max-width: 100%;
    }

    .card.expanded .card-header {
        align-items: flex-start;
    }
}
