 /*
 * @author ( Joan Anglés i Gómez )
 * el roig
*/

/*
  Estils generals per a tota la web.
*/

header, footer {
  background-color: #111827;
  color: white;
  text-align: center;
  padding: 1rem;
}

nav a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}



/* Contingut de les pàgines */
main {
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
}

main a {
  color: #595c70;
}



/* Estil eliminar zona en blanc després del footer */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

main {
  flex: 1; /* ocupa todo el espacio disponible entre header y footer */
}



/* Fila superior: logo a l'esquerra, títol centrat */
.header-top {
  position: relative;
  display: flex;
  align-items: center;
  padding: 1px;
  height: 80px; /* opcional, solo para ejemplo */
}

.header-top .logo img {
  max-width: 90px;
  height: auto;
}

.header-top h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 2em;
  text-align: center;
}

@media (max-width: 480px) {
  .header-top {
    justify-content: flex-start; /* Logo a la izquierda */
  }

  .header-top h1 {
    text-align: left;  /* Ajusta el título un poco hacia la derecha si quieres */
    margin-left: 5px; /* Separación del logo */
    font-size: 1em;    /* Reducimos tamaño si es necesario */
  }

  .header-top .logo img {
    max-width: 60px; /* Reducimos tamaño del logo */    
  }
}

/* Menú principal */
.menu, .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu > li {
  position: relative;
  display: inline-block;
  margin-right: 5px;
}

.menu a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 1px 0px;
  display: block;
}

.menu a:hover, .menu a.active {
  text-decoration: underline;
  text-decoration-color: #7f8c8d;
  text-decoration-thickness: 5px;
  text-underline-offset: 10px;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #7f8c8d;
  border: 2px solid #111827;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  min-width: 150px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submenu a:hover, .submenu a.active {
  text-decoration: underline;
  text-decoration-color: inherit; /* hereda el color del texto padre */
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}

.submenu li {
  display: block;
}

.submenu a {
  font-weight: 500;
  color: #ecf0f1;
  padding: 8px 12px;
}

.submenu a:hover {
  text-decoration: underline;
  text-decoration-color: #111827;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

/* Submenú visible al hover (desktop) */
.menu > li:hover .submenu {
  display: block;
  opacity: 1;
}



/*** #### Nom del Bloc - Copyright i Avís legal #### ***/
/* Encapsular el badge con un contenedor único */
#avislegal {
  all: unset; /* elimina herencia global */
}

/* Estilos del párrafo de copyright */
#avislegal p.copyright {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.875rem;
  color: #838a9e;
}

/* Estilo del enlace dentro del párrafo */
#avislegal p.copyright a {
  color:  white;
  text-decoration: none;
}

/* Estilo cuando el cursor pasa por encima del enlace */
#avislegal p.copyright a:hover {
  color: inherit; /* hereda el color del texto padre */
}

/* favicon.ico */
#avislegal .mare-con-logo {
  display: inline-flex;
  align-items: center;
}

#avislegal .logo-mare {
  width: 16px;
  height: 16px;
  margin-left: 5px;
  margin-right: 1px;
}
