/*
    ESA Contacts (acf/esa-contacts, blocks/esa-contacts/esa-contacts.php): the
    grid of contact cards on news posts. The block's own stylesheet, enqueued
    with the block (inc/acf-blocks.php `enqueue_style`). The card is the legacy
    shared profile card (ported from joshua-tree scss/elements/_profile.scss) and
    the block's grid (scss/blocks/_esa-contacts.scss).
*/

.esa-contacts {
    padding-bottom: var(--wp--preset--spacing--40);
}

.esa-contacts__header {
    border-bottom: 2px solid var(--wp--preset--color--dark-teal);
    margin-bottom: var(--wp--preset--spacing--30);
}

/* Legacy's 160px minimum, less 4px: the article column is 732px here against
   production's 736, and at exactly 160px the fourth card wraps. */
.esa-contacts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr));
    gap: var(--wp--preset--spacing--40);
}

.esa-contacts__card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wp--preset--spacing--10);
}

.esa-contacts__card-header .linkedin {
    width: 1rem;
}

.esa-contacts__card-meta .region {
    font-style: italic;
    color: var(--wp--preset--color--dark-gray);
    font-size: var(--wp--preset--font-size--150);
    line-height: 1.25em;
}

/* The email link is orange, not the card's dark-teal link. */
.esa-contacts .esa-contacts__card-meta .email a {
    color: var(--wp--preset--color--orange);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--100);
    text-decoration: underline;
}

/* The card */
.esa-contacts__card {
    text-align: center;
}

.esa-contacts__card .photo {
    aspect-ratio: 1;
    max-width: 12rem;
    margin: 0 auto;
}

.esa-contacts__card .photo img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.esa-contacts__card .photo a {
    width: 100%;
    height: 100%;
    display: block;
}

.esa-contacts__card .info {
    padding-top: var(--wp--preset--spacing--20);
}

.esa-contacts__card .info a:hover {
    text-decoration: underline;
}

.esa-contacts__card .info .name h3 {
    font-size: clamp(0.875rem, 1.1vw, 1rem);
    font-weight: bold;
}
