/* ========================================
   Tema 3 - Portal da Prefeitura de Bom Jesus da Penha
   Design Moderno e Responsivo
   ======================================== */

:root {
    /* Cores Primárias - Baseadas na Logo Bom Jesus da Penha (Verde e Preto) */
    --primary-color: #228B22;
    --primary-dark: #1a6b1a;
    --primary-light: #32CD32;
    --secondary-color: #000000;
    --secondary-dark: #1a1a1a;
    --accent-yellow: #FDB813;
    --accent-green: #228B22;
    --accent-red: #E74C3C;
    
    /* Cores de Texto */
    --text-primary: #000000;
    --text-secondary: #4a4a4a;
    --text-light: #6b7280;
    
    /* Cores de Background */
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    
    /* Sombras */
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Tipografia */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    /* Espaçamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Utilities
   ======================================== */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.card-custom {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--bg-gray-200);
    overflow: hidden;
}

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

/* ========================================
   Back to Top Button
   ======================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: none;
    z-index: 9999;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Loading Overlay
   ======================================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none !important; /* Garantir que está escondido por padrão */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    pointer-events: none !important; /* Não bloquear cliques quando invisível */
}

#loader.active {
    display: flex !important;
    pointer-events: auto !important;
}

#loader .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ========================================
   Color Utilities - Paleta Bom Jesus da Penha
   ======================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%) !important;
}

.bg-gradient-colorful {
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--primary-light) 50%, 
        var(--secondary-color) 100%) !important;
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.text-accent-yellow {
    color: var(--accent-yellow) !important;
}

.text-accent-green {
    color: var(--accent-green) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark) !important;
    border-color: var(--secondary-dark) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

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

.badge-primary {
    background-color: var(--primary-color) !important;
}

.badge-secondary {
    background-color: var(--secondary-color) !important;
}

/* ========================================
   Accessibility - VLibras
   ======================================== */
[vw] {
    z-index: 10000 !important;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #back-to-top,
    [vw],
    .no-print {
        display: none !important;
    }
}

