
:root {
    --preto: #000000;
    --cinza: #777777;
    --branco: #FFFFFF;
    --amarelo: #e2e2e2;
    --verde: #059669;
    --azul: #0056b3;
}

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', Roboto, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--amarelo);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Botões */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--amarelo);
    color: var(--amarelo);
}

.btn-outline:hover {
    background-color: var(--amarelo);
    color: #000000;
}

.btn-primary {
    background-color: var(--amarelo);
    color: #000000;
    border: 1px solid var(--amarelo);
}

.btn-primary:hover {
    background-color: #FFF;
    border-color: #fff;
}

/* Hero Section */
.hero {
    background-image: url('../images/bg-01.jpg');
    background-repeat: no-repeat;
    background-size: 550px;
    background-position: right top;
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 150px;
    margin-top: 50px;
    line-height: 1.2;
    text-align: left;
}

.hero-cta {
    text-align: left;
    margin-bottom: 20px;
}

.hero-cta a.btn{
    border: 1px solid var(--amarelo);
    color: var(--preto);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.highlight {
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #000;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.search-container {
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
    width: 80%;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--amarelo);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--amarelo);
    color: #000000;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #fff;
}

.search-tags {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-tags a{
    color: #000;
}

.search-tags a:hover{
    background-color: transparent;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Metrics Section */
.metrics {
    padding: 20px 0;
    background-color: #ffffff;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background-color: #ffffff;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.yellow-border {
    border-left-color: var(--amarelo);
}

.black-border {
    border-left-color: #000;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.metric-icon {
    color: #6b7280;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.5rem;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
}

.metric-change.positive {
    color: var(--verde);
}

.metric-change.negative {
    color: #ef4444;
}

.metric-change.stable {
    color: var(--azul);
}

/* Charts Section */
.charts {
    padding: 4rem 0;
    background-color: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #000;
}

.section-subtitle {
    text-align: justify;
    font-size: 1.1em;
    color: #000;
    margin: 0px auto;
    max-width: 830px;
    margin-bottom: 40px;
}

.section-subtitle.section-subtitle-center {
    text-align: center;
}

.section-title.advanced-search {
    text-align: left;
}

.section-subtitle.advanced-search {
    text-align: left;
    margin: 0px;
    margin-bottom: 20px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.chart-description {
    color: #6b7280;
    font-size: 0.875rem;
}

.chart-content {
    text-align: center;
}

.chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Contracts Section */
.contracts {
    padding: 4rem 0;
    background-color: #ffffff;
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.contracts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contract-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.contract-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contract-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.contract-info {
    flex: 1;
}

.contract-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #374151;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.contract-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.contract-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: #6b7280;
}

.contract-value {
    text-align: right;
    flex-shrink: 0;
}

.value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--verde);
    margin-bottom: 0.25rem;
}

.value-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.contracts-action {
    text-align: center;
}

/* Footer */
.footer {
    background-color: #fff;
    color: #000;
    padding: 3rem 0 1rem;
    text-align: center;
    float: left;
    width: 100%;
}

.footer .social-icons a {
    font-size: 30px;
}

.footer .address {
    color: #000;
    text-decoration: none;
}

.footer a {
    color: #000;
    text-decoration: none;
}

.footer a:hover {
    color: var(--cinza);
    text-decoration: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h5 {
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--amarelo);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 1rem;
    text-align: center;
    color: #000;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.chart-card,
.licitacao-card,
.post-card,
.fade-in-card,
.contract-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de foco para acessibilidade */
.btn:focus,
.search-box input:focus,
.tag:focus {
    outline-offset: 2px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}


.chart-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.chart-content > div {
    flex: 1 1 45%;
    min-width: 300px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-content .chart-container {
    position: relative;
    height: 300px;
}

.chart-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

div.title h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}

/*
Busca avançada
*/

/* --- Estilos para a Busca Avançada Metódica --- */

/* Container Principal do Formulário */
.metodica-search-form-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

/* Linhas do formulário */
.metodica-advanced-search-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espaço entre os campos */
    margin-bottom: 20px;
}

/* Grupos de campo (label + input) */
.metodica-advanced-search-form .form-group {
    flex: 1; /* Faz os campos ocuparem espaço igual */
    min-width: 200px; /* Largura mínima antes de quebrar a linha */
    display: flex;
    flex-direction: column;
}

.metodica-advanced-search-form .form-group.full-width {
    flex-basis: 100%;
}

/* Rótulos (Labels) */
.metodica-advanced-search-form label {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #333;
}

/* Inputs, Selects */
.metodica-advanced-search-form input[type="text"],
.metodica-advanced-search-form input[type="number"],
.metodica-advanced-search-form input[type="date"],
.metodica-advanced-search-form select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Garante que o padding não aumente a largura */
}

