@charset "UTF-8";

:root {
    /* --- Tons de Azul Escuro (Dark Blue) valores1 --- */
    --pmf-dark: #003063;

    /* --- Tons de Azul Ciano (Cyan Accent) --- */
    --pmf-accent: #00b1eb;
    --pmf-accent-bg: rgb(0 177 235 / 0.08);
    --pmf-accent-ring: rgb(0 177 235 / 0.30);

    /* --- Tons de Azul Royal (Brand Accent) --- */
    --brand-accent: #3b82f6;
    --brand-accent-hover: #2563eb;
    --brand-accent-soft: #eff6ff;
    --sf-accent: #1d6fd8;
    --sf-accent-soft: #e8f1fc;
    --sf-accent-text: #1354a8;

    /* --- Brancos e Superfícies Claras --- */
    --white: #FFFFFF;
    --brand-surface: #ffffff;
    --sf-bg: #ffffff;
    --brand-tint: #f9fafb;
    --pmf-surface: rgb(255 255 255 / 0.98);
    --pmf-surface2: rgb(242 247 251 / 1);
    --pmf-bg-page: #f7f9fc;

    /* --- Cinzas Claros e Fundos (Off-White) --- */
    --off-white: #F5F5F5;
    --sf-bg2: #f5f6f8;

    /* --- Textos e Cinzas Médios --- */
    --gray-text-old: #757575;
    --gray-text: #6b7280;
    --sf-text-muted: #6b7280;
    --brand-muted: #666666;
    --tag-bg: rgba(117, 117, 117, 0.44);
    --pmf-muted: rgb(0 48 99 / 0.45);

    /* --- Textos Escuros e Pretos --- */
    --brand-primary: #1a1a1a;
    --sf-text: #1a1a1a;

    /* --- Bordas --- */
    --brand-border: #e5e7eb;
    --sf-border: rgba(0, 0, 0, .1);
    --sf-border2: rgba(0, 0, 0, .18);
    --pmf-border: #D9E6F2;
    --pmf-border-str: #d0dce7;

    /* --- Miscelânea (Efeitos, Fonte e Raios) --- */
    --shadow-standard: 0px 0px 1px rgba(40, 41, 61, 0.04), 0px 2px 4px rgba(96, 97, 112, 0.16);
    --sf-radius: 8px;
    --sf-radius-lg: 12px;
    --sf-font: inherit;
    --pmf-font: 'Outfit', system-ui, sans-serif;
    --pmf-radius-sm: 0.65rem;
    --pmf-radius-md: 0.85rem;
    --pmf-radius-lg: 1.2rem;
    --pmf-radius-pill: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--pmf-font) !important;
    background-color: var(--pmf-bg-page) !important;
}

main {
    flex: 1 0 auto;
    /* Força o main a esticar e respeitar o conteúdo */
}

h1 {
    text-align: center;
    margin-top: 2rem;
    color: var(--pmf-dark);
}

.logo {
    padding: 5px;
    cursor: pointer;
}

.nav-item a.ativo {
    color: var(--pmf-accent) !important;
    font-weight: 700;
}

.nav-item a:hover {
    color: var(--pmf-accent) !important;
}

.site-footer,
.sectionFooter {
    background-color: var(--pmf-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 0.85rem;
}

.sectionFooter {
    color: #fff;
    padding: 1rem;
    margin-top: auto;
    /* Empurra o footer para a base do body flex */
    flex-shrink: 0;
    /* Garante que o footer não vai esmagar se a tela encolher */
}

/* ==========================================================================
   LISTAGEM DE CONTATOS (tabela por entidade)
   ========================================================================== */
.container-tabelas {
    width: calc(100% - 3rem);
    max-width: 1200px;
    margin: 2rem auto;
}

.bloco-entidade {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 47, 102, 0.08);
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    overflow-x: auto;
}

.bloco-entidade h2 {
    color: var(--pmf-dark);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--pmf-accent);
    padding-bottom: 0.5rem;
}

.bloco-entidade h2 a {
    color: var(--sf-accent);
    text-decoration: none;
}

