/* Salhab Family Tree - Main Stylesheet */

:root {
    /* Blue to Dark Blue Theme */
    --primary: #1e3a8a;
    --primary-dark: #0f172a;
    --primary-light: #60a5fa;
    --secondary: #3b82f6;
    --accent: #93c5fd;
    --light-blue: #dbeafe;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #cbd5e1;
    --bg-light: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-bottom: 3rem;
}

/* Navigation */
.navbar-dark {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0.25rem;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--accent) 100%);
    border-bottom: 2px solid var(--primary-light);
    font-weight: 600;
    color: var(--primary-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.input-group-text {
    background-color: var(--light-blue);
    border-color: var(--border-color);
    color: var(--primary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-info {
    background-color: var(--light-blue);
    color: var(--primary-dark);
}

/* Tables */
.table {
    background-color: white;
}

.table thead th {
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: 500;
    padding: 0.875rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-light);
}

.table-hover tbody tr:hover {
    background-color: var(--light-blue);
    cursor: pointer;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    margin-top: auto;
}

.text-primary-light {
    color: var(--primary-light) !important;
}

.text-light-gray {
    color: #94a3b8 !important;
}

.footer a:hover {
    color: var(--accent) !important;
    transition: color 0.2s ease;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Stats Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(30, 58, 138, 0.2);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Login/Register Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--light-blue) 0%, white 100%);
}

.auth-card {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-card .card-body {
    padding: 2.5rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Member Profile Card */
.member-card {
    text-align: center;
    padding: 2rem;
}

.member-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    margin-bottom: 1rem;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.member-info {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

/* Gender Indicators */
.gender-badge-male {
    background-color: #3b82f6;
    color: white;
}

.gender-badge-female {
    background-color: #ec4899;
    color: white;
}

.gender-badge-other {
    background-color: #6b7280;
    color: white;
}

/* Status Indicators */
.status-living {
    color: var(--success);
}

.status-deceased {
    color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-primary {
    border-color: var(--primary) !important;
}

.bg-light-blue {
    background-color: var(--light-blue);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
}