
/* Ancestry.com Style Cards */
.ancestry-card {
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.ancestry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.ancestry-card-compact {
    transition: all 0.2s ease;
    background: #ffffff;
}

.ancestry-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.12) !important;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.ancestry-card-mini {
    transition: all 0.2s ease;
    background: #ffffff;
}

.ancestry-card-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1) !important;
}

/* Smooth animations for profile photos */
.ancestry-card img,
.ancestry-card-compact img,
.ancestry-card-mini img {
    transition: all 0.3s ease;
}

.ancestry-card:hover img {
    transform: scale(1.05);
}

.ancestry-card-compact:hover img,
.ancestry-card-mini:hover img {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ancestry-card,
    .ancestry-card-compact {
        margin-bottom: 0.5rem;
    }
}

/* Pedigree Chart Styles */
.pedigree-chart {
    position: relative;
    width: 1100px;
    min-height: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border-radius: 16px;
}

.pedigree-column {
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 1000px;
}

.pedigree-generation {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 30px;
}

.pedigree-generation.gen-0 {
    justify-content: center;
}

.pedigree-generation.gen-1 {
    justify-content: center;
    gap: 100px;
}

.pedigree-generation.gen-2 {
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

/* Ancestor columns layout */
.pedigree-generation.gen-ancestors {
    display: flex;
    justify-content: center;
    gap: 80px;
    align-items: flex-start;
}

.ancestor-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

/* Grandparents group boxes - beautiful shadowed containers */
.grandparents-group {
    background: white;
    border-radius: 16px;
    padding: 18px 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
}

.grandparents-group:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.grandparents-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.grandparents-group.paternal-group::before {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.grandparents-group.maternal-group::before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

/* Parents group box - beautiful shadowed container */
.parents-group {
    background: white;
    border-radius: 18px;
    padding: 20px 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #e8e8e8;
}

.parents-group:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.parents-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Section Labels */
.pedigree-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    text-align: center;
    margin-bottom: 10px;
    padding: 0;
}

.grandparents-group .pedigree-section-label {
    color: #475569;
}

.parents-group .pedigree-section-label {
    color: #667eea;
    font-size: 0.85rem;
}

.spouses-group .pedigree-section-label {
    color: #f59e0b;
}

.children-group .pedigree-section-label {
    color: #10b981;
}

.siblings-label {
    color: #4facfe;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Pedigree box styling */.pedigree-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    width: 120px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: visible;
}

.pedigree-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pedigree-box:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.pedigree-box.pedigree-person {
    border-width: 3px;
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    width: 140px;
    min-height: 140px;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.15), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.pedigree-box.pedigree-person::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

/* Make spouse cards match the main person card styling */
.spouses-group .pedigree-box {
    border-width: 3px;
    border-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
    width: 140px;
    min-height: 140px;
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.15), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.spouses-group .pedigree-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 16px 16px 0 0;
}

.pedigree-box.pedigree-small {
    width: 110px;
    min-height: 110px;
    padding: 10px;
    border-width: 2px;
}

/* Bordures colorées selon le genre */
.pedigree-box.gender-m,
.pedigree-box.gender-male {
    border-color: #60a5fa;
}

.pedigree-box.gender-m:hover,
.pedigree-box.gender-male:hover {
    border-color: #3b82f6;
}

.pedigree-box.gender-m::before,
.pedigree-box.gender-male::before {
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
}

.pedigree-box.gender-f,
.pedigree-box.gender-female {
    border-color: #f472b6;
}

.pedigree-box.gender-f:hover,
.pedigree-box.gender-female:hover {
    border-color: #ec4899;
}

.pedigree-box.gender-f::before,
.pedigree-box.gender-female::before {
    background: linear-gradient(90deg, #f472b6 0%, #ec4899 100%);
}

.pedigree-box.pedigree-empty {
    border-style: dashed;
    border-color: #cbd5e0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
}

.pedigree-box.pedigree-empty::before {
    display: none;
}

.pedigree-box.pedigree-empty:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #667eea;
    transform: translateY(-2px);
}

.pedigree-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.pedigree-add-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a0 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.pedigree-add-btn:active {
    transform: translateY(0) scale(0.98);
}

.pedigree-add-btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    pointer-events: none; /* Let clicks pass through to parent link */
}

.pedigree-box-link:hover .pedigree-add-btn-small {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a0 100%);
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.5);
}

.pedigree-box.pedigree-more {
    border-color: #f5576c;
    background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
    cursor: default;
    border-width: 2px;
}

.pedigree-box.pedigree-more::before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    opacity: 0.7;
}

.pedigree-box.pedigree-more:hover {
    transform: none;
    border-color: #f5576c;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.15);
}

/* Siblings Chart Specific Styles */
.siblings-chart {
    width: 100%;
    min-height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 30px 0;
    background: #f8f9fa;
    border-radius: 16px;
}