.bloco-entidade h2 a:visited {
    color: var(--pmf-dark);
    text-decoration: none;
}


.tabela-contatos {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--pmf-font) !important;
    font-size: 0.9rem;
    text-align: left;
}

.tabela-contatos th {
    background-color: var(--pmf-dark);
    color: #fff;
    font-weight: 600;
    padding: 10px 12px;
}

.tabela-contatos td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
    color: #444;
    vertical-align: top;
}

.tabela-contatos tr:hover {
    background-color: #f8fafd;
}

/* ==========================================================================
   BUSCA
   ========================================================================== */
#campoPesquisa {
    display: block;
    width: 370px;
    margin: 1.5rem auto 0;
    padding: 0.7rem 1rem;
    font-family: var(--pmf-font) !important;
    font-size: 1rem;
    border: 2px solid var(--pmf-dark);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

#campoPesquisa:focus {
    border-color: var(--pmf-accent);
    box-shadow: 0 0 10px rgba(0, 147, 212, 0.2);
}

#semResultados {
    display: none;
    text-align: center;
    color: #666;
    padding: 2rem;
    font-size: 1rem;
    font-weight: 500;
}

.aviso-erro {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.aviso-erro h2 {
    color: var(--pmf-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   CARDS DE SECRETARIA / RAMAIS
   ========================================================================== */
.ajustSectionUm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: calc(100% - 4rem);
    margin: 3rem auto 4rem;
    justify-content: center;
}

.CardSecretaria {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 47, 102, 0.06);
    padding: 2rem;
    border: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.bordasDosCards {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: #eef7fc;
    color: var(--pmf-accent);
    font-weight: 700;
    padding: 0.5rem 1.4rem;
    border-radius: 20px;
    border: 2px solid var(--pmf-accent);
    margin-top: 0.4rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    width: auto;
}

.listaRamal {
    width: 100%;
    margin-top: 0.5rem;
    cursor: pointer;
    background: #f8fafd;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    border: 1px solid #e2eaf4;
}

.listaRamal p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: var(--pmf-accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.ramalSetor {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #eef2f7;
}

.ramalSetor:last-child {
    border-bottom: none;
}

.sub-content {
    padding: 0.8rem 0 0.4rem 0.5rem;
}

.cargoFuncionario {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.ramalFuncionario {
    color: var(--pmf-accent);
    margin-top: 0.2rem;
}

.CardSecretaria hr {
    border: 0;
    border-top: 1px solid #eef2f7;
    margin: 1rem 0 0 0;
}

/* ==========================================================================
   CARDS DE ENTIDADE + MODAL (detalhes de setores/ramais)
   ========================================================================== */
.container-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.card-entidade {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 5px solid var(--pmf-dark);
}

.card-entidade:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-entidade h2 {
    color: var(--pmf-dark);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    height: 3rem;
    overflow: hidden;
}

.fone-destaque {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.fone-destaque b {
    color: var(--pmf-dark);
    font-size: 1.4rem;
    display: block;
    margin-top: 5px;
}

.fone-destaque span {
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 1px;
    font-weight: 600;
}

.btn-detalhes {
    background: var(--pmf-dark);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-detalhes:hover {
    background: var(--pmf-accent);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    border-radius: 20px;
    position: relative;
    padding: 2rem;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #000;
}

.search-container {
    text-align: center;
    margin: 2rem auto;
    max-width: 1000px;
    padding: 0 1rem;
}

.lista-setores-modal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;

    overflow-y: auto;
    padding-right: 5px;
}

.linha-setor {
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--pmf-dark);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.setor-nome {
    font-size: 1.1rem;
    color: var(--pmf-dark);
}

.setor-endereco {
    font-size: 0.95rem;
    color: #555;
}

.setor-contato {
    font-size: 0.95rem;
    color: #333;
    border-top: 1px dashed #ddd;
    padding-top: 5px;
    margin-top: 2px;
}

/* ==========================================================================
   PÁGINA INICIAL
   ========================================================================== */
.hero {
    position: relative;
    width: 100%;
    min-height: 38vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pmf-dark) 0%, var(--pmf-accent) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("imgs/centro.png") center/cover no-repeat;
    /*adcioanr imagem depois*/
    opacity: 0.18;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 3rem 2rem 2.5rem;
}

.hero-content h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-align: center;
}

.hero-content p {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 300;
    opacity: 0.9;
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    width: calc(100% - 3rem);
    margin: -3rem auto 3rem;
    position: relative;
    z-index: 2;
    padding: 0 0.5rem;
}

.nav-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 47, 102, 0.10);
    text-decoration: none;
    color: var(--pmf-dark);
    padding: 1rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 260px;
    gap: 0.8rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    border: 2px solid transparent;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 147, 212, 0.20);
    border-color: var(--pmf-accent);
}

