/* ============================================================================
   Board of Directors — executive leadership card grid
   Scoped under .board-grid / .board-* to avoid leaking into global styles.
   Palette: gold #B8860B (accents/hover), silver #e8eaed/#d8dade/#b0b4ba
            (structure), slate #212529/#495057/#6c757d (text),
            teal #00897b (sparingly). No blue.
   ========================================================================== */

/* --- Intro + section heading ------------------------------------------- */
.board-intro {
    color: #495057;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.board-section-heading {
    position: relative;
    text-align: left;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: .2px;
    color: #212529;
    padding-bottom: .6rem;
    margin: 1.75rem 0 1.5rem;
    border-bottom: 1px solid #e8eaed;
}

.board-section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 3px;
    background: #B8860B;
    border-radius: 2px;
}

/* --- Responsive grid (mobile-first) ------------------------------------ */
/* 1 col phones -> 2 tablets -> 3 small desktop -> 4 large desktop.        */
.board-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.board-grid *,
.board-grid *::before,
.board-grid *::after {
    box-sizing: border-box;
}

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

@media (min-width: 992px) {
    .board-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

@media (min-width: 1400px) {
    .board-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* --- Card --------------------------------------------------------------- */
.board-card {
    display: flex;
    flex-direction: column;
    min-width: 0;                       /* never push the grid wider */
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(33, 37, 41, .04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.board-card:hover,
.board-card:focus-within {
    transform: translateY(-6px);
    border-color: #d8dade;
    box-shadow: 0 14px 30px rgba(33, 37, 41, .12);
}

/* --- Photo -------------------------------------------------------------- */
.board-card__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;                /* uniform portrait framing */
    background: linear-gradient(160deg, #f4f5f7 0%, #e8eaed 100%);
    overflow: hidden;
}

.board-card__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .45s ease;
    z-index: 1;                          /* sits over the initials fallback */
}

/* Initials fallback — shown behind the photo. If the image is missing/broken
   (e.g. a member with no uploaded picture) a small external script hides the
   <img>, revealing these initials on the gradient instead of a broken-image
   icon. CSP blocks inline onerror=, hence the external script. */
.board-card__initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #b0b4ba;
    -webkit-user-select: none;
    user-select: none;
    z-index: 0;
}
.board-card__photo img.is-broken { display: none; }

.board-card:hover .board-card__photo img,
.board-card:focus-within .board-card__photo img {
    transform: scale(1.04);
}

/* top accent line that reveals in gold on hover */
.board-card__photo::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #00897b;                /* teal, used sparingly */
    opacity: 0;
    transition: opacity .25s ease;
}

.board-card:hover .board-card__photo::after,
.board-card:focus-within .board-card__photo::after {
    opacity: 1;
}

/* --- Body --------------------------------------------------------------- */
.board-card__body {
    flex: 1 1 auto;
    padding: 1.1rem 1.15rem 1.25rem;
    border-top: 3px solid transparent;
    transition: border-color .25s ease;
}

.board-card:hover .board-card__body,
.board-card:focus-within .board-card__body {
    border-top-color: #B8860B;          /* gold accent on hover */
}

.board-card__name {
    margin: 0 0 .35rem;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    color: #212529;
    word-break: break-word;
}

.board-card__prefix {
    color: #6c757d;
    font-weight: 600;
}

.board-card__title {
    margin: 0;
    font-size: .9rem;
    line-height: 1.45;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* --- Lead (Governor / chair) card -------------------------------------- */
/* Spans full width on its own row and gets a gold-framed treatment.       */
.board-card--lead {
    grid-column: 1 / -1;
    flex-direction: row;
    border-color: #d8dade;
    box-shadow: 0 6px 22px rgba(33, 37, 41, .10);
}

.board-card--lead .board-card__photo {
    flex: 0 0 42%;
    max-width: 320px;
    aspect-ratio: auto;
    align-self: stretch;
    min-height: 260px;
}

.board-card--lead .board-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 1.75rem;
    border-top: none;
    border-left: 4px solid #B8860B;     /* gold spine */
}

.board-card--lead:hover .board-card__body,
.board-card--lead:focus-within .board-card__body {
    border-top-color: transparent;
}

.board-card--lead .board-card__name {
    font-size: 1.5rem;
}

.board-card--lead .board-card__title {
    font-size: 1rem;
    color: #495057;
}

/* Badge on the lead photo */
.board-card__badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: inline-block;
    padding: .3rem .7rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #ffffff;
    background: #B8860B;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(33, 37, 41, .25);
}

/* On phones, the lead card stacks like the others */
@media (max-width: 575.98px) {
    .board-card--lead {
        flex-direction: column;
    }

    .board-card--lead .board-card__photo {
        flex: none;
        max-width: 100%;
        width: 100%;
        aspect-ratio: 4 / 5;
        min-height: 0;
    }

    .board-card--lead .board-card__body {
        border-left: none;
        border-top: 4px solid #B8860B;
        padding: 1.1rem 1.15rem 1.25rem;
    }

    .board-card--lead .board-card__name {
        font-size: 1.25rem;
    }
}
