/* --- Referenti / Volontari pages --- */

.msp-referenti {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(4rem, 6vw, 6rem);
  background-color: var(--color-bg);
}

.msp-referenti__header {
  margin-bottom: clamp(2rem, 3vw, 2.75rem);
}

.msp-referenti__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

.msp-referenti__intro {
  margin: 0;
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  line-height: 1.55;
  color: rgba(20, 58, 90, 0.65);
  max-width: 52rem;
}

/* Groups (used on referenti page to separate board from staff) */

.msp-referenti__group {
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.msp-referenti__group:last-child {
  margin-bottom: 0;
}

.msp-referenti__group-title {
  margin: 0 0 clamp(1.25rem, 2vw, 1.75rem);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: rgba(20, 58, 90, 0.45);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(94, 152, 202, 0.18);
}

/* Grid */

.msp-referenti__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: clamp(1rem, 1.4vw, 1.25rem);
  align-items: start;
}

/* Person card */

.msp-referente-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(20, 58, 90, 0.07);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.msp-referente-card:hover {
  box-shadow: 0 16px 44px rgba(20, 58, 90, 0.12);
  transform: translateY(-2px);
}

.msp-referente-card__photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #dfeaf3;
}

.msp-referente-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
}

.msp-referente-card__photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dfeaf3 0%, #c8dcea 100%);
}

.msp-referente-card__body {
  padding: clamp(0.85rem, 1vw, 1rem) clamp(0.85rem, 1vw, 1rem) clamp(1rem, 1.1vw, 1.125rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.msp-referente-card__name {
  margin: 0;
  font-size: clamp(0.875rem, 0.85rem + 0.15vw, 1rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.msp-referente-card__role {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
}

.msp-referente-card__paese {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: rgba(20, 58, 90, 0.5);
}

/* Empty state */

.msp-referenti__empty {
  padding: 2rem 0;
  color: rgba(20, 58, 90, 0.5);
}

/* Responsive */

@media (max-width: 63.9375rem) {
  .msp-referenti__grid {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  }
}

@media (max-width: 40rem) {
  .msp-referenti {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .msp-referenti__grid {
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.75rem;
  }

  .msp-referente-card:hover {
    transform: none;
  }
}
