.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  /* Alinea el contingut verticalment al centre del grid */
  min-height: 40vh;
  /* Dona alçada a la secció per veure la fons completa */
  color: var(--white);
  overflow-x: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__slide {
  width: 100%;
  height: 100%;
  background: center/cover no-repeat;
}

.hero__content {
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  align-items: center;
  /* Canvia flex-start per center */
  padding: 2rem 1rem;
}

.hero__text {
  min-width: 50vw;
}

.hero__title {
  font-size: clamp(2.2rem, 8vw, 5.2rem);
  font-weight: 700;
  text-transform: uppercase;
}

.hero__lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--white);
  font-weight: 800;
}

.hero__panel {
  max-width: 240px;
  text-transform: uppercase;
  /* Ajusta aquest percentatge si vols ensenyar més o menys espai de les icones */
  transform: translateX(calc(100% - 8rem));
  transition: transform 0.3s ease;
}

.hero__pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.hero__pill-list li a {
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--transparent) url("/img/brush-stroke-green.webp") left/cover
    no-repeat;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
  font-size: clamp(0.7rem, 1.5vw, 1rem);
}

.hero__pill-list li a:hover {
  background: var(--transparent) url("/img/brush-stroke-green.webp") left/cover
    no-repeat;
}

.hero__pill-list li a:hover,
.hero__pill-list li a:focus,
.hero__pill-list li a:active {
  /* Desplacem la pestanya cap a l'esquerra per mostrar tot el text */
  transform: translateX(-140px);
}

.pill__icon {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-link);
  font-size: 1.3rem;
}

@media (min-width: 768px) {
  .hero__content {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3rem;
    padding-top: 3rem;
    justify-content: space-around;
  }

  .hero__actions {
    grid-auto-flow: column;
    justify-content: start;
  }

  .hero__panel {
    transform: none;
    /* Restaurem la posició normal en escriptori */
  }

  .hero__pill-list li a:hover {
    transform: translateX(-10px);
    /* El teu efecte hover original en desktop */
  }
}