.metodica-advanced-search-form input:focus,
.metodica-advanced-search-form select:focus {
    border-color: #0073aa; /* Cor padrão do WordPress */
    outline: none;
}

/* Linha dos botões */
.metodica-advanced-search-form .submit-row {
    margin-top: 10px;
    margin-bottom: 0;
    align-items: center;
}

.metodica-advanced-search-form .search-submit-button,
.metodica-advanced-search-form .clear-search-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}

.metodica-advanced-search-form .search-submit-button {
    background-color: #000; 
    color: white;
}
.metodica-advanced-search-form .search-submit-button:hover {
    background-color: #000;
}

.metodica-advanced-search-form .clear-search-button {
    background-color: #e0e0e0;
    color: #333;
    margin-left: 15px;
}

.metodica-advanced-search-form .clear-search-button:hover {
    background-color: #c9c9c9;
}


/* Separador e Resultados */
.search-separator {
    border: 0;
    height: 1px;
    background-color: #e5e5e5;
    margin: 30px 0;
}

.results-title {
    margin-bottom: 25px;
}

.search-prompt {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    padding: 40px;
    background-color: #fdfdfd;
    border: 1px dashed #ccc;
    border-radius: 5px;
}

/* Estilo para cada item do resultado */
.search-result-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-item-title a {
    text-decoration: none;
    color: #222;
}
.result-item-title a:hover {
    color: #0073aa;
}

.result-item-meta {
    margin: 10px 0;
    font-size: 0.9em;
    color: #555;
}

.result-item-meta .meta-item {
    margin-right: 20px;
}

.result-item-meta .meta-item strong {
    color: #333;
}

.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination .page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    margin: 0 4px;
    border-radius: 4px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--amarelo);
    color: var(--preto);
    border-color: var(--amarelo);
}

.pagination a {
    color: var(--preto);
}

/* ==========================================================================
   HEADER E NAVEGAÇÃO
   ========================================================================== */

/* --- ESTRUTURA GERAL DO HEADER --- */
.header {
    background-color: #FFF;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header a {
    color: #000;
}

.header a:hover {
    color: #000;
}

.header .container{
    padding: 0px;
}

/* .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
} */

/* 1. Estilizando o contêiner principal do header */
.header-content {
    display: flex; /* Ativa o Flexbox */
    align-items: center; /* Alinha os itens verticalmente ao centro */
    width: 100%;
    padding: 10px 20px; /* Adiciona um espaçamento interno */
    box-sizing: border-box; /* Garante que o padding não afete a largura total */
}

/* 2. Definindo o tamanho fixo da logo */
.header-content .logo {
    flex-shrink: 0; /* Impede que a logo encolha se não houver espaço */
    width: 200px; /* Define a largura fixa da logo */
    z-index: 1001;
}

/* 3. Fazendo a navegação ocupar todo o espaço restante */
.header-content .nav {
    flex-grow: 1; /* Faz este elemento crescer e ocupar todo o espaço disponível */
}

/* 4. Estilizando a lista do menu para distribuir os itens */
.header-content .nav-links {
    display: flex; /* Ativa o Flexbox para os itens do menu */
    justify-content: space-around; /* Distribui os itens com espaço igual ao redor deles */
    list-style: none; /* Remove os marcadores (bolinhas) da lista */
    margin: 0;
    padding: 0;
}

/* 5. Estilizando os itens da lista individualmente (Opcional, mas recomendado) */
.header-content .nav-links li {
    /* Se você quiser que cada item tenha exatamente a mesma largura, use flex-grow */
    flex-grow: 1;
    text-align: center; /* Centraliza o texto dentro de cada item */
}

