/* ========================================
   BEFINDX GLOBAL THEME SYSTEM
   Prefix: bfx-
   ======================================== */

/* CSS Variables - Light Mode (Default) */
:root {
    /* Colors */
    --bfx-primary: #f3a72c;
    --bfx-primary-dark: #e09515;
    --bfx-primary-light: #fde8cd;
    --bfx-secondary: #2d9c8c;
    --bfx-secondary-dark: #238b7c;
    --bfx-success: #10b981;
    --bfx-danger: #ef4444;
    --bfx-warning: #f59e0b;
    --bfx-info: #3b82f6;
    
    /* Background Colors */
    --bfx-bg-primary: #ffffff;
    --bfx-bg-secondary: #f7f9fc;
    --bfx-bg-tertiary: #f1f5f9;
    --bfx-bg-dark: #1a2a3a;
    
    /* Text Colors - IMPROVED FOR READABILITY */
    --bfx-text-primary: #1e293b;
    --bfx-text-secondary: #334155;
    --bfx-text-tertiary: #475569;
    --bfx-text-light: #64748b;
    --bfx-text-white: #ffffff;
    --bfx-text-dark: #0f172a;
    
    /* UI Text Colors for Cards & Sections */
    --bfx-card-text: #1e293b;
    --bfx-card-text-secondary: #475569;
    --bfx-card-bg: #ffffff;
    
    /* Border Colors */
    --bfx-border-light: #e2e8f0;
    --bfx-border-medium: #cbd5e1;
    --bfx-border-dark: #94a3b8;
    
    /* Shadows */
    --bfx-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --bfx-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --bfx-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --bfx-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --bfx-spacing-1: 0.25rem;
    --bfx-spacing-2: 0.5rem;
    --bfx-spacing-3: 0.75rem;
    --bfx-spacing-4: 1rem;
    --bfx-spacing-5: 1.25rem;
    --bfx-spacing-6: 1.5rem;
    --bfx-spacing-8: 2rem;
    --bfx-spacing-10: 2.5rem;
    --bfx-spacing-12: 3rem;
    --bfx-spacing-16: 4rem;
    --bfx-spacing-20: 5rem;
    
    /* Border Radius */
    --bfx-radius-sm: 0.375rem;
    --bfx-radius-md: 0.5rem;
    --bfx-radius-lg: 0.75rem;
    --bfx-radius-xl: 1rem;
    --bfx-radius-2xl: 1.5rem;
    --bfx-radius-full: 9999px;
    
    /* Transitions */
    --bfx-transition-fast: 150ms;
    --bfx-transition-normal: 300ms;
    --bfx-transition-slow: 500ms;
    
    /* Fonts */
    --bfx-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --bfx-font-size-xs: 0.75rem;
    --bfx-font-size-sm: 0.875rem;
    --bfx-font-size-base: 1rem;
    --bfx-font-size-lg: 1.125rem;
    --bfx-font-size-xl: 1.25rem;
    --bfx-font-size-2xl: 1.5rem;
    --bfx-font-size-3xl: 1.875rem;
    --bfx-font-size-4xl: 2.25rem;
    --bfx-font-size-5xl: 3rem;
}

/* Dark Mode Variables */
[data-bfx-theme="dark"] {
    --bfx-bg-primary: #0f172a;
    --bfx-bg-secondary: #1e293b;
    --bfx-bg-tertiary: #334155;
    --bfx-bg-dark: #020617;
    
    --bfx-text-primary: #f1f5f9;
    --bfx-text-secondary: #cbd5e1;
    --bfx-text-tertiary: #94a3b8;
    --bfx-text-light: #64748b;
    --bfx-text-dark: #e2e8f0;
    
    --bfx-card-text: #f1f5f9;
    --bfx-card-text-secondary: #cbd5e1;
    --bfx-card-bg: #1e293b;
    
    --bfx-border-light: #334155;
    --bfx-border-medium: #475569;
    --bfx-border-dark: #64748b;
    
    --bfx-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --bfx-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --bfx-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --bfx-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--bfx-font-sans);
    background-color: var(--bfx-bg-secondary);
    color: var(--bfx-text-primary);
    transition: background-color var(--bfx-transition-normal), color var(--bfx-transition-normal);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--bfx-text-primary);
    font-weight: 700;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.bfx-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--bfx-spacing-4);
}

/* Buttons */
.bfx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bfx-spacing-2);
    padding: var(--bfx-spacing-2) var(--bfx-spacing-4);
    font-weight: 500;
    border-radius: var(--bfx-radius-lg);
    transition: all var(--bfx-transition-fast);
    cursor: pointer;
    border: none;
    font-size: var(--bfx-font-size-sm);
}

.bfx-btn-primary {
    background: var(--bfx-primary);
    color: white;
}

.bfx-btn-primary:hover {
    background: var(--bfx-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--bfx-shadow-md);
}

.bfx-btn-secondary {
    background: var(--bfx-secondary);
    color: white;
}

.bfx-btn-secondary:hover {
    background: var(--bfx-secondary-dark);
    transform: translateY(-2px);
}

.bfx-btn-outline {
    background: transparent;
    border: 1px solid var(--bfx-primary);
    color: var(--bfx-primary);
}

.bfx-btn-outline:hover {
    background: var(--bfx-primary-light);
}

/* Cards */
.bfx-card {
    background: var(--bfx-card-bg);
    border-radius: var(--bfx-radius-xl);
    box-shadow: var(--bfx-shadow-sm);
    transition: all var(--bfx-transition-normal);
    overflow: hidden;
}

.bfx-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bfx-shadow-lg);
}

/* Theme Toggle Button */
.bfx-theme-toggle {
    position: fixed;
    bottom: var(--bfx-spacing-4);
    left: var(--bfx-spacing-4);
    width: 45px;
    height: 45px;
    border-radius: var(--bfx-radius-full);
    background: var(--bfx-bg-primary);
    border: 1px solid var(--bfx-border-light);
    color: var(--bfx-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bfx-shadow-lg);
    z-index: 1000;
    transition: all var(--bfx-transition-normal);
}

.bfx-theme-toggle:hover {
    transform: scale(1.1);
    background: var(--bfx-primary);
    color: white;
}

/* Utilities */
.bfx-text-primary { color: var(--bfx-primary); }
.bfx-bg-primary { background: var(--bfx-primary); }
.bfx-text-center { text-align: center; }
.bfx-mt-4 { margin-top: var(--bfx-spacing-4); }
.bfx-mb-4 { margin-bottom: var(--bfx-spacing-4); }
.bfx-p-4 { padding: var(--bfx-spacing-4); }
.bfx-hidden { display: none; }

/* Animation */
@keyframes bfx-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bfx-fade-in {
    animation: bfx-fade-in 0.6s ease-out;
}