/* Estil compartit: capçalera, menú d'hamburguesa i heroi de la pàgina d'inici.
   Cada pàgina hi afegeix el seu propi <style> per als elements específics. */

:root {
  --verd: #2e7d32;
  --verd-clar: #8fbf6e;
  --verd-fosc: #12271b;
  --capcalera-alt: 56px;
  --text-clar: #f4f7f1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: #1c1f1c;
  background: #fafaf7;
  padding-top: var(--capcalera-alt);
}

.contenidor {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
}
@media (min-width: 720px) {
  .contenidor { max-width: 640px; }
}

h1 { font-size: 1.3rem; margin: 0 0 0.6rem; color: var(--verd); }
h2 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
a { color: var(--verd); }

.boto-principal, .boto-secundari {
  display: inline-block; padding: 0.75rem 1.4rem; text-align: center;
  font-weight: 600; font-size: 1rem; border-radius: 6px; text-decoration: none;
  cursor: pointer;
}
.boto-principal { background: var(--verd); color: white; border: none; }
.boto-secundari {
  background: rgba(255, 255, 255, 0.12); color: white;
  border: 1px solid rgba(255, 255, 255, 0.65); backdrop-filter: blur(2px);
}

/* --- Capçalera fixa --- */
.capcalera {
  position: fixed; top: 0; left: 0; right: 0; height: var(--capcalera-alt);
  display: flex; align-items: center; gap: 0.6rem; padding: 0 0.5rem;
  background: rgba(18, 39, 27, 0.95); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
}

.boto-menu {
  background: none; border: none; padding: 0.5rem; display: flex; flex-direction: column;
  justify-content: center; gap: 4px; width: 40px; height: 40px; cursor: pointer;
}
.boto-menu span { display: block; height: 2px; background: var(--text-clar); border-radius: 2px; }

.titol-app {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--text-clar); font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.01em; text-decoration: none;
}
.titol-app svg { flex-shrink: 0; }

/* --- Menú lateral --- */
.fons-menu {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease; z-index: 1045;
}
.fons-menu.obert { opacity: 1; pointer-events: auto; }

.menu-lateral {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(80vw, 300px);
  background: var(--verd-fosc); color: var(--text-clar); transform: translateX(-100%);
  transition: transform 0.25s ease; z-index: 1050; display: flex; flex-direction: column;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.3);
}
.menu-lateral.obert { transform: translateX(0); }

.menu-capcalera {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.boto-tanca {
  background: none; border: none; color: var(--text-clar); font-size: 1.5rem;
  line-height: 1; padding: 0.2rem 0.5rem; cursor: pointer;
}

.menu-lateral ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.menu-lateral a, .menu-lateral .desactivat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem; color: var(--text-clar); font-size: 1rem; text-decoration: none;
}
.menu-lateral a.actiu { background: rgba(255, 255, 255, 0.08); border-left: 3px solid var(--verd-clar); padding-left: calc(1.1rem - 3px); }
.menu-lateral .desactivat { color: rgba(244, 247, 241, 0.45); }
.etiqueta-aviat {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid rgba(244, 247, 241, 0.35); border-radius: 999px; padding: 0.15rem 0.45rem;
}

/* --- Heroi (pàgina d'inici) --- */
.heroi {
  min-height: calc(100vh - var(--capcalera-alt)); min-height: calc(100svh - var(--capcalera-alt));
  display: flex; align-items: flex-end;
  background-image:
    linear-gradient(to bottom, rgba(10, 28, 18, 0.1) 0%, rgba(8, 20, 14, 0.35) 55%, rgba(6, 14, 10, 0.85) 100%),
    url('/images/hero.jpg');
  background-size: cover; background-position: center;
  color: var(--text-clar);
}
.heroi-contingut { padding: 2rem 1.25rem 3rem; max-width: 480px; margin: 0 auto; width: 100%; }
.eslogan { font-size: 1.15rem; line-height: 1.45; margin: 0 0 1.4rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
.heroi-accions { display: flex; flex-direction: column; gap: 0.6rem; }
@media (min-width: 480px) {
  .heroi-accions { flex-direction: row; }
}
@media (min-width: 720px) {
  .heroi-contingut { max-width: 640px; padding-bottom: 4.5rem; }
  .eslogan { font-size: 1.4rem; max-width: 30em; }
}