.header-content .nav-links a {
    text-decoration: none;
    color: #000; 
    padding: 15px;
    text-transform: uppercase;
    font-weight: bold;
    display: block; 
}

.header-content .nav-links a:hover {
    background-color: transparent;
    color: #000;
    border-color: #000;
}

/* 6. Ações do header (como o botão de menu mobile) */
.header-content .header-actions {
    /* Você pode adicionar estilos aqui, se necessário. Ex: um espaçamento à esquerda */
    margin-left: 20px;
}

.logo a {
    display: block;
}

.logo img {
    max-height: 40px; /* Ajuste a altura do seu logo */
    width: auto;
}

/* --- NAVEGAÇÃO DESKTOP --- */
.nav {
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links a {
    color: #000; 
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--cinza);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--preto);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-links .current-menu-item a {
    color: #000;
    font-weight: 700;
}

.nav-links .current-menu-item a::after {
    transform: scaleX(1); 
}

#menu-footer .menu-item {
    margin: 0px!important;
    padding: 6px 0px !important;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #4a5568;
    color: var(--preto);
}

.btn-outline:hover {
    background-color: var(--amarelo);
    border-color: var(--amarelo);
    color: var(--preto);
}

.mobile-menu-btn {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 5px 0;
    transition: all 0.4s ease-in-out;
}


/* ==========================================================================
   RESPONSIVIDADE (TELAS MENORES)
   ========================================================================== */
@media (max-width: 768px) {

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .metric-header {
        min-height: 50px;
    }

    .mtetric-card {
        padding: 5px;
    }
    .metric-value {
        font-size: 14px;
        text-align: center;
    }

    .metric-label {
        font-size: 12px;
    }

    .metric-icon {
        height: 20px;
    }

    .metric-change {
        font-size: 10px;
        text-align: center;
        width: 100%;
        min-width: 100%;
        display: block;
    }

    .hero {
        background-image: none;
    }

    .search-box {
        width: 100%;
    }

    /* Esconde a navegação principal */
    .header .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--branco); 
        display: flex; 
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        will-change: transform;
    }

    .header-content {
        justify-content: space-between;
    }

    /* Mostra a navegação quando a classe .nav-open for adicionada */
    .header .nav.nav-open {
        transform: translateX(0);
    }
    
    /* Ajusta a lista de links para o modo vertical */
    .nav-links {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links a {
        font-size: 1.2rem; /* Aumenta a fonte para mobile */
    }

    /* Mostra o botão hamburger */
    .mobile-menu-btn {
        display: block;
    }

    /* Esconde o botão "Entrar" para simplificar a interface mobile */
    .header-actions .btn-outline {
        display: none;
    }

    .contract-title {
        font-size: 12px;
        text-align: justify;
    }

    .contract-content {
        flex-direction: column;
    }

    .contract-card {
        opacity: 1 !important;
    }

    .entry-content {
        opacity: 1 !important;
    }

    .mobile-dn {
        display: none !important;
    }
}


/* Animação do Hamburger para "X" quando o menu está aberto */
.mobile-menu-btn.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* FOOTER MENU */
ul.footer-nav-links {
    list-style: none;
}

/* ==========================================================================
   Seção de Contratos Aleatórios
   ========================================================================== */

.random-contracts {
  width: 100%;
}

.random-contracts-header {
  text-align: center;
  margin-bottom: 40px;
}

.random-contracts-title {
  font-size: 2.5rem; /* 40px */
  color: #2c3e50;
  margin: 0;
  font-weight: 700;
}

/* ==========================================================================
   Lista de Contratos e Estilo dos Links
   ========================================================================== */

.random-contracts-list {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Espaçamento entre os cards no mobile */
}

/* Remove a decoração padrão dos links que envolvem os cards */
.random-contracts-list a {
  text-decoration: none;
  color: inherit;
  display: block; /* Garante que o link ocupe todo o espaço do card */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px; /* Aplica o raio da borda ao link para o hover funcionar bem */
}

.random-contracts-list a:hover {
  transform: translateY(-5px); /* Efeito de elevação ao passar o mouse */
  box-shadow: 0 12px 24px rgba(44, 62, 80, 0.15);
}