.pedigree-row-horizontal {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Descendants Chart Specific Styles */
.descendants-chart {
    width: 1100px;
    min-height: 350px;
    background: #f8f9fa;
}

.gen-0-descendants {
    justify-content: center;
    gap: 100px;
}

/* Marriage connection overrides for descendants view */
.gen-0-descendants.with-marriage-connection {
    gap: 80px !important;
    position: relative;
}

.gen-1-descendants {
    justify-content: center;
}

/* Spouses Group Box - Minimal styling to match person cards */
.spouses-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Grandparents Group with Marriage Connection */
.grandparents-group {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.grandparents-group.paternal-group::before,
.grandparents-group.maternal-group::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;  /* Shorter line for grandparents */
    height: 2px;
    background: linear-gradient(90deg, #6366f1 0%, #4f46e5 50%, #6366f1 100%);
    border-radius: 1px;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.grandparents-group.paternal-group::after,
.grandparents-group.maternal-group::after {
    display: none; /* Remove hearts, keep only lines */
}

/* Parents Marriage Connection - FINAL VERSION */
.gen-ancestors-parents-connection {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.gen-ancestors-parents-connection::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;  /* Medium length - balanced */
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 50%, #8b5cf6 100%);
    border-radius: 2px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.gen-ancestors-parents-connection::after {
    display: none; /* Remove heart, keep only line */
}

/* Parents Marriage Connection - Positioned between parents */
.pedigree-generation.gen-ancestors.marriage-connection {
    position: relative;
}

.pedigree-generation.gen-ancestors.marriage-connection::before {
    display: none; /* Disable old connection */
}

.pedigree-generation.gen-ancestors.marriage-connection::after {
    content: '�' !important;
    position: absolute !important;
    bottom: -15% !important;  /* Move much lower to be between parent boxes */
    left: 50% !important;
    transform: translate(-50%, 50%) !important;
    background: white !important;
    border: 3px solid #8b5cf6 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    display: none; /* Disable old connection */
}

.spouses-group::before {
    display: none; /* Remove to match person card styling */
}

/* Spouse hover effect removed to match person cards */

/* Children Group Box */
.children-group {
    background: white;
    border-radius: 18px;
    padding: 20px 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #e8e8e8;
    max-width: 900px;
}

.children-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}

.children-group:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.08);
}

.pedigree-row-horizontal {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 1000px;
}

.pedigree-box.pedigree-person-sibling {
    border-width: 3px;
    border-color: #4facfe;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    order: 0;
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
    width: 160px;
    min-height: 160px;
}

.pedigree-box.pedigree-person-sibling::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 16px 16px 0 0;
}

.pedigree-box.pedigree-sibling {
    border-color: #4facfe;
}

.pedigree-box.pedigree-sibling:hover {
    border-color: #00f2fe;
}

.pedigree-box.pedigree-half-sibling {
    border-color: #ffa726;
    border-style: dashed;
}

.pedigree-box.pedigree-half-sibling:hover {
    border-color: #ff9800;
}

