.hp-genealogy-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    background-color: #f8f9fa !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1e21;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 15px;
    font-size: 14px;
}

.breadcrumbs a {
    color: #004466;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Tree Filter */
.hp-tree-filter {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

.hp-tree-filter .filter-label {
    font-weight: 500;
    margin-right: 15px;
    color: #333;
}

.hp-tree-filter .tree-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    background: #f0f0f0;
    color: #333;
}

.hp-tree-filter .tree-btn.active {
    background: #004466;
    color: white;
    font-weight: 600;
}

/* Page Header */
.hp-page-header {
    background: #5c5c5c;
    color: white;
    padding: 15px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
}

.hp-page-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.hp-page-header .count {
    color: #e0e0e0;
    font-size: 16px;
}

/* Alphabet Navigation */
.hp-alphabet-nav {
    background: white;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.hp-alphabet-nav .letter-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
}

.hp-alphabet-nav .letter-row:last-child {
    margin-bottom: 0;
}

.hp-alphabet-nav .letter-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.hp-alphabet-nav .letter-link:hover {
    background: #007cba;
    color: white;
}

/* Letter Sections */
.hp-letter-section {
    background: white;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.hp-letter-heading {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 0;
    padding: 10px 15px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1e21;
    border-bottom: 2px solid #dee2e6;
}

.hp-surnames-list {
    padding: 20px 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 40px;
}

.hp-surname-item {
    padding: 4px 0;
}

.hp-surname-item a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.hp-surname-item a:hover {
    color: white;
    background: #007cba;
    padding: 2px 4px;
    border-radius: 3px;
}

.hp-surname-count {
    color: #666;
    font-weight: 600;
    margin-left: 6px;
}

/* Individuals Section */
.hp-individuals-section h2 {
    background: #5c5c5c;
    color: white;
    padding: 15px 30px;
    margin: 0 0 30px 0;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 600;
}

.hp-individuals-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.hp-individual-item {
    padding: 15px 20px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.hp-individual-item:hover {
    background: #f8f9fa;
}

.hp-individual-item strong a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.hp-individual-item strong a:hover {
    color: white;
    background: #007cba;
    padding: 2px 4px;
    border-radius: 3px;
}

.hp-dates {
    color: #6c757d;
    display: inline;
    margin-left: 6px;
}

@media (max-width: 768px) {
    .hp-genealogy-container {
        padding: 15px !important;
    }
    
    .hp-genealogy-container h1,
    .hp-browse-section h2 {
        font-size: 22px;
        padding: 20px;
    }
    
    .hp-surnames-list {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .hp-individuals-list {
        grid-template-columns: 1fr !important;
    }
    
    .hp-alphabet-nav {
        padding: 15px;
    }
    
    .hp-letter-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .hp-letter-heading {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .hp-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}