/* ========================================
   SISTEMA DE TEMAS MODULAR - WGM CONSULTORIA
   ======================================== */

/* ========================================
   VARIÁVEIS CSS - DARK THEME (PADRÃO)
   ======================================== */
:root {
    /* Cores principais */
    --primary-purple: #9f2592;
    --secondary-blue: #2d3792;
    --accent-cyan: #00d4ff;
    
    /* Backgrounds */
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-hover: rgba(255, 255, 255, 0.08);
    
    /* Textos */
    --text-white: #ffffff;
    --text-gray: #b8b8b8;
    --text-muted: #888888;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #9f2592, #2d3792);
    --gradient-hero: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #16213e 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* Bordas e sombras */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   LIGHT THEME
   ======================================== */
.light-scheme {
    /* Cores principais (mantém as mesmas) */
    --primary-purple: #9f2592;
    --secondary-blue: #2d3792;
    --accent-cyan: #00d4ff;

    /* Backgrounds */
    --dark-bg: #f8f9fa;
    --darker-bg: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-bg-hover: rgba(255, 255, 255, 0.9);

    /* Textos */
    --text-white: #2d3436;
    --text-gray: #636e72;
    --text-muted: #74b9ff;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #9f2592, #2d3792);
    --gradient-hero: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));

    /* Bordas e sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ========================================
   BOTÃO DE TEMA
   ======================================== */
.theme-toggle {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    font-size: 18px;
    transition: all var(--transition-normal);
    margin-left: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Posicionamento do botão no navbar */
.navbar .theme-toggle {
    position: absolute;
    right: 0;
    margin-right: 15px;
}

/* Responsividade do botão de tema */
@media (max-width: 991px) {
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .theme-toggle {
        width: 30px;
        height: 30px;
        font-size: 12px;
        margin-right: 5px;
    }
}

/* ========================================
   NAVBAR - DARK THEME
   ======================================== */
.navbar {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.navbar-brand {
    color: var(--text-white);
    font-weight: 800;
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    color: var(--accent-cyan);
}

.navbar-brand .logo-icon {
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all var(--transition-normal);
    filter: brightness(1.2);
}

.navbar-nav .nav-link {
    color: var(--text-white);
    font-weight: 500;
    margin: 0 20px;
    transition: all var(--transition-normal);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-cyan);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--accent-cyan);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* ========================================
   NAVBAR - LIGHT THEME
   ======================================== */
.light-scheme .navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.light-scheme .navbar-brand {
    color: var(--text-white);
}

.light-scheme .navbar-brand:hover {
    color: var(--primary-purple);
}

.light-scheme .navbar-brand .logo-icon {
    filter: none;
}

.light-scheme .navbar-nav .nav-link {
    color: var(--text-white);
}

.light-scheme .navbar-nav .nav-link:hover {
    color: var(--primary-purple);
}

/* ========================================
   BOTÕES - SISTEMA MODULAR UNIFICADO
   ======================================== */

/* Botão base - todos os botões herdam estas propriedades */
.btn-base {
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 48px;
}

/* Efeito de brilho que passa por cima */
.btn-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-base:hover::before {
    left: 100%;
}

/* Botão primário - gradiente roxo/azul */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(159, 37, 146, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(159, 37, 146, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(159, 37, 146, 0.3);
}

/* Botão outline - transparente com borda */
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

.btn-outline:hover {
    background: var(--accent-cyan);
    color: #0a0a0a;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.3);
}

.btn-outline:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.2);
}

/* Botão secundário - azul */
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-blue), #1e2a5e);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 55, 146, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(45, 55, 146, 0.4);
    color: white;
}

.btn-secondary:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(45, 55, 146, 0.3);
}

/* Botão de sucesso - verde */
.btn-success {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.2);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 184, 148, 0.4);
    color: white;
}

.btn-success:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

/* Botão de perigo - vermelho */
.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
    color: white;
}

.btn-danger:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

/* Botão de aviso - laranja */
.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.4);
    color: white;
}

.btn-warning:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.3);
}

/* Botão de informação - azul claro */
.btn-info {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8cc);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
    color: white;
}

.btn-info:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* ========================================
   LIGHT THEME - BOTÕES
   ======================================== */

/* Light mode para btn-outline */
.light-scheme .btn-outline,
.light-scheme a.btn-outline,
.light-scheme button.btn-outline,
.light-scheme form .btn-outline,
.light-scheme form button.btn-outline {
    border-color: var(--primary-purple);
    color: #ffffff !important;
    background: var(--primary-purple);
    box-shadow: 0 4px 15px rgba(159, 37, 146, 0.1);
}

.light-scheme .btn-outline:hover,
.light-scheme a.btn-outline:hover,
.light-scheme button.btn-outline:hover,
.light-scheme form .btn-outline:hover,
.light-scheme form button.btn-outline:hover {
    background: var(--secondary-blue);
    color: #ffffff !important;
    box-shadow: 0 15px 35px rgba(45, 55, 146, 0.3);
    transform: translateY(-3px);
}

