/* ====================================================================
   FinanceShiksha - Main Global CSS
   Version: 2.0 (Stable)
   ==================================================================== */

/* --- 1. CSS VARIABLES & RESET --- */
:root {
    /* Brand Colors - Financial Trust Palette */
    --color-primary-600: #2563eb; /* Royal Blue */
    --color-primary-700: #1d4ed8;
    --color-primary-900: #1e3a8a; /* Deep Blue */
    
    --color-secondary-600: #16a34a; /* Growth Green */
    --color-secondary-900: #14532d;
    
    --color-accent-500: #f59e0b; /* Amber/Gold */
    --color-accent-700: #b45309;
    
    --color-dark: #0f172a; /* Slate Black */
    --color-light: #f8fafc;
    --color-white: #ffffff;
    
    /* Functional Colors */
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #0ea5e9;

    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Poppins', system-ui, -apple-system, sans-serif;
    
    /* Spacing & Layout */
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--color-dark);
    line-height: 1.6;
    background-color: var(--color-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; padding: 0; }

/* --- 2. GLOBAL COMPONENTS --- */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary-600);
    color: var(--color-white);
    border: 1px solid var(--color-primary-600);
}
.btn-primary:hover {
    background-color: var(--color-primary-700);
    transform: translateY(-2px);
    color: white;
}

.btn-light {
    background-color: var(--color-white);
    color: var(--color-primary-600);
    border: 1px solid var(--color-white);
}
.btn-light:hover {
    background-color: var(--color-light);
    color: var(--color-primary-700);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.8);
}
.btn-outline-light:hover {
    background-color: var(--color-white);
    color: var(--color-primary-600);
    border-color: var(--color-white);
}

/* Cards */
.card {
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-600);
}

/* --- 3. HERO SECTION DEFAULTS (Fix for white text) --- */
.hero-section {
    position: relative;
    padding: 5rem 0;
    /* Default Fallback Color if gradient fails */
    background-color: var(--color-primary-900); 
    color: var(--color-white);
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Ensure text inside hero is always visible */
.hero-section h1, 
.hero-section p, 
.hero-section .lead {
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Overlay Pattern for texture */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* --- 4. GLOBAL GRADIENT UTILITIES --- */
/* These override Bootstrap defaults */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%) !important;
}
.bg-gradient-secondary {
    background: linear-gradient(135deg, #475569 0%, #0f172a 100%) !important;
}
.bg-gradient-success {
    background: linear-gradient(135deg, #16a34a 0%, #14532d 100%) !important;
}
.bg-gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #020617 100%) !important;
}

/* --- 5. STATS & BADGES --- */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    color: white;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- 6. SOUND CONTROLLER --- */
.sound-controller {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}
.sound-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary-600);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
}
.sound-btn:hover { transform: scale(1.1); }