.nav-card .card-icon {
    font-size: 2.4rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pmf-dark), var(--pmf-accent));
    color: #fff;
}

.nav-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: var(--pmf-dark);
}

.nav-card p {
    margin: 0;
    flex: 1;
    font-size: 0.82rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.nav-card .card-arrow {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pmf-accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quick-contacts {
    max-width: 1000px;
    margin: 0 auto 3.5rem;
    width: calc(100% - 3rem);
}

.quick-contacts h2 {
    color: var(--pmf-dark);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem 0.3rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.quick-item {
    background: #fff;
    border-left: 4px solid var(--pmf-accent);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 2px 8px rgba(0, 47, 102, 0.07);
}

.quick-item h3 {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    color: var(--pmf-dark);
}

.quick-item .tel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pmf-accent);
}

.quick-item small {
    display: block;
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.2rem;
}

/* Alinhamento do Título da Entidade e do Botão Lado a Lado */
.topo-bloco {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.topo-bloco h2 {
    margin: 0 !important;
}

.btn-toggle-lista {
    background-color: #e6f4ff;
    color: #0056b3;
    border: 1px solid #b3d7ff;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.btn-toggle-lista:hover {
    background-color: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

.icone-seta {
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

.bloco-entidade:not(.lista-fechada) .icone-seta {
    transform: rotate(180deg);
}

.bloco-entidade.lista-fechada .tabela-contatos tbody tr:not(:first-child) {
    display: none !important;
}

.bloco-entidade:has(tbody tr:only-child) .btn-toggle-lista {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVO (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .ajustSectionUm {
        grid-template-columns: 1fr;
        width: calc(100% - 2rem);
        gap: 1.5rem;
    }

    .coluna1,
    .coluna2 {
        gap: 1.5rem;
    }

    .container-cards {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .tabela-contatos {
        font-size: 0.8rem;
    }

    .nav-cards {
        transform: translateY(-2rem);
        /* Desloca visualmente sem puxar o resto do layout junto */
        margin-bottom: -2rem;
        /* Neutraliza o espaço vazio que ficaria embaixo */
        width: calc(100% - 2rem);
    }

    .quick-contacts {
        width: calc(100% - 2rem);
        margin-bottom: 2.5rem;
    }

    .quick-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .quick-item {
        padding: 1.2rem 1.5rem;
        border-radius: 14px;
        box-shadow: 0 4px 15px rgba(0, 47, 102, 0.06);
        border-left: 4px solid var(--pmf-accent);
    }

    .quick-item h3 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
        font-weight: 700;
    }

    .quick-item .tel {
        font-size: 1.35rem;
        margin: 0.3rem 0;
        display: inline-block;
    }

    .quick-item small {
        font-size: 0.85rem;
        color: #666;
    }

    .sectionFooter {
        flex-shrink: 0;
        /* Impede o footer de encolher ou ser ignorado pelo Flexbox do body */
    }

    .btn-toggle-lista {
        padding: 0.6rem;
        /* Deixa o botão quadrado no mobile */
        border-radius: 50%;
        /* Opcional: transforma em um botão circular no mobile */
        width: 36px;
        height: 36px;
    }

    .btn-toggle-lista span {
        display: none;
        /* Esconde o texto no mobile */
    }

    .btn-toggle-lista .icone-seta {
        font-size: 1.1rem;
        /* Aumenta um pouco a seta para facilitar o clique */
    }
}