/* ===========================
   Sezione: Come funziona
=========================== */

.come-funziona {
  padding: 4rem 0; /* Nessun padding orizzontale */
}

.funziona-head {
  text-align: center;
  margin-bottom: 2rem;
}

.come-funziona-title {
  color: #04211A; 
  margin-bottom: 0.5rem;
}

.funziona-content-wrap {
  display: flex;
  justify-content: center;
}

.funziona-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%; /* Rimosso max-width e width limitanti */
}

/* Ogni card */
.funziona-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid transparent;
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.funziona-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Alternanza sfondi */
.funziona-item:nth-child(1) {
  background-color: #fff;
  border-color: #04211A;
  color: #04211A;
}

.funziona-item:nth-child(2) {
  background-color: #04211A;
}

.funziona-item:nth-child(3) {
  background-color: #c2380c;
}

.funziona-item:nth-child(4) {
  background-color: #084537;
}

/* Icona */
.funziona-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  background-color: transparent;
}

/* Colore SVG */
.funziona-item:nth-child(1) .funziona-icon svg {
  color: #04211A;
}

.funziona-item:nth-child(n+2) .funziona-icon svg {
  color: #ffffff;
}

.funziona-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Titolo step */
.funziona-step-title {
  margin-bottom: 0.5rem;
}

/* Testo */
.funziona-content p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.2rem;
}

/* Responsive: 2 colonne da tablet */
@media (min-width: 768px) {
  .funziona-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .funziona-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
  }

  .funziona-icon {
    width: 72px;
    height: 72px;
    min-width: 72px;
    margin-bottom: 0;
  }

  .funziona-icon svg {
    width: 32px;
    height: 32px;
  }

  .funziona-step-title {
    margin-top: 0.25rem;
  }
}
