/* Estilos de conteúdo - movidos para arquivos específicos se necessário */
/* Mantendo apenas estilos essenciais para compatibilidade */

/* Estilos básicos de página - simplificados */
.page-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #222;
    font-weight: 600;
    text-align: left;
}

.page-description {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.6;
}

/* Estilos do menu - compatível com Bootstrap */
.main-menu > li > a.active,
.main-menu > li > a:hover {
    color: #ffffff;
    font-weight: 600;
}

/* Estilos adicionados/modificados para FinancialIndicators/index.php */
.page-title { /* Adicionado para centralizar o H1 */
    text-align: left;
    font-size: 32px;
    color: #333;
    margin-bottom: 10px; /* Ajuste de margem */
}

.update-info { /* Adicionado para alinhar texto à direita */
     /* REMOVIDO: max-width, margin-left, margin-right */
     /* text-align: right; será tratado pela classe text-end no HTML */
     font-size: 12px;
     color: #666;
     margin-bottom: 15px; /* Espaço antes da grade */
}

.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    /* REMOVIDO: max-width, margin-left, margin-right */
    /* margin-top removido */
}

.indice-card {
    background-color: #fff; /* Fundo branco */
    /* border: 1px solid #eee; Removido */
    border-radius: 8px;
    padding: 25px 20px; /* Padding ajustado */
    text-align: center; /* Mantém valor e descrição centralizados */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08); /* Sombra sutil */
    display: flex; /* Adicionado para controle de alinhamento interno */
    flex-direction: column; /* Adicionado para empilhar elementos */
    justify-content: space-between; /* Adicionado para espaçar elementos */
    min-height: 180px; /* Altura mínima para consistência */
}

.indice-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 6px 12px rgba(0,0,0,0.12); /* Sombra mais pronunciada no hover */
}

.indice-card a {
    text-decoration: none;
    color: inherit;
    display: flex; /* Alterado para flex */
    flex-direction: column; /* Empilha os elementos do link */
    height: 100%;
    text-align: left; /* Alinha texto do link à esquerda por padrão */
}

.indice-titulo {
    font-size: 14px; /* Tamanho ajustado */
    font-weight: 500; /* Peso da fonte ajustado */
    color: #555;
    margin-bottom: 15px; /* Espaçamento aumentado */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alterado para alinhar à esquerda */
    gap: 8px;
    text-align: left; /* Garante alinhamento à esquerda */
}

/* Ajuste opcional para o ícone */
.indice-titulo .material-icons {
    font-size: 20px; /* Tamanho do ícone */
    color: #2E6C86; /* Cor do ícone */
}

.indice-valor {
    font-size: 36px; /* Tamanho aumentado */
    font-weight: 600; /* Peso ajustado */
    color: #2E6C86;
    margin-bottom: 15px; /* Espaçamento aumentado */
    text-align: left; /* Alinhado à esquerda */
    line-height: 1.1;
}

.indice-descricao {
    font-size: 12px; /* Tamanho reduzido */
    color: #777;
    text-align: left; /* Alinhado à esquerda */
    margin-top: auto; /* Empurra a descrição para baixo se houver espaço */
}

.indice-descricao .descricao-principal {
     margin-bottom: 5px;
}

.indice-descricao .descricao-data {
     font-style: normal; /* Removido itálico */
     font-size: 11px; /* Menor ainda */
     color: #888;
}

/* Desktop Navigation - Bootstrap Compatible */
.desktop-nav {
    background-color: #00597C;
    padding: 0;
    position: relative !important; /* Remover comportamento sticky */
    z-index: 1030; /* Abaixo do header mas acima do conteúdo */
}

/* Bootstrap Navbar Styling - Header */
.header .navbar {
    background-color: #00597C !important;
    min-height: 70px;
    padding: 0.75rem 0;
    margin: 0;
    border: none;
}

.header .navbar-dark {
    background-color: #00597C !important;
}

