/* --- Configurações gerais --- */
#header-body{
    margin:0%;
    z-index: 9999;
}

#header{
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    flex-direction: row;
    width: 100%;

    background-color: var(--bg-header);
    position: fixed;
    z-index: 9999;
}

.header-link-text {
  text-decoration: none;
}

/* --- Elementos do header --- */
.element-header{
    color: var(--cl-paper);
    padding: 17px 40px 17px 40px;
}

#container-element-header{
  display: flex;
  align-content: end;
  
  justify-content: end;

  width: 70%;
}

/* --- Clique + Animação do header --- */
.element-header:hover {
  color: var(--cl-paper-ativo);
  background-color: white;
  font-size:17px;
}
.ativo-header {
  color: var(--cl-paper-ativo);
  background-color: white;
}

.logo-header {
  padding: 5px 30px;
  height: 45px;
  width: 50px;

  align-self: center;
}

#definir-posicao-header {
  width: 100%;

  display: flex;
  justify-content: center;
  justify-self: center;
}



















/* =====================================
   CABEÇALHO RESPONSIVO
===================================== */

@media (max-width: 768px) {

    #header {
        width: 100%;
    }

    #definir-posicao-header {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "logo menu"
            "pesquisa pesquisa";
        align-items: center;
        width: 100%;
        padding: 2px 5px;
        box-sizing: border-box;
        column-gap: 8px;
    }

    /* Logo */
    #definir-posicao-header > a {
        grid-area: logo;
        display: flex;
        align-items: center;
    }

    .logo-header {
        width: 42px;
        height: 42px;
        padding: 0;
        object-fit: contain;
    }

    /* Navegação */
    #container-element-header {
        grid-area: menu;
        width: 100%;
        justify-content: flex-end;
        align-items: center;
    }

    .element-header {
        padding: 12px 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    .element-header:hover {
        font-size: 14px;
    }

    /* Pesquisa */
    #container-pesquisa-global {
        grid-area: pesquisa;
        width: 100%;
        margin: 0px 0 0;
        box-sizing: border-box;
    }

    #pesquisa-global {
        width: 100%;
        padding: 5px 14px;
        font-size: 12px;
    }

    #resultados-pesquisa-global {
        width: 100%;
        max-height: 300px;
    }
}

/* Celulares muito estreitos */
@media (max-width: 360px) {

    .element-header {
        padding: 12px 7px;
        font-size: 13px;
    }

    .element-header:hover {
        font-size: 13px;
    }

    .logo-header {
        width: 36px;
        height: 36px;
    }
}
















#container-pesquisa-global {
    position: relative;
    width: 320px;
    margin: 10px 0;
}

#pesquisa-global {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}

#pesquisa-global:focus {
    border-color: #B2897F;
}

#resultados-pesquisa-global {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 9999;
}

.resultado-pesquisa {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #2a2a2a;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.resultado-pesquisa:hover {
    background: #f5f2ef;
}

.resultado-pesquisa small {
    color: #B2897F;
    white-space: nowrap;
}

#resultados-pesquisa-global p {
    padding: 12px;
    margin: 0;
    color: #666;
}