/* Explain: Styles for uniform person cards across organizations. */
/* 통합 조직·임원 카드 — 대한민국 청소년총회·전국청소년네트워크·유스온의 인물 카드를
   같은 사진 크기, 같은 이름·직책·소개 줄 간격, 같은 카드 높이의 하나의 모양으로 통일합니다.
   소개 글 길이가 달라도 흔들리지 않도록 사진·직책·이름 높이를 고정하고 소개 영역이 남는 높이를 채웁니다. */

.person-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.person-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 18px 40px rgba(15, 36, 68, 0.13);
    transform: translateY(-4px);
}

.person-card.is-vacant {
    border-style: dashed;
    background: var(--surface-color);
    box-shadow: none;
}

.person-card.is-vacant:hover {
    border-color: var(--border-color);
    box-shadow: none;
    transform: none;
}

/* 사진 — 모든 카드에서 같은 크기·모양 */
.person-photo,
.person-photo-fallback {
    height: 5.5rem;
    width: 5.5rem;
    flex-shrink: 0;
    border-radius: 999px;
    object-fit: cover;
}

.person-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
}

/* 직책 — 한 줄 높이 고정 */
.person-role {
    display: flex;
    min-height: 1.5rem;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 0;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--accent-color);
    overflow-wrap: anywhere;
}

/* 이름 — 한 줄 높이 고정 */
.person-name {
    display: flex;
    min-height: 1.6rem;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0 0;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

/* 소개 — 최대 세 줄, 남는 높이를 채워 카드 높이를 안정시킴 */
.person-bio {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    width: 100%;
    margin: 0.75rem 0 0;
    flex: 1 1 auto;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.person-bio:empty {
    display: none;
}

/* 임기 등 보조 정보 — 카드 하단 같은 위치에 고정 */
.person-term {
    display: flex;
    min-height: 1.15rem;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .person-card {
        padding: 1.35rem 1.1rem;
    }

    .person-photo,
    .person-photo-fallback {
        height: 4.75rem;
        width: 4.75rem;
    }
}