/* ============================================================
   Pagina Rete (/rete.html)
   Glass semi-trasparente sopra la griglia globale del body.
   Palette coerente con style.css / style-contatti.css.
   ============================================================ */

/* ── Stat card (Chi siamo) ── */
.stat-card {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 1.25rem;
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dark .stat-card { background: rgba(31,41,55,.55); border-color: rgba(75,85,99,.7); }

.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1;
  font-size: 2.75rem;
  color: #2563eb;
}
.dark .stat-num { color: #60a5fa; }
.stat-num.neutral { color: #111827; }
.dark .stat-num.neutral { color: #f9fafb; }

.stat-title { font-size: 1.15rem; font-weight: 700; color: #111827; line-height: 1.2; }
.dark .stat-title { color: #f9fafb; }

.stat-label { margin-top: .5rem; font-size: .85rem; font-weight: 500; color: #6b7280; }
.dark .stat-label { color: #9ca3af; }

/* ── Chip regione (filtro coarse, opzionale) ── */
.chip-region {
  padding: .35rem .85rem;
  font-size: .8rem; font-weight: 500;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  color: #374151;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background-color .15s;
}
.chip-region:hover { border-color: #93c5fd; }
.chip-region.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.dark .chip-region { color: #d1d5db; border-color: #4b5563; background: rgba(31,41,55,.4); }
.dark .chip-region:hover { border-color: #60a5fa; }
.dark .chip-region.active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ── Card ente (directory) ── */
.ente-card {
  display: block;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(229,231,235,.9);
  border-radius: 1.25rem;
  padding: 1.25rem;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s, border-color .25s;
}
.ente-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(37,99,235,.35);
  border-color: rgba(147,197,253,.9);
}
.dark .ente-card { background: rgba(31,41,55,.55); border-color: rgba(75,85,99,.7); }
.dark .ente-card:hover { border-color: rgba(96,165,250,.7); }
.ente-card.is-static { cursor: default; }
.ente-card.is-static:hover { transform: none; box-shadow: none; border-color: rgba(229,231,235,.9); }
.dark .ente-card.is-static:hover { border-color: rgba(75,85,99,.7); }

/* logo / iniziale */
.ente-logo {
  width: 3.5rem; height: 3.5rem;
  border-radius: .875rem;
  object-fit: contain;
  background: rgba(246,248,255,.85);
  border: 1px solid rgba(37,99,235,.08);
  padding: .35rem;
  flex-shrink: 0;
}
.dark .ente-logo { background: rgba(15,23,42,.6); border-color: rgba(99,102,241,.12); }

.ente-initial {
  width: 3.5rem; height: 3.5rem;
  border-radius: .875rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.25rem;
  flex-shrink: 0;
}

/* sede (città) */
.ente-city {
  display: flex; align-items: center; gap: .25rem;
  font-size: .85rem; color: #6b7280; margin-top: .15rem;
}
.dark .ente-city { color: #9ca3af; }

/* tag area di specializzazione */
.tag-area {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 9999px;
  background: rgba(37,99,235,.08); color: #1d4ed8;
  max-width: 60%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dark .tag-area { background: rgba(96,165,250,.15); color: #93c5fd; }

/* link "Visita" */
.ente-link {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .85rem; font-weight: 500; color: #2563eb;
  transition: gap .15s;
}
.ente-card:hover .ente-link { gap: .4rem; }
.dark .ente-link { color: #60a5fa; }

/* ── CTA band (unico blocco pieno, signature con micro-griglia) ── */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band-sub { color: rgba(255,255,255,.85); }

.cta-band-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; color: #1d4ed8; font-weight: 600;
  padding: .75rem 1.5rem; border-radius: 9999px;
  transition: background-color .15s, transform .15s;
}
.cta-band-btn:hover { background: #eff6ff; transform: translateY(-1px); }