/* ==========================================================================
   Estilo do Card de Contrato (Mobile-First)
   ========================================================================== */

.random-contract-card {
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 25px;
  display: flex;
  flex-direction: column;
  height: 100%; /* Garante que os cards na mesma linha tenham a mesma altura */
  box-shadow: 0 4px 8px rgba(44, 62, 80, 0.1);
}

.random-contract-header {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.random-contract-title {
  font-size: 1rem; /* 16px */
  color: #7f8c8d;
  margin: 0;
  font-weight: 600;
}

.random-contract-content {
  flex-grow: 1; /* Permite que o conteúdo cresça para preencher o espaço */
}

.random-contract-description {
  font-size: 0.95rem; /* 15.2px */
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* ==========================================================================
   Media Query para Telas Maiores (Desktop)
   ========================================================================== */

@media (min-width: 768px) {
  .random-contracts-list {
    display: grid;
    /* Cria 3 colunas de tamanho igual */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* Aumenta o espaçamento entre os cards no desktop */
  }

  .random-contracts-title {
      font-size: 3rem; /* 48px */
  }
}

/* Ajuste para telas muito grandes */
@media (min-width: 1200px) {
    .random-contracts-title {
        font-size: 3.5rem; /* 56px */
    }
}

/* Estilos para a página de licitação */
.single-licitacao-header {
    background-color: #f7f7f7;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 5px solid var(--amarelo);
    position: relative;
}
.single-licitacao-title {
    margin-top: 0;
    font-size: 2em;
}
.single-licitacao-pncp {
    font-family: monospace;
    background-color: #e9e9e9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}
.single-licitacao-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    color: #555;
}
.single-licitacao-section {
    margin-bottom: 2.5rem;
    margin-top: 20px;
}
.single-licitacao-section-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5em;
}
.single-licitacao-tabs {
    background-color: #f9f9f9;
    padding-bottom: 10px;
}
.licitacao-data-table {
    width: 100%;
    border-collapse: collapse;
}
.licitacao-data-table th,
.licitacao-data-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}
.licitacao-data-table th {
    width: 30%;
    font-weight: bold;
    background-color: #f9f9f9;
}

/* Estilos para as abas */
.tabs-nav {
    display: flex;
    border-bottom: 2px solid #ccc;
    margin-bottom: 1.5rem;
}
.tab-link {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1em;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.tab-link.active {
    border-color: var(--amarelo);
    font-weight: bold;
}
.tab-content {
    display: none;
    padding-left: 15px;
}
.tab-content.active {
    display: block;
}
.documentos-list {
    list-style-type: none;
    padding: 0;
}
.documentos-list li a {
    display: block;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--preto);
}
.documentos-list li a:hover {
    background-color: #f7f7f7;
}
.documentos-list li a em {
    display: block;
    font-size: 0.9em;
    color: #777;
    margin-top: 0.2rem;
}

/* Adicione este CSS ao final do seu style.css */

/* --- Estilos para a Nova Seção de Destaques --- */
.single-licitacao-destaques {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background-color: var(--amarelo); /* Cor de fundo suave */
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    text-align: center;
}

