/* ─── 글로벌 스타일 ────────────────────────────────────────────── */
:root {
    --color-male: #1976d2;
    --color-male-bg: #e3f2fd;
    --color-female: #c62828;
    --color-female-bg: #fce4ec;
    --color-neutral: #546e7a;
    --color-neutral-bg: #f5f5f5;
    --node-border-radius: 8px;
}

body {
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    font-size: 0.9rem;
}

/* ─── 네비게이션 ────────────────────────────────────────────────── */
.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

/* ─── 홈 페이지 카드 ────────────────────────────────────────────── */
.hover-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}
.hover-card .card-body {
    color: #333;
}

/* ─── 가계도 레이아웃 ───────────────────────────────────────────── */
.tree-layout {
    display: flex;
    overflow: hidden;
}

.tree-left-panel {
    flex-shrink: 0;
    transition: width 0.2s;
}

.tree-right-panel {
    flex-shrink: 0;
    transition: width 0.2s;
}

/* ─── SVG 노드 스타일 ───────────────────────────────────────────── */
.person-node {
    transition: filter 0.15s ease;
}

.person-node:hover .node-rect {
    stroke-width: 2 !important;
}

.spouse-edge {
    transition: stroke 0.2s;
}

.parent-child-edge {
    transition: stroke 0.2s;
}

/* ─── 인물 목록 (가계도 좌측) ──────────────────────────────────── */
.tree-person-item:hover {
    background: #f0f4ff !important;
}

.tree-person-item.active {
    background: #e3f2fd !important;
    border-left: 3px solid #1976d2;
}

/* ─── 관리자 인물 목록 ──────────────────────────────────────────── */
.admin-person-item:hover {
    background: #f8f9fa;
}

/* ─── 인물 카드 (목록 페이지) ──────────────────────────────────── */
.person-card:hover {
    border-color: #aaa !important;
    transform: translateY(-2px);
    transition: all 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* ─── 호칭 결과 강조 ────────────────────────────────────────────── */
#tr-title {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.1);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── 반응형 ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tree-left-panel {
        display: none !important;
    }
    .tree-right-panel {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        min-width: 100% !important;
        max-height: 55vh;
        overflow-y: auto;
        z-index: 50;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 16px rgba(0,0,0,.2);
    }
}

/* ─── Bootstrap 보조 유틸 ──────────────────────────────────────── */
.min-width-0 { min-width: 0; }
.alert-sm { font-size: 0.82rem; }
