/*
 * Team/Board member bio modal — replaces the old click-to-expand caret.
 * Colors/fonts are pulled from the live card styling that actually renders
 * these cards (Divi Theme Options > Custom CSS, ".team-column" rules —
 * title color #18a3cc, description #333/1.5 line-height, 25px-rounded
 * rectangular photos), not reinvented, so the modal reads as the same
 * component as the card rather than a new design.
 */

.read-more-trigger {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #18a3cc;
    cursor: pointer;
}

.read-more-trigger:hover,
.read-more-trigger:focus-visible {
    text-decoration: underline;
    outline: none;
}

body.team-modal-open {
    overflow: hidden;
}

.team-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 31, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
}

.team-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.team-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 25px;
    padding: 48px 40px 40px;
    text-align: center;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease-in-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.team-modal-overlay.is-open .team-modal {
    transform: translateY(0) scale(1);
}

.team-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f7;
    color: #333333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.team-modal-close:hover,
.team-modal-close:focus-visible {
    background: #18a3cc;
    color: #ffffff;
    outline: none;
}

.team-modal-photo {
    width: auto;
    height: 220px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 25px;
    margin: 0 auto 20px;
}

.team-modal-name {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 4px;
}

.team-modal-title {
    font-size: 16px;
    color: #18a3cc;
    margin-top: 0;
    margin-bottom: 20px;
}

.team-modal-description {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.team-modal-description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .team-modal {
        padding: 40px 24px 32px;
    }
}
