/* ===== Tipografia ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&family=Roboto+Mono&display=swap');

body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Capçalera ===== */
header {
  background: #1f2937; /* gris fosc */
  color: white;
  padding: 1.2rem 2rem;
  text-align: center;
  border-bottom: 4px solid #2563eb; /* blau accent */
}
header h1 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 1px;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}
nav a:hover {
  text-decoration: underline;
}

/* ===== Caixa de contingut ===== */
main {
  flex: 1;
  max-width: 950px;
  margin: 2rem auto;
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  text-align: center;
}

/* Títols */
h1, h2, h3 {
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  color: #1f2937;
}
h1 {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}
h2 {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 0.3rem;
}

/* Text i paràgrafs */
p {
  margin: 1rem 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Llistes */
ul, ol {
  text-align: left;
  margin: 1rem auto;
  padding-left: 2rem;
  max-width: 700px;
}

/* ===== Imatges ===== */
img {
  display: block;
  margin: 1.5rem auto;
  max-width: 90%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== Codi ===== */
code {
  background: #f3f4f6;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: "Roboto Mono", monospace;
  font-size: 0.95rem;
}
pre {
  background: #111827;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  text-align: left;
}

/* ===== Peu de pàgina ===== */
footer {
  text-align: center;
  padding: 1rem;
  background: #f9fafb;
  font-size: 0.9rem;
  border-top: 1px solid #e5e7eb;
}

/* ===== Diferenciació per pàgina ===== */
body.index {
  background: linear-gradient(135deg, #f9fafb, #e5e7eb);
}

body.sp1 {
  background: linear-gradient(135deg, #e0f7f4, #ffffff);
}

body.sp2 {
  background: linear-gradient(135deg, #fff3d6, #ffffff);
}

body.sp3 {
  background: linear-gradient(135deg, #ffe6e6, #ffffff);
}

body.sp4 {
  background: linear-gradient(135deg, #e6eaff, #ffffff);
}

body.sp5 {
  background: linear-gradient(135deg, #e6f3ff, #ffffff);
}
