.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}

/* CARD */
.vcard {
  position: relative;
  width: 380px;
  height: 480px;
  background: #333;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  box-shadow:
    rgba(0,0,0,0.6) 0 20px 40px,
    inset #333 0 0 0 5px,
    inset rgba(255,255,255,0.4) 0 0 0 6px;
}

.vcard-bg {
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.vcard-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  padding-top: 50px;
  padding-bottom: 40px;
  min-height: 180px;
  color: #000000;
  transform: translateY(50%);
  transition: transform 0.4s ease;
  background: linear-gradient(to bottom, transparent 0%, #F0E5D5 100%);
}

.vcard-info p {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.vcard:hover .vcard-info {
  transform: translateY(0);
}

.vcard:hover .vcard-info p {
  opacity: 1;
}

.vcard:hover .vcard-bg {
  opacity: 0.8;
}
#vcard-container {
  display: flex;
  flex-wrap: nowrap;       /* ⛔ vieta che vadano su una nuova linea */
  gap: 20px;
  overflow-x: auto;        /* ✔ permette lo scroll orizzontale se serve */
  padding: 20px 0;
}

.vcard {
  flex: 0 0 calc(25% - 20px);   /* ✔ 4 card esatte in una riga */
  min-width: 250px;             /* ✔ evita che si schiaccino troppo */
}


/* MOBILE */
@media (max-width: 768px) {
  .vcard {
    width: 90%;
    height: 560px;
  }
}