.light-scheme .btn-outline:active,
.light-scheme a.btn-outline:active,
.light-scheme button.btn-outline:active,
.light-scheme form .btn-outline:active,
.light-scheme form button.btn-outline:active {
    background: var(--primary-purple);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(159, 37, 146, 0.3);
}

/* Forçar cor branca para span e i dentro dos botões outline no light theme */
.light-scheme .btn-outline span,
.light-scheme .btn-outline i,
.light-scheme button.btn-outline span,
.light-scheme button.btn-outline i,
.light-scheme form .btn-outline span,
.light-scheme form .btn-outline i {
    color: #ffffff !important;
}

/* Light mode para btn-primary */
.light-scheme .btn-primary,
.light-scheme a.btn-primary,
.light-scheme button.btn-primary,
.light-scheme form .btn-primary,
.light-scheme form button.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(159, 37, 146, 0.2);
}

.light-scheme .btn-primary:hover,
.light-scheme a.btn-primary:hover,
.light-scheme button.btn-primary:hover,
.light-scheme form .btn-primary:hover,
.light-scheme form button.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(159, 37, 146, 0.4);
    color: #ffffff !important;
}

/* Forçar cor branca para span e i dentro dos botões primary no light theme */
.light-scheme .btn-primary span,
.light-scheme .btn-primary i,
.light-scheme button.btn-primary span,
.light-scheme button.btn-primary i,
.light-scheme form .btn-primary span,
.light-scheme form .btn-primary i {
    color: #ffffff !important;
}

/* ========================================
   TAMANHOS DE BOTÕES
   ======================================== */

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-xl {
    padding: 20px 50px;
    font-size: 1.25rem;
    min-height: 64px;
}

/* ========================================
   ESTADOS ESPECIAIS
   ======================================== */

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    opacity: 1;
}

.btn-loading .btn-loading-spinner {
    display: none;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   SISTEMA DE IMAGENS POR TEMA
   ======================================== */

/* Regra base para imagens que mudam com o tema */
img[src*="_branco.png"],
img[src*="_preto.png"] {
    transition: all var(--transition-normal);
}

/* As imagens são trocadas automaticamente via JavaScript */
/* O sistema detecta imagens com padrão _branco.png e _preto.png */
/* e troca o src baseado no tema atual (dark/light) */

/* Classes específicas para logos */
.logo-theme-aware {
    transition: all var(--transition-normal);
}

/* As imagens são trocadas via JavaScript em themes.js */
/* Não há necessidade de regras CSS adicionais aqui */

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    .btn-base {
        padding: 10px 24px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .btn-lg {
        padding: 14px 32px;
        font-size: 1rem;
        min-height: 52px;
    }

    .btn-xl {
        padding: 16px 40px;
        font-size: 1.1rem;
        min-height: 60px;
    }
}

@media (max-width: 576px) {
    .btn-base {
        padding: 8px 20px;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .btn-lg {
        padding: 12px 28px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .btn-xl {
        padding: 14px 36px;
        font-size: 1rem;
        min-height: 56px;
    }
}

/* ========================================
   CARDS - SISTEMA MODULAR
   ======================================== */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all var(--transition-normal);
}

.card:hover::before {
    opacity: 1;
}

/* Light mode para cards */
.light-scheme .card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
}

.light-scheme .card:hover {
    background: var(--card-bg-hover);
    box-shadow: var(--shadow-md);
}

/* ========================================
   TEXTOS - SISTEMA MODULAR
   ======================================== */
.text-primary {
    color: var(--primary-purple) !important;
}

.text-secondary {
    color: var(--secondary-blue) !important;
}

.text-accent {
    color: var(--accent-cyan) !important;
}

.text-white {
    color: var(--text-white) !important;
}

.text-gray {
    color: var(--text-gray) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ========================================
   BACKGROUNDS - SISTEMA MODULAR
   ======================================== */
.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-dark {
    background: var(--dark-bg) !important;
}

.bg-darker {
    background: var(--darker-bg) !important;
}

.bg-card {
    background: var(--card-bg) !important;
}

/* ========================================
   BORDAS E SOMBRAS - SISTEMA MODULAR
   ======================================== */
.rounded {
    border-radius: var(--border-radius) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ========================================
   TRANSIÇÕES - SISTEMA MODULAR
   ======================================== */
.transition-fast {
    transition: all var(--transition-fast) !important;
}

.transition-normal {
    transition: all var(--transition-normal) !important;
}

.transition-slow {
    transition: all var(--transition-slow) !important;
}

/* ========================================
   UTILITÁRIOS RESPONSIVOS
   ======================================== */
@media (max-width: 991px) {
    .theme-toggle {
        position: static !important;
        margin: 10px auto !important;
        display: block !important;
    }

    .navbar .theme-toggle {
        position: static !important;
        margin: 10px auto !important;
    }
}

@media (max-width: 576px) {
    .btn-primary,
    .btn-outline {
        padding: 10px 20px;
        font-size: 14px;
    }

    .card {
        margin-bottom: 20px;
    }
}
