/* Estilos específicos da GCom baseados no portal da prefeitura */

/* Main */
.main {
    margin: 0;
  }

.gcom-header {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-dark-blue) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gcom-main {
    min-height: 60vh;
    padding: 2rem 0;
}

.gcom-btn {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-dark-blue) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.gcom-btn:hover {
    background: linear-gradient(135deg, var(--c-dark-blue) 0%, var(--c-blue) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gcom-card {
    border: 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.gcom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gcom-card .card-header {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-dark-blue) 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.gcom-badge {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-dark-blue) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.gcom-search {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.gcom-search:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 0.2rem rgba(5, 113, 238, 0.25);
}

.gcom-stats {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.gcom-stats h3 {
    color: var(--c-blue);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.gcom-stats p {
    color: #6c757d;
    margin: 0;
}

.gcom-section {
    margin-bottom: 15px !important;
    padding: 1.5rem 0;
}

.gcom-section:last-child {
    margin-bottom: 15px !important;
}

/* Regra com máxima especificidade para títulos h2 do GCom */
.section-body .gcom-section h2,
.gcom-section h2,
div.gcom-section h2 {
    color: var(--c-blue) !important;
    margin-bottom: 2rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #15c40f;
}


/* Garantir que os ícones dentro dos títulos h2 também tenham a cor azul */
.section-body .gcom-section h2 i,
.gcom-section h2 i,
div.gcom-section h2 i {
    color: var(--c-blue) !important;
}

/* Padding específico para cards dentro das seções */
.gcom-section .card {
    margin-bottom: 1.5rem;
}

.gcom-section .row {
    margin-bottom: 1rem;
}

/* Espaçamento para seções vazias */
.gcom-section .card-body.text-center {
    padding: 3rem 2rem;
}

/* Melhor espaçamento entre cards */
.gcom-section .col-md-6,
.gcom-section .col-lg-4,
.gcom-section .col-lg-3 {
    margin-bottom: 2rem;
}

/* Espaçamento melhorado para stats cards */
.stats-section {
    margin-bottom: 15px !important;
    padding: 1rem 0;
}

/* Remove espaçamento entre navbar-main e gcom-nav */
.gcom-nav {
    background: #f8f9fa;
    border-bottom: none !important;
    padding: 2rem 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Full-bleed background across the viewport */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.gcom-nav .nav-link {
    color: var(--c-blue);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.gcom-nav .nav-link:hover {
    background: var(--c-blue);
    color: white;
}

/* Garante que o gcom-nav fica "colado" no navbar-main */
nav.gcom-nav {
    position: relative;
    top: 0;
    margin-top: 0;
}

/* Remove qualquer espaçamento do body ou container */
body .gcom-nav {
    margin-top: 0 !important;
}

/* Garante que não há gap entre navbar e gcom-nav */
.navbar + .gcom-nav,
#navbar-main + .gcom-nav {
    margin-top: 0 !important;
    padding-top: 0;
}

/* Padding responsivo para diferentes tamanhos de tela */
@media (max-width: 768px) {
    .gcom-section {
        padding: 1rem 0;
        margin-bottom: 15px;
    }
    
    .section-body .gcom-section h2,
    .gcom-section h2,
    div.gcom-section h2 {
        color: var(--c-blue) !important;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }
    
    .section-body .gcom-section h2 i,
    .gcom-section h2 i,
    div.gcom-section h2 i {
        color: var(--c-blue) !important;
    }
    
    .stats-section {
        padding: 0.5rem 0;
        margin-bottom: 15px;
    }
    
    .gcom-main {
        padding: 1rem 0;
    }
    
    .gcom-nav .nav-link {
        padding: 0.5rem 1rem;
        margin: 0.25rem 0;
    }
    
    .gcom-header {
        padding: 1rem 0;
    }
    
    .gcom-stats h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .gcom-section {
        padding: 1rem 0;
        margin-bottom: 15px;
    }
    
    .section-body .gcom-section h2,
    .gcom-section h2,
    div.gcom-section h2 {
        color: var(--c-blue) !important;
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }
    
    .section-body .gcom-section h2 i,
    .gcom-section h2 i,
    div.gcom-section h2 i {
        color: var(--c-blue) !important;
    }
    
    .stats-section {
        padding: 0.25rem 0;
        margin-bottom: 15px;
    }
}

/* Cards com bordas coloridas como no dashboard */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-primary {
    color: #4e73df !important;
}

.text-success {
    color: #1cc88a !important;
}

.text-info {
    color: #36b9cc !important;
}

.text-warning {
    color: #f6c23e !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* REGRA DE MÁXIMA PRIORIDADE - Deve ser a última regra do arquivo */
/* Força a cor azul para todos os títulos h2 do GCom, independente de outras regras */
body .section-body .gcom-section h2,
body .gcom-section h2,
body div.gcom-section h2,
html body .section-body .gcom-section h2,
html body .gcom-section h2,
html body div.gcom-section h2 {
    color: var(--c-blue) !important;
}

body .section-body .gcom-section h2 i,
body .gcom-section h2 i,
body div.gcom-section h2 i,
html body .section-body .gcom-section h2 i,
html body .gcom-section h2 i,
html body div.gcom-section h2 i {
    color: var(--c-blue) !important;
}

/* Forçar remoção da linha do nav gcom */
nav.gcom-nav,
.gcom-nav,
body .gcom-nav {
    border-bottom: none !important;
}

/* Forçar espaçamento de 15px entre seções */
body .gcom-section,
body div.gcom-section,
html body .gcom-section,
html body div.gcom-section,
body .container .gcom-section,
body .container-fluid .gcom-section,
html body .container .gcom-section,
html body .container-fluid .gcom-section {
    margin-bottom: 15px !important;
}

body .stats-section,
html body .stats-section,
body .container .stats-section,
body .container-fluid .stats-section,
html body .container .stats-section,
html body .container-fluid .stats-section {
    margin-bottom: 15px !important;
}

/* Forçar cor verde nas linhas dos títulos h2 - linha completa */
body .section-body .gcom-section h2,
body .gcom-section h2,
body div.gcom-section h2,
html body .section-body .gcom-section h2,
html body .gcom-section h2,
html body div.gcom-section h2 {
    border-bottom: 2px solid #15c40f !important;
}

/* Linha estendida para seções com gcom-section-header */
.gcom-section-header {
    position: relative;
    padding-bottom: 0.5rem;
    align-items: flex-start !important;
}

.gcom-section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #15c40f;
}

/* Remover border-bottom do h2 dentro do gcom-section-header */
.gcom-section-header h2,
body .gcom-section-header h2,
html body .gcom-section-header h2,
body .section-body .gcom-section-header h2,
html body .section-body .gcom-section-header h2,
body div.gcom-section-header h2,
html body div.gcom-section-header h2 {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}



/* Preview de logos na listagem de identidade visual */
.identity-logos-preview {
    background: #f8f9fa;
    padding: 20px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.identity-logos-preview img {
    max-height: 140px;
    max-width: 140px;
    object-fit: contain;
}

/* Correções de espaçamento para páginas de notícias do GCom */
.gcom-content .section-title.bordered {
    margin-top: 2rem !important;
}

/* Preview de cores na listagem de identidade visual */
.color-preview {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-preview:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.color-preview:active {
    transform: scale(0.95);
}

/* Estilos de paginação para páginas de listagem (notícias, galerias) */
.pagination {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    list-style: none !important;
    background-color: transparent !important;
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.pagination .page-link {
    color: var(--c-blue) !important;
    background-color: #fff !important;
    border: none !important;
    border-right: 1px solid #dee2e6 !important;
    padding: 0.375rem 0.75rem !important;
    text-decoration: none !important;
    position: relative !important;
    display: block !important;
    font-size: 1rem !important;
}

.pagination .page-item:last-child .page-link {
    border-right: none !important;
}

.pagination .page-link:hover {
    background-color: #fff !important;
    color: var(--c-blue) !important;
    text-decoration: none !important;
    z-index: 2 !important;
}

.pagination .page-link:focus {
    background-color: #fff !important;
    color: var(--c-blue) !important;
    text-decoration: none !important;
    z-index: 3 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.pagination .page-item.disabled .page-link {
    color: #0571ee !important;
    background-color: #fff !important;
    pointer-events: none !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--c-dark-blue) !important;
    border-color: var(--c-dark-blue) !important;
    color: #fff !important;
    z-index: 3 !important;
}

.pagination .page-item:not(:first-child) .page-link {
    margin-left: 0 !important;
}

/* Espaçamento da paginação */
.row.mt-4 {
    margin-bottom: 24px !important;
}

/* Container da paginação */
.row.mt-4:has(.pagination) {
    margin-bottom: 24px !important;
}

/* Espaçamento entre seções nas páginas de listagem */
.gcom-section-header {
    margin-bottom: 15px !important;
}

.gcom-card {
    margin-bottom: 15px !important;
}

.row.mb-4 {
    margin-bottom: 15px !important;
}