.pedigree-box.pedigree-half-sibling::before {
    background: linear-gradient(90deg, #ffa726 0%, #ff9800 100%);
}

/* Pedigree box clickable wrapper */
.pedigree-box-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.pedigree-box-link:hover {
    transform: translateY(-2px);
}

.pedigree-box-link:hover .pedigree-box {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #7c3aed;
}

.pedigree-box-link:hover .pedigree-box.pedigree-person {
    border-color: #7c3aed;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.pedigree-box-link:hover .pedigree-box.pedigree-sibling {
    border-color: #10b981;
}

.pedigree-box-link:hover .pedigree-box.pedigree-half-sibling {
    border-color: #f59e0b;
}

/* Photo and icon styles */
.pedigree-photo {
    margin-bottom: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
}

.pedigree-photo img,
.pedigree-photo-small img {
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pedigree-box:hover .pedigree-photo img,
.pedigree-box:hover .pedigree-photo-small img {
    box-shadow: 0 4px 12px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
    transform: scale(1.05);
}

/* Gender placeholder styling */
.pedigree-gender-placeholder {
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    color: white;
    transition: all 0.3s ease;
}

.pedigree-box:hover .pedigree-gender-placeholder {
    box-shadow: 0 4px 12px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
    transform: scale(1.05);
}

.pedigree-gender-placeholder.gender-m,
.pedigree-gender-placeholder.gender-male {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.pedigree-gender-placeholder.gender-f,
.pedigree-gender-placeholder.gender-female {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

.pedigree-gender-placeholder.gender-u,
.pedigree-gender-placeholder.gender-unknown,
.pedigree-gender-placeholder:not([class*="gender-"]) {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.pedigree-photo-small {
    margin-bottom: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
}

.pedigree-photo-small img {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    flex-shrink: 0;
}

.pedigree-gender-placeholder {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.pedigree-name {
    font-weight: 600;
    font-size: 0.75rem;
    color: #1a202c;
    margin-bottom: 3px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    word-break: break-word;
}

.pedigree-name-small {
    font-weight: 600;
    font-size: 0.65rem;
    color: #1a202c;
    margin-bottom: 2px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    word-break: break-word;
}

.pedigree-dates {
    font-size: 0.6rem;
    color: #718096;
    font-weight: 500;
}

.pedigree-dates-small {
    font-size: 0.55rem;
    color: #718096;
    font-weight: 500;
}

.pedigree-gender-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 4px;
}

.pedigree-gender-circle-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 3px;
}

.pedigree-gender-circle.male,
.pedigree-gender-circle-small.male {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.pedigree-gender-circle.female,
.pedigree-gender-circle-small.female {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    color: white;
}

.pedigree-gender-circle.unknown,
.pedigree-gender-circle-small.unknown {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

.pedigree-unknown {
    font-size: 1.5rem;
    color: #cbd5e0;
    font-weight: 300;
}

.pedigree-unknown-small {
    font-size: 1.2rem;
    color: #cbd5e0;
    font-weight: 300;
}

/* Desktop-only theme - no responsive breakpoints needed */

/* Main Profile Photo Styling - Larger and distinct from pedigree photos */
.profile-photo {
    width: 300px !important;
    height: 300px !important;
    object-fit: cover;
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

/* Main Profile Placeholder - Larger for people without photos */
.profile-photo.pedigree-gender-placeholder,
div.profile-photo.pedigree-gender-placeholder {
    width: 300px !important;
    height: 300px !important;
    min-width: 300px !important;
    min-height: 300px !important;
    max-width: 300px !important;
    max-height: 300px !important;
    font-size: 10rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Gradient backgrounds based on gender */
.profile-photo.pedigree-gender-placeholder.gender-m,
.profile-photo.pedigree-gender-placeholder.gender-male {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-photo.pedigree-gender-placeholder.gender-f,
.profile-photo.pedigree-gender-placeholder.gender-female {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.profile-photo.pedigree-gender-placeholder.gender-u,
.profile-photo.pedigree-gender-placeholder.gender-unknown,
.profile-photo.pedigree-gender-placeholder:not([class*="gender-"]) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Add subtle pattern overlay */
.profile-photo.pedigree-gender-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.profile-photo.pedigree-gender-placeholder i {
    font-size: 10rem !important;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.profile-photo.pedigree-gender-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Inline styles moved to classes */
.profile-photo-clickable {
    cursor: pointer;
}

.card-header-events {
    background: #e9ecef !important;
    color: #212529 !important;
}

.card-header-events h5,
.card-header-events .badge {
    color: #212529 !important;
}

.card-body-events {
    background-color: #fafbfc;
    overflow-x: auto;
    padding: 2rem !important;
}

.card-header-media {
    background: #e9ecef !important;
    color: #212529 !important;
}

.card-header-media h5,
.card-header-media .badge {
    color: #212529 !important;
}

.card-body-media {
    background-color: #fafbfc;
    padding: 2rem !important;
}

.card-header-documents {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-body-documents {
    background-color: #fafbfc;
    overflow-x: auto;
    padding: 2rem !important;
}

.family-completeness-card {
    border-width: 3px;
}

.completeness-icon {
    width: 70px;
    height: 70px;
}

.completeness-metric-icon {
    width: 35px;
    height: 35px;
}

.verification-modal {
    z-index: 1055;
}

.verification-modal-dialog {
    z-index: 1056;
}

.incomplete-warning {
    display: none;
}

.spousal-families-card {
    background-color: #e9ecef;
}

.gallery-item-clickable {
    cursor: pointer;
}

.profile-photo-modal {
    z-index: 10000;
}

.profile-photo-modal-header {
    position: relative;
    z-index: 10050;
}

.profile-photo-modal-close {
    position: relative;
    z-index: 10051;
}

.modal-body-photo {
    position: relative;
    z-index: 1;
}

.modal-photo-img {
    max-height: 70vh;
    border-radius: 8px;
    pointer-events: none;
}

.modal-close-button {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Marriage Connection Line Styles */
.pedigree-generation.marriage-connection {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.pedigree-generation.marriage-connection::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
    border-radius: 2px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.pedigree-generation.marriage-connection::after {
    display: none; /* Remove heart, keep only line */
}

/* Alternative heart icon if emoji doesn't work well */
.pedigree-generation.marriage-connection.use-icon::after {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f59e0b' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes heartbeat {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Ensure proper spacing in the descendants generation */
.gen-0-descendants.with-marriage-connection {
    gap: 80px !important;
    position: relative;
}

/* Hover effects for the marriage connection */
.pedigree-generation.marriage-connection:hover::before {
    background: linear-gradient(90deg, #d97706 0%, #b45309 50%, #d97706 100%);
    height: 5px;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.5);
}

.pedigree-generation.marriage-connection:hover::after {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: #d97706;
}

/* Desktop-only theme - no mobile responsive rules needed */

/* Add Spouse Button Styling */
.pedigree-add-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pedigree-box:hover .pedigree-add-btn {
    opacity: 1;
}

.pedigree-box.pedigree-empty:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pedigree-box.pedigree-empty .pedigree-unknown {
    font-size: 2.5rem;
    font-weight: bold;
}

.pedigree-box.pedigree-empty .pedigree-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
}