:root {
  --color-page: #080a0d;
  --color-surface: #11151b;
  --color-surface-soft: #171d25;
  --color-text: #f5f7fa;
  --color-muted: #a7b0bd;
  --color-red: #ee343a;
  --color-red-hover: #f5575c;
  --color-border: rgba(255, 255, 255, 0.1);
  --font-main: Arial, Helvetica, sans-serif;
  --max-width: 1120px;
  --radius: 18px;
}

/* Reset e base della pagina team */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font-family: var(--font-main);
  background: var(--color-page);
}

img {
  display: block;
  max-width: 100%;
}

main {
  flex: 1;
}

/* Layout pagina team */
.page-content {
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 62vh;
  margin: 0 auto;
  padding: 64px 0;
}

.page-section {
  margin-top: 64px;
}

.page-title h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.4rem, 6.5vw, 5.2rem);
  line-height: 0.98;
}

.page-title h2 {
  max-width: 900px;
  margin: 10px 0 0;
  font-size: clamp(1.55rem, 4vw, 3.15rem);
  line-height: 1.08;
  font-style: italic;
}

.page-description {
  max-width: 840px;
  margin: 24px 0 0;
  color: var(--color-muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.page-description p {
  margin: 0;
}

.page-description p + p {
  margin-top: 12px;
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.card__title {
  margin: 0 0 10px;
  color: var(--color-text);
  font-size: 1.25rem;
}

.card__text {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Griglia specifica della pagina team */
.team-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 24px;
}

/* Card membro */
.team-card {
  min-height: 320px;
  padding: 32px;
}

/* Immagine/avatar */
.team-card__avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
  color: #041006;
  font-size: 1.5rem;
  font-weight: 800;
  background: transparent;
}

.team-card__avatar img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 40%;
}

.team-card .card__title {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.team-card__role {
  margin: -4px 0 16px;
  color: var(--color-red);
  font-size: 1.05rem;
  font-weight: 700;
}

.team-card .card__text {
  font-size: 1.06rem;
  line-height: 1.72;
}

.team-card--empty {
  border-style: dashed;
}

/* Contatti */
.contact-section {
  scroll-margin-top: 120px;
}

.contact-panel {
  max-width: 900px;
  padding: clamp(24px, 4vw, 36px);
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.contact-panel > p {
  margin: 0;
  color: var(--color-muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.contact-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.contact-address__label {
  color: var(--color-red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-address__link {
  color: var(--color-text);
  font-size: 1.08rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 4px;
}

.contact-address__link:hover,
.contact-address__link:focus {
  color: var(--color-red-hover);
}

@media (max-width: 920px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-content {
    padding: 48px 0;
  }

  .page-section {
    margin-top: 52px;
  }

  .card-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    min-height: auto;
    padding: 26px;
  }

  .team-card__avatar,
  .team-card__avatar img {
    width: 78px;
    height: 78px;
  }

  .team-card .card__title {
    font-size: 1.3rem;
  }

  .team-card__role,
  .team-card .card__text {
    font-size: 1rem;
  }

  .contact-panel {
    padding: 22px;
  }

  .contact-address {
    align-items: flex-start;
    flex-direction: column;
  }
}
