:root {
  /* Paleta Hygea */
  --teal: #00B894;
  --navy: #1B4F72;
  --coral: #FF6B35;
  --ink: #2D3436;
  --white: #FFFFFF;
  --muted: #F6F8FA;

  /* Tipos */
  --font-head: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-quote: 'Merriweather', Georgia, 'Times New Roman', serif;

  /* Radi i ombra base */
  --radius: 16px;
  --shadow: 0 10px 28px rgba(0,0,0,.10);
}

/* Reset bàsic */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
}

/* Contenidor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Tipografia general */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0 0 .5rem;
  line-height: 1.1;
}

h1 { font-weight: 900; }
h2 { font-weight: 800; }
h3 { font-weight: 800; }

p {
  line-height: 1.7;
  margin: 0 0 1rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--teal);
  font-size: .85rem;
}

/* HEADER FIXE */
header.top {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px) saturate(120%);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(0,0,0,.06);
  z-index: 10;
}

header.top .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.25rem;
}

/* Logo Hygea */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.logo-wrap svg {
  display: block;
  width: 34px;
  height: 34px;
}

.word {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--navy);
  letter-spacing: 0.5px;
}

/* Navegació */
nav {
  display: flex;
  gap: .75rem;
  align-items: center;
}

nav a {
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* HERO amb imatge centrada, ample màxim i degradat */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 7vw, 6rem) 1.25rem;

  /* Amplada màxima per evitar deformació en pantalles molt grans */
  max-width: 1600px;
  margin: 0 auto;

  /* Imatge i fons */
  background: url("img/head-desktop.webp") center top / cover no-repeat;
  background-color: var(--white);
}

/* Capa fosca i degradat per llegibilitat */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.15) 80%
  );
}

/* Contingut sobre la capa fosca */
.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  opacity: .95;
  max-width: 820px;
  margin: .5rem auto 1.25rem;
}

.cta {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(.96);
}

.hero-small {
  font-size: .85rem;
  opacity: .9;
  margin-top: .6rem;
}

/* Ajust posició imatge segons mida */
@media (min-width: 1200px) {
  .hero {
    background-position: center 15%;
  }
}

/* SECCIONS GENERALS */
section.block {
  padding: clamp(2rem, 6vw, 3.5rem) 0;
}

.muted {
  background: var(--muted);
  border-top: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* GRID i TARJETES */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 880px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: .2s ease transform, .2s ease box-shadow;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
}

.card h3 {
  margin: .25rem 0 .5rem;
}

/* CITAS / QUOTES */
.quote {
  font-family: var(--font-quote);
  font-style: italic;
  border-left: 4px solid var(--teal);
  padding-left: .75rem;
  margin: .8rem 0;
}

/* FORMULARI JOIN */
form {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

input,
button,
textarea {
  font-family: var(--font-body);
}

.input {
  padding: .9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  outline: none;
}

.input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,184,148,.16);
}

/* Botons generics */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.btn {
  border: none;
  cursor: pointer;
  padding: .85rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(.98);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}

/* Llistes amb ✓ verds */
ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

ul li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: .5rem;
  line-height: 1.6;
}

ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: .1rem;
  font-size: 1rem;
  color: var(--teal);
  font-weight: 900;
}

/* Text petit legal */
.legal {
  font-size: .85rem;
  opacity: .8;
  margin-top: .75rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 0;
  opacity: .7;
  font-size: .85rem;
}

/* RESPONSIVE NAV / HERO */
@media (max-width: 768px) {
  header.top .row {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  header.top nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 16px;
  }

  .hero {
    text-align: left;
    max-width: 100%;
    background-image: url("img/head-mobile.webp");
    background-position: center top;
  }

  .hero .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* --- Imatges de secció --- */
.section-image {
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-image img {
  width: 100%;
  height: auto;
  max-height: 360px; /* controla l'alçada visible */
  display: block;
  object-fit: cover;
}

/* Ajust responsiu */
@media (max-width: 768px) {
  .section-image {
    margin: 1rem 0 1.5rem;
  }

  .section-image img {
    max-height: 280px; /* redueix alçada en pantalles petites */
  }
}

/* --- Layout genèric: text + imatge lateral --- */
.section-column {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.section-column-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-column-image img {
  width: 100%;
  height: auto;
  max-height: 320px; /* 🔹 ajust comú per totes */
  object-fit: cover;
  display: block;
}


/* Responsiu */
@media (max-width: 768px) {
  .section-column {
    grid-template-columns: 1fr;
  }

  .section-column-image {
    margin-bottom: 1.25rem;
  }

  .section-column-image img {
    max-height: 260px;
  }
}

header.top nav {
  background-color: #2b7063;
  border-radius: 999px;
  padding: 8px 24px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

header.top nav a {
  color: #ffffff; /* blanc per defecte */
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.25s ease, transform 0.15s ease;
}

/* Hover amb canvi a taronja */
header.top nav a:hover {
  color: #ff8a3d; /* taronja “Unirme” */
  transform: translateY(-1px);
}

/* --- Botó hamburguesa --- */
.nav-toggle {
  display: none;                  /* es mostra només en mòbil al media query */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background-color: #2b7063;      /* turquesa fosc Hygea */
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  cursor: pointer;
  padding: 8px 10px;
  margin-left: auto;              /* empeny el botó cap a la dreta */
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background-color: #ffffff;      /* ratlles blanques */
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Estat actiu (quan s’obre el menú) */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* --- Versió mòbil --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  header.top nav {
    display: none;
    flex-direction: column;
    background-color: #2b7063;
    border-radius: 12px;
    padding: 12px;
    gap: 16px;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 180px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  }

  header.top nav.active {
    display: flex;
  }
}

header.top .row {
  position: relative;  /* per a que el nav absolut es posicioni sobre el header */
}

/* Compensar el header sticky quan es fa clic als enllaços del menú */
#metodo,
#para-quien,
#sobre-mi,
#join {
  scroll-margin-top: 90px; /* ajusta si cal */
}

@media (max-width: 768px) {
  #metodo,
  #para-quien,
#sobre-mi,
  #join {
    scroll-margin-top: 110px; /* una mica més marge en mòbil */
  }
}




