/* Il box intero è un link, con transizioni per altezza, background e posizionamento dell'immagine */
.service-box {
  display: block;
  position: relative;
  background: #f2f2f2;
  border: 2px solid #242424;
  overflow: hidden;
  text-decoration: none;
  color: black;
  transition: max-height 0.5s ease-in-out, background-color 0.5s ease-in-out;
  max-height: 150px; /* Altezza iniziale: solo header (immagine e titolo) */
}

/* Cambio background al passaggio del mouse */
.service-box:hover {
  max-height: 500px;
  background-color: #21252a;
}

/* Header con immagine e titolo, impostato con altezza fissa */
.service-header {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Immagine: in stato normale piccola e posizionata in alto a destra */
.service-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: 50px;
  height: auto;
  transition: transform 0.5s ease-in-out, top 0.5s ease-in-out;
  transform: none;
}

/* Al passaggio del mouse, l'immagine si sposta al centro e si ingrandisce */
.service-box:hover .service-icon {
  top: 95%;
  left: 50%;
  right: auto;
  transform: translate(-50%, 0) scale(2);
}

/* Titolo centrato nell'header */
.service-title {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
}

/* Contenuto nascosto inizialmente: testo e pulsante, animato dal basso */
.service-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out,
    padding-top 0.5s ease-in-out;
  padding: 20px;
}

/* Al passaggio del mouse, il contenuto compare gradualmente */
.service-box:hover .service-content {
  opacity: 1;
  transform: translateY(0);
  padding-top: 100px;
  color: white;
}

/* CTA: testo cliccabile senza aspetto da bottone, con ">>" all'inizio */
.service-cta {
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.service-cta::before {
  content: ">> ";
}
