#header-seccions {
  display: flex;
  gap: 20px;                
  justify-content: center;  
  flex-wrap: wrap;          /* fa que baixi en una nova línia si no hi caben */
  padding: 10px;
}

#header-seccions .img-box {
  position: relative;
  display: inline-block;
  margin: 10px;
  width: 40%;              /* mida per defecte en desktop */
  border-radius: 8px;
  overflow: hidden;         
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;            /* evita que s’aplati massa */
  text-decoration: none;         /* treu subratllat dels enllaços */
  color: inherit;                /* manté el color del text */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#header-seccions .img-box img {
  width: 100%;
  height: auto;
  display: block;
}

#header-seccions .img-box p {
  position: absolute;
  bottom: 0;
  left: 0;
  margin: 0;
  width: 100%;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 50px;          /* una mica més petit per adaptar-se */
  font-family: 'Teko', sans-serif;
  text-align: center;
  font-weight: 500;
}

#header-seccions .img-box:hover {
  transform: translateY(-8px);      /* fa que pugi una mica */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

#header-seccions .img-box:hover p {
  color: #FFD700;
}


/* 📱 Responsive per a mòbils */
@media (max-width: 768px) {
  #header-seccions {
    flex-direction: column;   /* apila les imatges en vertical */
    align-items: center;
  }

  #header-seccions .img-box {
    width: 90%;              /* ocupen gairebé tot l’ample */
    margin: 10px 0;
  }

  #header-seccions .img-box p {
    font-size: 30px;         /* redueix la mida del text */
    padding: 4px 6px;
  }
}
