/*
Theme Name:   Hello Biz Child - Gia Phả
Theme URI:    https://yoursite.com
Description:  Child theme cho Hello Biz - Tùy chỉnh cho Gia Phả Họ Võ
Author:       Your Name
Author URI:   https://yoursite.com
Template:     hello-biz
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  hello-biz-child
*/

/* ==========================================================================
   Import Parent Theme Styles
   ========================================================================== */
@import url("../hello-biz/style.css");

/* ==========================================================================
   Global Custom Styles
   ========================================================================== */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-light: #e5e7eb;
    --bg-dark: #0f172a;
    --bg-darker: #000000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #111827;
    color: var(--text-light);
}

/* ==========================================================================
   Header Customization
   ========================================================================== */
.site-header {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding a {
    background: linear-gradient(to right, #3b82f6, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
}

.main-navigation a {
    color: var(--text-light);
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--accent-color);
}

/* ==========================================================================
   Family Tree Page Styles
   ========================================================================== */
.family-tree-page {
    padding: 3rem 0;
    min-height: 100vh;
}

.family-tree-header {
    text-align: center;
    margin-bottom: 2rem;
}

.family-tree-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Search Box */
.family-search-container {
    background: rgba(31, 41, 55, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.family-search-box {
    display: flex;
    align-items: center;
    background: #374151;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
}

.family-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 1rem;
}

.family-search-box input::placeholder {
    color: #9ca3af;
}

.family-search-box button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.family-search-box button:hover {
    background: #1d4ed8;
}

/* Tree Container */
.tree-container-wrapper {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 600px;
}

#family-tree-container {
    width: 100%;
    height: 600px;
    overflow: auto;
    position: relative;
}

/* Orgchart Customization */
.orgchart {
    background: transparent !important;
}

.orgchart .node {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border: 2px solid var(--accent-color) !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.orgchart .node:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
}

.orgchart .node .title {
    color: var(--accent-color) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    margin-bottom: 4px;
}

.orgchart .node .content {
    color: var(--text-light) !important;
    font-size: 0.875rem !important;
}

.orgchart .lines .downLine {
    background-color: var(--accent-color) !important;
}

.orgchart .lines .leftLine,
.orgchart .lines .rightLine,
.orgchart .lines .topLine {
    border-color: var(--accent-color) !important;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.zoom-controls button {
    width: 40px;
    height: 40px;
    background: #1f2937;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.zoom-controls button:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.generation-filter select {
    background: #1f2937;
    border: 2px solid var(--accent-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}

.export-button {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.export-button:hover {
    background: #d97706;
    transform: translateY(-2px);
}

/* Legend */
.family-legend {
    background: rgba(31, 41, 55, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
}

.family-legend h3 {
    color: #3b82f6;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-dot.male {
    background-color: #2563eb;
}

.legend-dot.female {
    background-color: #ec4899;
}

.legend-dot.current {
    background-color: var(--accent-color);
}

.legend-dot.deceased {
    background-color: #6b7280;
}

/* ==========================================================================
   Member Profile Styles
   ========================================================================== */
.member-profile-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.member-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
}

.member-info h2 {
    color: var(--accent-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.member-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.meta-item strong {
    color: var(--text-light);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .family-tree-header h1 {
        font-size: 1.75rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .generation-filter select,
    .export-button {
        width: 100%;
        justify-content: center;
    }
    
    #family-tree-container {
        height: 400px;
    }
    
    .member-header {
        flex-direction: column;
        text-align: center;
    }
    
    .legend-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Loading & Animation
   ========================================================================== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(245, 158, 11, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Footer Customization
   ========================================================================== */
.site-footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    padding: 3rem 0;
}

.footer-widget-area h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-widget-area a {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer-widget-area a:hover {
    color: var(--accent-color);
}