:root {
  --color-principal: #1a237e;
  --color-accent: #ffca28;
  --color-text: #333;
  --font-principal: 'Montserrat', sans-serif;
  --fondo:#f2f2f2;
}

/* --- Dropdown original para escritorio --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  font-size: 16px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;  /* justo debajo del botón */
  left: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: block;
}

.dropdown-content button {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: white;
  cursor: pointer;
  text-align: left;
}

.dropdown-content button:hover {
  background-color: #ddd;
}


/* --- Estilos menú hamburguesa para móvil --- */

/* Ocultar menú principal y mostrar hamburguesa en móvil */
@media (max-width: 768px) {
  /* Haz que el dropdown ya no sea inline, para que pueda ser bloque */
  .dropdown {
    display: block;
  }

  /* Dropdown content ya no está absolute, se integra en el flujo */
  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: white;
    display: none; /* por defecto oculto */
    border-radius: 0 0 4px 4px;
    margin-top: 0;
  }

  /* Para mostrar el dropdown cuando se active via JS */
  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* --- Estilos para el botón hamburguesa --- */
.hamburger {
  display: none; /* oculto por defecto en escritorio */
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: black;
  border-radius: 2px;
}

/* Mostrar hamburguesa en móvil */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  /* Ocultar el menú principal inicialmente */
  .nav-links {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 60px; /* ajusta según altura navbar */
    right: 0;
    width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
  }

  /* Mostrar menú al activar */
  .nav-links.active {
    display: flex;
  }
}

/* --- Estil per pàgines legals --- */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  font-family: var(--font-principal), sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 8px;
}

.legal-content h1,
.legal-content h2 {
  font-family: 'Poppins', sans-serif;
  color: #1e1e1e;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 1.2rem;
}

.legal-content ul {
  padding-left: 1.2rem;
  list-style-type: disc;
}

footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #777;
}

footer a {
  color: #333;
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .legal-content {
    padding: 1.5rem;
  }

  .legal-content h1 {
    font-size: 1.5rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }
}

/* Header */
header {
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a,
.dropbtn,
.dropdown-content button {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.3s;
}

.nav-links a:hover,
.dropbtn:hover,
.dropdown-content button:hover {
  color: #007bff;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  font-size: 16px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;  /* justo debajo del botón */
  left: 0;
  background-color: white;
  min-width: 160px;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  flex-direction: column;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: flex;
}

.dropdown-content button {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: white;
  cursor: pointer;
  text-align: left;
}

.dropdown-content button:hover {
  background-color: #ddd;
}

/* Botó hamburguesa */
.hamburger {
  display: none; /* ocult en escriptori */
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: black;
  border-radius: 2px;
}

/* Responsive (mòbil) */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 60px; /* ajustar segons altura navbar */
    right: 0;
    width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .dropdown {
    display: block;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: white;
    display: none;
    border-radius: 0 0 4px 4px;
    margin-top: 0;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}

.nav-links li {
  position: relative;
  margin: 0;
  padding: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
