/* ════════════════════════════════════════════════
   css/our-team.css — algo-freedom society
   Stili specifici di our_team.php — La nostra squadra
   ════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────── */
.team-hero {
  position: relative;
  min-height: 300px;
  background:
    linear-gradient(105deg, rgba(8,22,44,.92) 0%, rgba(10,26,50,.60) 50%, rgba(14,32,58,.18) 100%),
    linear-gradient(135deg, #051426 0%, #0a2845 35%, #1a3a5c 65%, #2d5a7b 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.team-hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; opacity: .45;
}
.team-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 360px at 10% 20%, rgba(255,255,255,.07), transparent 58%),
    radial-gradient(600px 300px at 75% 30%, rgba(105,168,232,.11), transparent 60%);
  pointer-events: none; mix-blend-mode: screen;
}
.team-hero-inner {
  position: relative; z-index: 2;
  padding: 64px 0 60px; color: #fff;
}
.team-hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(105,168,232,.18);
  border: 1px solid rgba(105,168,232,.32);
  border-radius: 999px; padding: 6px 16px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: rgba(105,168,232,.95);
  margin-bottom: 16px;
}
.team-hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: tdot 2s ease infinite;
}
@keyframes tdot { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.5;transform:scale(1.3);} }
.team-hero-title {
  margin: 0 0 14px; font-size: 52px; line-height: 1.06;
  letter-spacing: -.5px; font-weight: 800;
  text-shadow: 0 12px 34px rgba(0,0,0,.28);
}
.team-hero-title .thin { font-weight: 100; opacity: .9; }
.team-hero-sub {
  margin: 0; font-size: 16px; color: rgba(255,255,255,.78);
  line-height: 1.65; max-width: 580px;
}

/* ─── Intro band (ispirata visivamente a .values-band di about.php) ── */
.team-intro-band {
  background: linear-gradient(90deg, var(--nav-1), var(--nav-3));
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0 8px;
  color: #fff;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
  border: 1px solid rgba(255,255,255,.10);
}
.team-intro-icon {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  display: grid; place-items: center;
}
.team-intro-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2; }
.team-intro-text { flex: 1; min-width: 200px; }
.team-intro-text h2 { margin: 0 0 8px; font-size: 20px; font-weight: 900; color: #fff; }
.team-intro-text p { margin: 0; font-size: 14px; color: rgba(255,255,255,.80); line-height: 1.65; }
.team-intro-pills {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
}
.team-intro-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.92);
}
.team-intro-pill svg { width: 13px; height: 13px; fill: none; stroke: var(--accent); stroke-width: 2.2; }

/* ─── Role group sections ──────────────────────────────── */
.role-group { padding: 36px 0 10px; }
.role-group-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 2px solid rgba(15,23,42,.08);
}
.role-group-ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--nav-1), var(--nav-3));
  flex: 0 0 auto;
}
.role-group-ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.9; }
.role-group-label {
  flex: 1;
}
.role-group-label h2 { margin: 0 0 2px; font-size: 18px; font-weight: 900; color: #1b2a44; }
.role-group-label p { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.role-group-count {
  background: rgba(63,121,183,.10); border: 1px solid rgba(63,121,183,.20);
  border-radius: 999px; padding: 4px 14px;
  font-size: 12px; font-weight: 700; color: var(--accent-2);
}

/* ─── Member cards ─────────────────────────────────────── */
.team-members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 10px;
}
.team-members-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.team-members-grid.cols-1 { grid-template-columns: 1fr; }

/* Wrapper di più sottogrid (righe bilanciate: mai 1 solo membro per riga). */
.team-members-rows { display: flex; flex-direction: column; gap: 20px; margin-bottom: 10px; }
.team-members-rows > .team-members-grid { margin-bottom: 0; }

.team-member-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 20px;
  transition: transform .14s ease, box-shadow .14s ease;
  position: relative;
  overflow: hidden;
}
.team-member-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-2), transparent);
}
.team-member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Lead card variant (coordinamento) */
.team-member-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  background: linear-gradient(135deg, rgba(31,53,80,.04), rgba(47,95,134,.06));
  border-color: rgba(63,121,183,.18);
}
.team-member-card.lead::before {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  height: 4px;
}

/* Featured card variant (membro "in evidenza" — da solo nella prima riga) */
.team-members-grid.featured-row { margin-bottom: 4px; }
.team-member-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  background: linear-gradient(135deg, rgba(245,158,11,.06), rgba(234,179,8,.08));
  border-color: rgba(217,119,6,.25);
  box-shadow: 0 6px 22px rgba(217,119,6,.10);
}
.team-member-card.featured::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  height: 4px;
}
.team-member-card.featured .member-avatar { width: 78px; height: 78px; }
.team-member-card.featured .member-avatar svg { width: 38px; height: 38px; }
.team-member-card.featured .member-name { font-size: 18px; }

.member-avatar {
  flex: 0 0 auto;
  width: 60px; height: 60px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(105,168,232,.28), transparent 55%),
    linear-gradient(135deg, #c8ddf0, #daeaf8);
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 6px 18px rgba(15,23,42,.12);
  overflow: hidden;
}
.team-member-card.lead .member-avatar {
  width: 72px; height: 72px;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar svg { width: 30px; height: 30px; fill: none; stroke: var(--nav-2); stroke-width: 1.7; }
.team-member-card.lead .member-avatar svg { width: 36px; height: 36px; }

.member-body { flex: 1; min-width: 0; }
.member-name {
  margin: 0 0 2px; font-size: 15px; font-weight: 900; color: #1b2a44;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.team-member-card.lead .member-name { font-size: 17px; }
.member-badge {
  display: inline-block;
  background: rgba(63,121,183,.12); border: 1px solid rgba(63,121,183,.22);
  border-radius: 999px; padding: 2px 9px;
  font-size: 10.5px; font-weight: 700; color: var(--accent-2);
  letter-spacing: .3px; text-transform: uppercase;
  white-space: nowrap;
}
.member-title-academic {
  margin: 0 0 4px; font-size: 12px; color: #334155;
  font-weight: 600; font-style: italic;
}
.member-role {
  margin: 0 0 8px; font-size: 12.5px; color: var(--accent-2);
  font-weight: 700; letter-spacing: .15px;
}
.member-dept {
  margin: 0 0 10px; font-size: 12px; color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.member-dept svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; flex: 0 0 auto; }
.member-bio {
  margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.58;
}
.member-links { display: flex; gap: 8px; flex-wrap: wrap; }
.member-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: rgba(63,121,183,.08); border: 1px solid rgba(63,121,183,.18);
  border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--accent-2);
  transition: background .12s ease;
}
.member-link:hover { background: rgba(63,121,183,.16); color: var(--nav-1); }
.member-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ─── Open slot ────────────────────────────────────────── */
.team-open-slot {
  border-style: dashed !important;
  opacity: .60;
}
.team-open-slot .member-avatar {
  background: linear-gradient(135deg, #e2ebf4, #ced9e8);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1060px) {
  .team-members-grid { grid-template-columns: repeat(2, 1fr); }
  .team-hero-title { font-size: 42px; }
}
@media (max-width: 920px) {
  .team-hero-inner { padding: 52px 0 48px; }
  .team-intro-band { flex-direction: column; gap: 18px; }
}
@media (max-width: 640px) {
  .team-members-grid { grid-template-columns: 1fr; }
  .team-members-grid.cols-2 { grid-template-columns: 1fr; }
  .team-member-card.lead { flex-direction: column; }
  .team-hero-title { font-size: 34px; }
}
