/* =================================================================
   STICKY HEADER E MELHORIAS DE CONTRASTE PARA LISTA DE PROJETOS
   ================================================================= */

/* DEBUG: CSS CARREGADO - Se você vê este comentário no DevTools, o CSS foi carregado */

/* --- Estilo Base do Cabeçalho da Lista --- */
.page-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease-in-out;
    width: 100%;
    z-index: 998; /* Abaixo do header principal */
}

/* --- Implementação do Sticky Header com position: sticky --- */
.page-header {
    position: -webkit-sticky; /* Para compatibilidade com Safari */
    position: sticky;
    top: 70px; /* Cola no topo, logo abaixo do header principal */
    z-index: 1020; /* Garante que fique acima da tabela ao rolar */
    background-color: white; /* Fundo para não ficar transparente */
    padding-bottom: 1rem; /* Adiciona um respiro abaixo quando estiver fixo */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Sombra sutil para destacar quando fixo */
}

/* Estado sticky ativado via JavaScript (fallback) */
.page-header.sticky {
    position: fixed !important;
    top: 70px !important; /* Valor fixo para garantir compatibilidade */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1020 !important;
    background-color: rgba(248, 250, 252, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Placeholder para manter o espaço quando sticky está ativo */
.sticky-placeholder {
    display: none;
}

.sticky-placeholder.active {
    display: block;
}


/* Ajuste no wrapper do título para melhor alinhamento */
.page-title-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-title {
    margin-bottom: 0.25rem; /* Menor margem inferior no título */
    color: var(--dashboard-dark); /* Cor escura para o título */
    font-weight: 600;
}

.page-subtitle {
    color: var(--dashboard-secondary); /* Cor secundária para o subtítulo */
    font-size: 0.875rem;
}