.destaque-item .destaque-label {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.destaque-item .destaque-valor {
    display: block;
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

/* --- Destaque especial para o valor principal --- */
.destaque-item.valor-principal {
    background-color: var(--amarelo);
    transform: scale(1.05); /* Efeito de leve zoom para chamar atenção */
}

.destaque-item.valor-principal .destaque-label {
    color: var(--preto);
}

.destaque-item.valor-principal .destaque-valor {
    font-size: 2.2em; /* Fonte bem maior */
    color: var(--preto);
}

/* Opcional: Estilos para o status */
.destaque-valor[class*="status-"] {
    font-size: 1.2em;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    color: var(--preto);
}

.destaque-valor.status-divulgada-no-pncp { background-color: #007bff; }
.destaque-valor.status-revogada { background-color: #dc3545; }
.destaque-valor.status-anulada { background-color: #6c757d; }
.destaque-valor.status-suspensa { background-color: #ffc107; color: #333; }

/* --- Estilos para Seção de Destaques na Home --- */
.home-destaques {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.home-destaques .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* --- Estilos do Card Individual --- */
.licitacao-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-modalidade {
    font-weight: bold;
    color: var(--azul);
    background-color: rgba(0, 86, 179, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
}

.card-status {
    font-size: 0.85em;
    color: #555;
}

.card-body {
    padding: 20px;
    flex-grow: 1; /* Faz esta área crescer para alinhar os rodapés */
}

.card-title {
    font-size: 1.25em;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 85px; /* Altura fixa para alinhar os cards */
    overflow: hidden;
}

.card-title a {
    text-decoration: none;
    color: #000;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #000;
}

.card-orgao {
    font-size: 0.9em;
    color: #7f8c8d;
    margin: 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.card-valor .valor-label,
.card-local .local-label {
    display: block;
    font-size: 0.8em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.card-valor .valor-montante {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--verde);
}

.card-local {
    text-align: right;
}

.card-local .local-cidade-uf {
    font-size: 12px;
    font-weight: bold;
    color: #000;
}

/* Link invisível que cobre o card inteiro */
.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    text-indent: -9999px; /* Esconde o texto do link */
}

/* Garante que o link do título fique clicável acima do link do card */
.card-title a {
    position: relative;
    z-index: 2;
}

/* Estilos para o botão de Favoritar com ícone */

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Estilo do ícone dentro do botão */
.favorite-btn i {
    font-size: 24px; /* Tamanho da estrela */
    color: #000000;   /* Cor do contorno (preto) */
    transition: color 0.2s ease-in-out, transform 0.2s ease;
}

/* Efeito ao passar o mouse */
.favorite-btn:hover i {
    transform: scale(1.15); /* Aumenta um pouco o ícone */
}

/* Estilo do ícone QUANDO ESTIVER FAVORITADO */
/* Usamos a classe .favorited que adicionamos ao botão */
.favorite-btn.favorited i {
    /* Você pode escolher a cor que preferir aqui */
    color: #000000; /* Estrela preenchida preta, mantendo a identidade P&B */
    /* OU para uma estrela dourada, por exemplo: */
    /* color: #FFD700; */
}

/* Estilo para o link de login para favoritar */
.favorite-btn-login i {
    font-size: 24px;
    color: #000000;
    position: absolute;
    top: 10px;
    right: 10px;
}

.full-width-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
}

.full-width-image img{
    max-width: 100%;
    width: 100%;
}

/* ===================================================================
// Estilos para a Seção "Últimas do Blog" na Home
// ===================================================================*/

.home-latest-posts {
    padding: 60px 0;
    background-color: #f9f9f9; /* Um fundo cinza bem claro para destacar a seção */
}

/* Adicione uma classe de container se seu tema não tiver uma */
.home-latest-posts .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.home-latest-posts .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #000000;
    margin-top: 0;
    margin-bottom: 40px;
}

/* O grid que segura os posts */
.posts-grid {
    display: grid;
    /* No mobile, uma coluna (padrão) */
    gap: 30px; /* Espaçamento entre os cards */
}

/* O card de cada post */
.post-card {
    background-color: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden; /* Garante que a imagem não vaze das bordas arredondadas */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

/* Imagem destacada */
.post-card-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Conteúdo de texto do card */
.post-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz esta área crescer para preencher o espaço */
}

.post-card-title {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.post-card a {
    color: #000000;
    text-decoration: none;
}
.post-card-title a:hover {
    text-decoration: underline;
}

.post-card-excerpt {
    color: #333333;
    flex-grow: 1; /* Empurra o rodapé para baixo */
    margin-bottom: 20px;
}

.post-card-date {
    font-size: 0.9rem;
    color: #666666;
    text-transform: uppercase;
}

article.post {
    max-width: 840px!important;
    margin: 0px auto!important;
    text-align: justify!important;
}

article.post h1 {
    color: #000!important;
    font-size: 35px!important;
}

.wp-block-media-text>.wp-block-media-text__content {
    text-align: justify!important;
}


/* ===================================================================
// Media Query para Telas Maiores (Desktop)
// ===================================================================*/
@media (min-width: 768px) {
    /* Em telas maiores, o grid terá 3 colunas */
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}



/* ===================================================================
// Estilos para a Página de Arquivo (archive.php)
// ===================================================================*/

/* --- Layout Geral da Página de Arquivo --- */
.archive .site-main .container {
    max-width: 900px; /* Largura máxima para boa legibilidade */
    margin: 0 auto;
    padding: 40px 15px;
}

/* --- Cabeçalho do Arquivo (Título da Categoria) --- */
.archive-header {
    text-align: center;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2.8rem;
    color: #000000;
    margin: 0 0 10px 0;
    text-transform: capitalize;
}

.archive-description {
    font-size: 1.1rem;
    color: #555555;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Listagem de Posts --- */
.posts-listing {
    /* Este é apenas um container, o estilo principal está no item individual */
}

/* --- Card de Resumo de Cada Post --- */
.post-summary {
    display: flex;
    flex-direction: column; /* No mobile, imagem fica em cima */
    gap: 20px; /* Espaço entre a imagem e o conteúdo */
    padding-bottom: 30px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-bottom: 1px solid #E0E0E0;
}

.post-summary:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* --- Imagem Destacada do Resumo --- */
.post-summary-thumbnail a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.post-summary-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.post-summary-thumbnail a:hover img {
    transform: scale(1.05);
}

/* --- Conteúdo de Texto do Resumo --- */
.post-summary-title {
    margin: 0 0 10px 0;
    font-size: 2rem;
}

.post-summary-title a {
    color: #000000;
    text-decoration: none;
}

.post-summary-title a:hover {
    text-decoration: underline;
}

.post-summary-meta {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.post-summary-excerpt p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #333333;
}

/* --- Paginação --- */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nav-links .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links .page-numbers:hover {
    background-color: #f0f0f0;
    border-color: #cccccc;
}

/* Estilo do número da página atual */
.nav-links .page-numbers.current {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Esconde os '...' se não forem necessários */
.nav-links .dots {
    align-self: center;
    padding: 10px 5px;
}

/* ===================================================================
// Media Query para Telas Maiores (Desktop)
// ===================================================================*/
@media (min-width: 768px) {

    .archive .site-main .container {
        padding: 60px 15px;
    }
    
    .archive-title {
        font-size: 3.5rem;
    }

    /* Em telas maiores, imagem à esquerda e texto à direita */
    .post-summary {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }

    .post-summary-thumbnail {
        flex-basis: 300px; /* Largura fixa para a imagem */
        flex-shrink: 0;   /* Impede que a imagem encolha */
    }

    .post-summary-content {
        flex-grow: 1; /* Faz o conteúdo ocupar o espaço restante */
    }

    .post-summary-title {
        font-size: 2.2rem;
    }
}

/* ===================================================================
// Estilos para o Botão Fixo do WhatsApp
// ===================================================================*/

.fixed-whatsapp-btn {
    /* --- Posicionamento Fixo --- */
    position: fixed;
    bottom: 25px; /* Distância da parte inferior */
    right: 25px;  /* Distância da parte direita */
    z-index: 1000; /* Garante que o botão fique acima de outros elementos */
    
    /* --- Aparência do Círculo --- */
    background-color: #25D366; /* Cor verde oficial do WhatsApp */
    color: #FFFFFF;           /* Cor do ícone (branco) */
    width: 60px;               /* Largura do botão */
    height: 60px;              /* Altura do botão */
    border-radius: 50%;        /* Transforma o quadrado em um círculo perfeito */
    
    /* --- Centralização do Ícone --- */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* --- Efeitos e Polimento --- */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Sombra para dar profundidade */
    text-decoration: none;                     /* Remove o sublinhado do link */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* --- Ícone Interno --- */
.fixed-whatsapp-btn .fab.fa-whatsapp {
    font-size: 32px; /* Tamanho do ícone */
}

/* --- Efeitos de Interação (Hover) --- */
.fixed-whatsapp-btn:hover {
    background-color: #128C7E; /* Um verde mais escuro no hover */
    transform: scale(1.1);     /* Aumenta um pouco o botão ao passar o mouse */
    color: #FFFFFF;
}


/* --- Ajuste Fino para Telas Pequenas --- */
@media (max-width: 480px) {
    .fixed-whatsapp-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .fixed-whatsapp-btn .fab.fa-whatsapp {
        font-size: 26px;
    }
}

.custom-loader {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db; /* Cor azul do seu site */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}