/*
 * Leadership template styles
 *
 * Matches the provided PDF comps:
 * - Landing page grid of leaders
 * - fancyBox inline modal for bios
 */

.section-leadership-grid {
    padding: 40px 0 80px;
}

@media (min-width: 768px) {
    .section-leadership-grid {
        padding: 60px 0 110px;
    }
}

.leaders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 100px 32px;
    justify-items: center;
}

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

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

.leader-card {
    width: 100%;
    max-width: 330px;
    text-align: center;
    color: inherit;
    text-decoration: none;
}

.leader-card__img {
    width: 100%;
    background: #fff;
    position: relative;
    overflow: hidden;
}

    .leader-card__img img {
        width: 100%;
        height: auto;
        display: block;
        transition: transform .4s ease;
    }

    /* White gradient overlay */
    .leader-card__img::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to top, rgba(255,255,255,.85) 0%, rgba(255,255,255,.55) 35%, rgba(255,255,255,.15) 65%, rgba(255,255,255,0) 100% );
        opacity: 0;
        transition: opacity .35s ease;
        pointer-events: none;
    }


/* Hover trigger (on whole card) */
.leader-card:hover .leader-card__img::after {
    opacity: 1;
}

/* Optional subtle zoom for polish */
.leader-card:hover .leader-card__img img {
    transform: scale(1.03);
}

/* Hover trigger (on whole card) */
.leader-card:hover .leader-card__title {
    color: #8db7ca;
}

.leader-card__name {
    margin-top: 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.leader-card__title {
    margin-top: 4px;
    color: #e55525;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
}

@media (min-width: 768px) {
    .leader-card__name {
        font-size: 22px;
    }

    .leader-card__title {
        font-size: 15px;
    }
}

/* Modal */

.leader-modal {
    width: 100%;
    max-width: 92vw;
    overflow: hidden;
}

@media (max-width: 767px) {
    .leader-modal.fancybox-content {
        padding: 20px;
    }
}

.leader-modal__inner {
    display: grid;
    grid-template-columns: 1fr;
    background: transparent;
    /*max-height: 78vh;*/
    overflow: auto;
}

@media (min-width: 768px) {
    .leader-modal__inner {
        grid-template-columns: 340px 1fr;
        column-gap: 26px;
    }
}


.leader-modal__img {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

    .leader-modal__img img {
        width: 100%;
        height: auto;
        display: block;
        max-height: 520px;
        object-fit: cover;
    }

.leader-modal__content {
    padding: 15px 0 15px 0;
}

@media (min-width: 768px) {
    .leader-modal__content {
        padding: 48px 32px 28px 0;
    }
}


.leader-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid #d5c99e;
}

.leader-modal__heading h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
}

.leader-modal__title {
    margin: 6px 0 0;
    font-weight: 700;
    color: #e55525;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 12px;
}

.leader-modal__icons {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 6px;
}

    .leader-modal__icons .leader-icon {
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

        /* kill any focus ring styles from theme */
        .leader-modal__icons .leader-icon:focus,
        .leader-modal__icons .leader-icon:focus-visible {
            outline: none;
            box-shadow: none;
        }

        .leader-modal__icons .leader-icon svg {
            width: 18px;
            height: 18px;
            display: block; /* helps centering */
        }

.leader-modal__bio p {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 14px;
}

@media (min-width: 992px) {
    .leader-modal__bio p {
        font-size: 14px;
    }
}

/* Apply border to your modal instead */
.leader-modal {
    background: #fff;
    border: 4px solid #d5c99e;
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
}


    /* Make fancyBox inline content match comp more closely */
    .leader-modal.fancybox-content {
        max-width: 1040px;
    }

.fancybox-slide--html .fancybox-close-small {
    padding: 8px;
    right: 18px;
    top: 18px;
}

@media (max-width: 767px) {
    .fancybox-slide--html .fancybox-close-small {
        right: -12px;
        top: -10px;
    }
}

.fancybox-slide--html .fancybox-close-small:focus {
    outline: none;
}
/* Featured leaders (President & VP) - 2 per row on larger screens */
.leaders-grid--featured {
    margin-bottom: 100px;
}

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

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

/* Featured leaders: center the two cards as a pair */
@media (min-width: 576px) {
    .leaders-grid.leaders-grid--featured {
        grid-template-columns: repeat(2, minmax(0, 330px));
        justify-content: start; /* centers the two columns within the container */
        justify-items: center; /* centers the cards inside the columns */
        column-gap: 72px; /* adjust to match comp spacing */
    }
}

/* --- Modal icon sizing + alignment fix --- */
.leader-modal__header {
    align-items: flex-start; /* keep as-is */
}

.leader-modal__icons {
    margin-top: 2px; /* pull them up */
    gap: 0; /* a bit more breathing room */
    align-items: center; /* vertical align icons inside the row */
}

    /* Make the click target consistent and align the SVG to center */
    .leader-modal__icons .leader-icon {
        width: 40px;
        height: 40px;
        display: inline-flex; /* important: center SVG */
        align-items: center;
        justify-content: center;
    }

        .leader-modal__icons .leader-icon:hover svg {
            fill: #d5c99e;
        }
        /* Increase actual icon size */
        .leader-modal__icons .leader-icon svg {
            width: 40px;
            height: 40px;
            display: block;
        }

        .leader-modal__icons .leader-icon.icon-linkedin {
            width: 34px;
            height: 34px;
        }
/* Align icon group with the heading block (matches comp) */
.leader-modal__header {
    align-items: end;
}

.leader-modal__icons {
    margin-top: 0;
}
