/* =================================================================
   BIO-PAGE.CSS - Biography Page Specific Styles
   Genealogy Research Platform - Person Biography Components
   ================================================================= */

/* =================================================================
   PERSON HEADER SECTION
   ================================================================= */

.person-header {
    border-bottom: 3px solid #3498db;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.person-name {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.person-dates {
    font-size: 1.2em;
    color: #7f8c8d;
    font-style: italic;
}

.confidence-indicator {
    display: inline-block;
    padding: 4px 12px;
    background: #f39c12;
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    margin-left: 15px;
    font-style: normal;
}

/* =================================================================
   BIOGRAPHY CONTENT
   ================================================================= */

.biography-content {
    line-height: 1.8;
}

.biography-section-title {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3em;
}

.biography-text {
    margin-top: 15px;
    line-height: 1.8;
}

/* Research Notes Box */
.research-notes {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.notes-title {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* =================================================================
   TIMELINE COMPONENTS
   ================================================================= */

/* Timeline Container */
.timeline-container {
    margin-top: 30px;
}

/* Timeline Toggle Button */
.timeline-toggle {
    background: #ecf0f1;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
    font-family: inherit;
}

.timeline-toggle:hover {
    background: #bdc3c7;
}

.timeline-toggle.active {
    background: #3498db;
    color: white;
}

/* Timeline Track */
.timeline {
    display: none;
    position: relative;
    padding-left: 30px;
}

.timeline.active {
    display: block;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
}

/* Timeline Events */
.timeline-event {
    position: relative;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-event:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    border: 3px solid white;
}

.event-date {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.95em;
}

.event-type {
    color: #3498db;
    font-weight: 600;
    margin: 5px 0;
}

.event-role {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9em;
}

/* Expanded Event Details */
.expanded-details {
    margin-top: 10px;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 6px;
    font-size: 0.9em;
}

.details-btn {
    margin-top: 8px;
    padding: 4px 8px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

/* =================================================================
   FAMILY SIDEBAR COMPONENTS
   ================================================================= */

/* Family Groups */
.family-group {
    margin-bottom: 15px;
}

.family-group strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* Family Members */
.family-member {
    padding: 10px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.family-member:hover {
    background: #e3f2fd;
    transform: translateX(3px);
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
}

.member-dates {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 2px;
}

/* =================================================================
   RESEARCH COMPONENTS
   ================================================================= */

/* Research Gaps */
.research-gap {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin: 10px 0;
    border-radius: 4px;
}

.gap-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 5px;
}

.gap-description {
    font-size: 0.9em;
    color: #6c5700;
    margin-top: 5px;
}

/* =================================================================
   EXPORT OPTIONS
   ================================================================= */

.export-options {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* =================================================================
   VIEW CONTENT MANAGEMENT
   ================================================================= */

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* =================================================================
   FAMILY TREE COMPONENTS
   ================================================================= */

/* Family Tree Container */
.family-tree-simple {
    padding: 20px 0;
}

/* Tree Levels - Hierarchical Sections */
.tree-level {
    margin-bottom: 40px;
    position: relative;
}

.tree-level.parents {
    text-align: center;
}

.tree-level.key-person {
    text-align: center;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.tree-level.children {
    margin-top: 30px;
}

/* Tree Section Titles */
.tree-section-title {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

/* Tree Persons Container */
.tree-persons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Individual Tree Person Cards */
.tree-person {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
    border: 2px solid transparent;
}

/* Tree Person Types */
.tree-person.main {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: bold;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.tree-person.spouse {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    cursor: pointer;
}

.tree-person.spouse:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.tree-person.child {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    cursor: pointer;
}

.tree-person.child:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.tree-person.unknown {
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    color: #7f8c8d;
    font-style: italic;
}

/* Tree Person Text Elements */
.person-name-tree {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.person-dates-tree {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.person-status {
    font-size: 0.85em;
    opacity: 0.8;
    font-style: italic;
}

.marriage-note {
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 5px;
    font-style: italic;
}

/* Spouse Group Layout */
.spouses-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Children Organization */
.children-group {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.children-subtitle {
    font-size: 1em;
    color: #27ae60;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.children-group .tree-person {
    margin: 8px 0;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   FAMILY TREE RESPONSIVE DESIGN
   ================================================================= */

/* Tablet Adjustments */
@media (max-width: 1024px) {
    .spouses-group {
        flex-direction: column;
        align-items: center;
    }
    
    .tree-person {
        min-width: 180px;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .family-tree-simple {
        padding: 15px 0;
    }
    
    .tree-level {
        margin-bottom: 30px;
    }
    
    .tree-level.key-person {
        padding: 15px;
        margin: 20px 0;
    }
    
    .tree-person {
        min-width: 160px;
        padding: 12px 15px;
    }
    
    .tree-person.main {
        transform: scale(1.05);
    }
    
    .person-name-tree {
        font-size: 1em;
    }
    
    .children-group {
        padding: 12px;
        margin-bottom: 20px;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .tree-person {
        min-width: 140px;
        padding: 10px 12px;
    }
    
    .spouses-group {
        gap: 15px;
    }
    
    .tree-section-title {
        font-size: 1.1em;
    }
    
    .children-subtitle {
        font-size: 0.9em;
    }
}

/* =================================================================
   FAMILY TREE ACCESSIBILITY
   ================================================================= */

/* Focus States for Tree Navigation */
.tree-person:focus {
    outline: 3px solid #f39c12;
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .tree-person {
        border: 2px solid #000;
    }
    
    .tree-person.unknown {
        border: 2px solid #666;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .tree-person {
        transition: none;
    }
    
    .tree-person:hover {
        transform: none;
    }
}

/* =================================================================
   RESPONSIVE ADJUSTMENTS - BIOGRAPHY SPECIFIC
   ================================================================= */

/* Tablet Adjustments */
@media (max-width: 1024px) {
    .person-name {
        font-size: 2.2em;
    }
    
    .timeline {
        padding-left: 25px;
    }
    
    .timeline::before {
        left: 12px;
    }
    
    .timeline-event::before {
        left: -32px;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .person-name {
        font-size: 2em;
    }
    
    .person-dates {
        font-size: 1.1em;
    }
    
    .confidence-indicator {
        display: block;
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-event::before {
        left: -27px;
    }
    
    .biography-section-title {
        font-size: 1.2em;
    }
    
    .family-member:hover {
        transform: none;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .person-name {
        font-size: 1.8em;
    }
    
    .timeline-event {
        padding: 12px 15px;
    }
    
    .research-notes {
        padding: 15px;
    }
    
    .sidebar-card {
        padding: 15px;
    }
}