.block-team {
    padding: var(--wp--preset--spacing--80) 0;
}

.block-team__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--50) 1em;
    max-width: 74em;
    margin-left: auto;
    margin-right: auto;
}

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

@media (min-width: 992px) {
    .block-team__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Carousel header: title left, arrows right — same layout as featured posts */
.gsap-slider.block-team__slider {
    align-items: stretch;
    padding: 0 var(--wp--style--root--padding-right) 0 var(--wp--style--root--padding-left);
}

.block-team__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5em;
    width: 100%;
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.block-team__controls {
    margin-left: auto;
}

.block-team__title {
    margin: 0 !important;
    max-width: 30rem;
}

.block-team__title--grid {
    max-width: 74em;
    margin: 0 auto var(--wp--preset--spacing--50);
}

/* Member card */
.block-team__member {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* Image */
.block-team__image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 0.5em;
}

.block-team__image[data-bio] {
    cursor: pointer;
}

.block-team__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bio toggle button — stays above the overlay; label swaps to "Sluiten" when open */
/* "Bio" — a regular (outline) site button next to the contact icons,
   same height as the icon blocks; its width follows the label */
.block-team__bio-button {
    display: flex;
}

/* Exactly as tall as the icon blocks, with the same subtle outline and colour */
.block-team__bio-button.wp-block-button.is-style-outline .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    width: auto;
    height: 2.25rem;
    padding: 0 0.875rem;
    border-color: var(--wp--preset--color--current-15);
    color: currentColor;
    cursor: pointer;
}

/* Close (×) — only visible while the bio is open */
.block-team__bio-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--white) 35%, transparent);
    background: none;
    color: var(--wp--preset--color--white);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}

.block-team__image[data-bio="open"] .block-team__bio-close {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .block-team__bio-close:hover {
        background-color: color-mix(in srgb, var(--wp--preset--color--white) 15%, transparent);
    }
}

/* Bio overlay — slides up over the image from the bottom */
.block-team__image .block-team__bio {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    margin: 0;
    /* Top padding clears the close (×): 0.75rem offset + 2.25rem button + 0.75rem gap */
    padding: 3.75rem 1rem 2rem;
    overflow-y: auto;
    line-height: var(--body-line-height);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.625, 0.05, 0, 1);
}

.block-team__image[data-bio="open"] .block-team__bio {
    transform: translateY(0);
}

/* Name */
.block-team__name {
    margin: 0 !important;
    font-size: var(--wp--preset--font-size--large);
    font-family: var(--wp--preset--font-family--arizona-flare);
    letter-spacing: var(--arizona-tracking-m);
}

/* Role */
.block-team__role {
    font-size: var(--wp--preset--font-size--small);
    margin: 0 !important;
}

/* Contact buttons */
.block-team__buttons {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5em;
}

/* Square icon blocks with a subtle outline */
.block-team__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    color: currentColor;
    border: 1px solid var(--wp--preset--color--current-15);
    text-decoration: none;
    transition: background-color 0.6s cubic-bezier(0.625, 0.05, 0, 1), border-color 0.6s cubic-bezier(0.625, 0.05, 0, 1), color 0.6s cubic-bezier(0.625, 0.05, 0, 1);
}

@media (hover: hover) and (pointer: fine) {
    .block-team__btn:hover {
        background-color: var(--wp--preset--color--accent-4);
        border-color: var(--wp--preset--color--accent-4);
        color: var(--wp--preset--color--white);
    }
}

.block-team__btn[data-whatsapp-modal-trigger] {
    cursor: pointer;
}

.block-team__btn svg {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

/* Bio — static fallback when the member has no image */
.block-team__bio--static {
    margin: 0;
    opacity: 0.7;
    font-size: var(--wp--preset--font-size--small);
    line-height: var(--body-line-height);
    padding-top: 0.25em;
}

/* Empty state */
.block-team__empty {
    text-align: center;
    opacity: 0.5;
}
