/* formatações heder navegação e logo */
header {
  position: relative;
  display: flex;
  margin-left: 1.4em;
  align-items: center;
  justify-content: space-between;
}

header img {
  height: 2.5em;
}

header #tituloSpan {
  text-align: center;
  font-size: 1.25em;
  margin-left: 1em;
}

/* header span {
    text-align: center;
    font-size: 1.25em;
    margin-left: 1em;
  } */

header nav ul {
  display: inline-block;
  list-style: none;
}

header nav li {
  display: inline;
  margin: 0 1em 1em 0;
}

header nav li a {
  text-decoration: none;
  position: relative;
  display: inline-block;
  color: black;
}

header nav li a:visited {
  text-decoration: none;
  color: inherit;
}

header .logoTopMenuLeft {
  display: flex;
  justify-content: center;
  align-items: center;
}

/*barrinha de baixo dos menus*/
header nav li a::after {
  content: "";
  display: block;
  margin-top: 0.5em;
  height: 0.5em;
  width: 0;
  top: 1em;
  background: transparent;
  transition: all 0.3s;
}

li > a:hover::after,
li > a.active-nav::after {
  width: 100%;
  background: var(--verde);
}

/*parte do div contactos - footer*/
footer {
  text-align: center;
}

#divisoriaContactos {
  background-color: var(--azul);
  color: white;
  height: 7em;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#redesSociais {
  display: grid;
  grid-template-columns: repeat(4, auto);
  margin: 2.5em 1.5em 1.5em 1.5em;
  /* margin-top: 3em; */
}

#redesSociais .iconsRS {
  height: 4em;
}

#redesSociais a {
  color: black;
}

#redesSociais a:link,
a:visited {
  text-decoration: none;
}

.HorarioCopyright {
  background-color: rgb(245, 245, 245);
  padding: 0.5em;
}

#horario,
#copyright {
  margin-top: -0.5em;
  /* margin-bottom: 1em; */
  /* background-color: ; */
}

/* barrinha dos cookies */
.cookie-consent {
  display: none;
  position: fixed;
  bottom: 1.25em;
  left: 1.25em;
  right: 1.25em;
  background-color: #004c9ed2;
  color: #fff;
  padding: 1em;
  border-radius: 0.35em;
  z-index: 1000;
  text-align: center;
}

.cookie-consent p {
  margin: 0;
  padding-right: 0.625em;
  display: inline-block;
  /* box-shadow: 0 0, 2.5em 0.5em rgba(0, 0, 0, 0.2); */
}

.cookie-consent button {
  background-color: var(--verde);
  color: #fff;
  border: none;
  padding: 0.625em 1.25em;
  border-radius: 0.35em;
  cursor: pointer;
}

.cookie-consent button:hover {
  background-color: #00611c;
}

/* Estilos do menu hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 10;
  /* position: fixed; */
  margin-top: 0.15em;
  margin-right: 1.5em;
  position: relative;
}

.hamburger span {
  height: 0.2em;
  width: 2em;
  background-color: var(--verde);
  margin: 0.25em;
  transition: 0.3s;
  border-radius: 0.15em;
  transform-origin: center;
}

#backToTop {
  display: none;
  /* Inicialmente escondido */
  position: fixed;
  bottom: 1em;
  left: 1em;
  height: 3em;
  width: 3em;
  z-index: 90;
  /* Para garantir que ele fique acima de outros elementos */
  background-color: var(--azul);
  /* Use a cor desejada */
  color: white;
  border: none;
  padding: 1em;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  /* transition: background-color 0.3s, transform 0.3s; */
}

#backToTop:hover {
  background-color: var(--verde);
  /* Ajuste a cor ao passar o mouse */
}

#backToTop:active {
  transform: scale(0.95);
  /* Efeito de clique */
}

#backToTop i {
  /* Se estiver usando um ícone de fonte, ajuste aqui */
  margin: 0; /* Remova margens, se necessário */
}
/* Media query para telas menores */
@media screen and (max-width: 1080px) {
  header {
    height: 6em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    margin: 0;
    padding-left: 0.75em;
  }

  header #tituloSpan {
    font-size: 0.85em;
    max-width: 80%; /* Define o comprimento máximo do texto */
    overflow: hidden; /* Esconde qualquer texto que ultrapasse o limite */
    white-space: nowrap; /* Impede a quebra de linha no texto */
    margin-left: 0.5em;
  }

  .logoTopMenuLeft{

    display: flex;
    flex-direction: column;
    /* max-width: 40em; */
    width: 50em;
    margin-left: -4em;
  }

  .hamburger {
    display: flex;
    position: absolute;
    /* Fixa o botão no canto superior direito */
    right: 1em;
    /* top: 1em; */
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
  }

  nav .nav-links.active + .hamburger {
    position: fixed;
    right: 1.1em;
    top: 2.1em;
    transform: none;
  }

  nav .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    /* Inicialmente fora da tela */
    height: 100%;
    width: 12em;
    background-color: var(--branco);
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease-in-out;
    margin-top: 0;
    font-size: larger;
  }

  nav .nav-links.active {
    right: 0;
    /* Move o menu para dentro da tela */
  }

  /* Animação do menu hamburger para o ícone "X" */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.25em, 0.15em);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.85em, -0.75em);
  }

  #divisoriaContactos {
    height: 5em;
    font-size: 0.75em;
  }

  #redesSociais {
    display: flex;
    margin-top: 2em;
    /* grid-template-rows: 1fr 1fr 1fr 1fr; */
    flex-direction: column;
    /* width: 100%; */
  }

  .HorarioCopyright {
    font-size: 0.75em;
  }

  #backToTop {
    display: block;
    /* Exibe o botão apenas em telas menores */
  }
}