/* Remove any gaps between header and navbar */
.header {
    background-color: #00597C !important;
    margin: 0;
    padding: 0;
}

/* Ensure no gaps or spacing issues */
.header,
.header .navbar,
.main-header,
.site-header {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    border: none !important;
}

/* Override any potential spacing from Bootstrap or other CSS */
.navbar {
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

/* Ensure container doesn't add unwanted spacing */
.header .container {
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Bootstrap Navbar Toggler Styling */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0.375rem 0.5rem !important;
    background-color: transparent !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.25rem;
    height: 1.25rem;
}

.main-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    transition: color 0.3s ease;
    border-radius: 0.25rem;
}

/* Dropdown Menu - Bootstrap Compatible */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 12.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    display: none;
    z-index: 150;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.125rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    transition-delay: 0s, 0s, 0s;
    pointer-events: none;
    visibility: hidden;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s, 0s, 0s;
}

/* Adicionar delay no hover out para evitar desaparecimento acidental */
.dropdown .dropdown-menu {
    transition-delay: 0s, 0s, 0.2s;
}

.dropdown:hover .dropdown-menu {
    transition-delay: 0s, 0s, 0s;
}

/* Criar área de ponte invisível para melhor usabilidade */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    width: calc(100% + 20px);
    height: 15px;
    z-index: 149;
}

/* Área de ponte adicional no próprio dropdown-menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -10px;
    width: calc(100% + 20px);
    height: 15px;
    z-index: 148;
}

.dropdown-menu li a {
    display: block;
    padding: 0.375rem 1rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.6875rem;
    transition: background-color 0.15s ease-in-out;
    border-radius: 0;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: #2E6C86;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background-color: transparent;
    color: #fff;
    width: 40px;
    height: 40px;
    border: none;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    font-size: 20px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Side Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: left 0.3s ease;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #00597C;
}

.close-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-items > li > a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

/* Mobile Dropdown */
.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    font-size: 0.6875rem;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.mobile-dropdown-menu {
    display: none;
    list-style: none;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0;
}

.mobile-dropdown-menu.active {
    display: block;
}

.mobile-dropdown-menu li a {
    display: block;
    padding: 10px 15px 10px 30px;
    color: #333;
    text-decoration: none;
    font-size: 0.6875rem;
    border-bottom: 1px solid #eee;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Estilos ativos - Unificados */
.main-menu > li > a.active,
.dropdown-menu li a.active,
.mobile-menu-items > li > a.active,
.mobile-dropdown-menu li a.active {
    color: #2E6C86;
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    /* Hide custom mobile menu button in favor of Bootstrap toggler */
    .mobile-menu-button {
        display: none !important;
    }
    
    /* Bootstrap navbar mobile styling */
    .header .navbar {
        background-color: #00597C !important;
        min-height: 70px !important;
        padding: 0.75rem 0 !important;
    }
    
    .header .navbar-dark {
        background-color: #00597C !important;
    }
    
    /* Ensure proper alignment in mobile */
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 70px;
        padding: 0 1rem;
    }
    
    /* Mobile navbar toggler positioning */
    .navbar-toggler {
        order: 2;
        margin-left: auto;
    }
    
    .navbar-brand {
        order: 1;
    }
    
    /* Collapsed content styling */
    .navbar-collapse {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .navbar-collapse .ms-auto {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    /* Style login button in mobile */
    .navbar-collapse .login-btn {
        margin-top: 1rem;
        text-align: center;
        width: 100%;
    }
    
    /* Style user dropdown in mobile */
    .navbar-collapse .user-dropdown {
        margin-top: 1rem;
        text-align: left;
        display: flex;
        justify-content: flex-start;
    }
    
    /* Force dropdown menu to appear on the left in mobile */
    .navbar-collapse .user-dropdown .dropdown-menu {
        right: auto !important;
        left: 0 !important;
        transform: none !important;
        position: absolute !important;
    }
}