/* assets/css/main.css - Estilos Globais e Variáveis */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --glass: rgba(255, 255, 255, 0.85);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    
    /* Cores da Bandeira de Magé */
    --mage-green: #009246;
    --mage-red: #CE1126;
    --mage-white: #ffffff;
    
    --bg-gradient: linear-gradient(135deg, rgba(0, 146, 70, 0.05) 0%, rgba(255, 255, 255, 1) 50%, rgba(206, 17, 38, 0.05) 100%);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: #1e293b;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Municipal Flag Background Animation */
.flag-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        linear-gradient(135deg, var(--mage-green) 0%, transparent 40%),
        linear-gradient(315deg, var(--mage-red) 0%, transparent 40%);
    opacity: 0.12;
    pointer-events: none;
}

/* Background Image Slider */
.bg-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 10s linear;
    transform: scale(1.1);
}

.bg-slide.active {
    opacity: 0.2;
    transform: scale(1);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(255,255,255,0.4) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Glassmorphism System */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px -15px rgba(99, 102, 241, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.hero-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.section-title {
    position: relative;
    padding-left: 20px;
    margin-bottom: 30px;
    font-weight: 700;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 30px;
    background: var(--primary);
    border-radius: 10px;
}

/* Button Legibility Fixes */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-radius: 12px;
}

.btn-primary:hover, .btn-primary:active, .btn-primary.active {
    color: #ffffff !important;
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-danger:hover, .btn-danger:active, .btn-danger.active {
    color: #fff !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-success:hover, .btn-success:active, .btn-success.active {
    color: #fff !important;
    background-color: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active {
    color: #fff !important;
    background-color: var(--primary) !important;
}

/* Evolution Charts Styles */
.chart-card {
    min-height: 400px;
}

.chart-legend {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Animations */
.floating-icon {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Scrollbar Customization */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Custom Tabs / Nav Pills */
.nav-pills .nav-link {
    color: var(--secondary);
    font-weight: 600;
    transition: all 0.3s;
    border-radius: 12px;
    padding: 10px 20px;
}

.nav-pills .nav-link:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}
