/* =====================================================
   GENIA BIG DATA — eventi.css
   Stili specifici per eventi.html (WORKSHOP GBD26-27)
   Riusa sempre i design token globali definiti in style.css
   ===================================================== */

/* ====== HERO EVENTI ====== */
.eve-hero {
  position: relative;
  overflow: hidden;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--sv) + 48px) 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, var(--brand-xs) 0%, transparent 65%),
    var(--bg-3);
}
.eve-hero-orbs { position: absolute; inset: 0; z-index: 0; }
.eve-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}
.eve-h1 {
  font-family: var(--font-h);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.14;
  color: var(--text);
  margin-bottom: 22px;
}
.eve-h1 .hl {
  background: linear-gradient(110deg,
    var(--brand-d) 0%,
    var(--brand) 22%,
    var(--brand-l) 42%,
    #9333EA 60%,
    var(--brand) 80%,
    var(--brand-d) 100%);
  background-size: 280% 280%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: hlMeshFlow 9s ease-in-out infinite;
}
[data-theme="dark"] .eve-h1 .hl {
  background: linear-gradient(110deg,
    var(--brand-l) 0%,
    var(--brand) 22%,
    #60CCEF 42%,
    #C084FC 60%,
    var(--brand-l) 80%,
    var(--brand) 100%);
  background-size: 280% 280%;
  -webkit-background-clip: text; background-clip: text;
  animation: hlMeshFlow 9s ease-in-out infinite;
}
.eve-hero-tagline {
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-d);
  margin: 0 auto 36px;
}
[data-theme="dark"] .eve-hero-tagline { color: var(--brand-l); }
.eve-hero-tagline span { color: var(--text-3); margin: 0 12px; font-weight: 400; text-transform: none; }
.eve-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.eve-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: var(--font-h);
  font-size: .85rem;
  color: var(--text-2);
}
.eve-hero-stat i { color: var(--brand); }
.eve-hero-stat strong { color: var(--text); }

/* ====== STATO ATTIVO NAV (voce "Eventi") ====== */
.nav-links a.nav-active,
.mobile-menu .mob-link.nav-active { color: var(--brand) !important; }

/* ====================================================
   SEZIONE INTRO — "La serie" (pilastri + testo)
   ==================================================== */
.eve-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.eve-intro-col-title {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}
.eve-intro-pillar-list {
  list-style: none;
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--r);
  box-shadow: var(--sh-card);
}
.eve-intro-pillar-list li {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-h); font-weight: 600; font-size: .95rem; color: var(--text);
  padding: 6px 8px;
  border-radius: 10px;
  transition: background var(--t), transform var(--t);
}
.eve-intro-pillar-list li:hover { background: var(--bg-3); transform: translateX(4px); }
.eve-intro-pillar-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}
.eve-intro-pillar-list li:nth-child(1) .eve-intro-pillar-icon { background: var(--brand-xl); color: var(--brand-d); }
.eve-intro-pillar-list li:nth-child(2) .eve-intro-pillar-icon { background: rgba(99,102,241,.14); color: #4338CA; }
.eve-intro-pillar-list li:nth-child(3) .eve-intro-pillar-icon { background: rgba(147,51,234,.14); color: #7E22CE; }
[data-theme="dark"] .eve-intro-pillar-list li:nth-child(2) .eve-intro-pillar-icon { color: #818CF8; }
[data-theme="dark"] .eve-intro-pillar-list li:nth-child(3) .eve-intro-pillar-icon { color: #C084FC; }
.eve-intro-pillar-list li:nth-child(1):hover .eve-intro-pillar-icon { background: var(--brand); color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px var(--brand-xl); }
.eve-intro-pillar-list li:nth-child(2):hover .eve-intro-pillar-icon { background: #4338CA; color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px rgba(99,102,241,.14); }
.eve-intro-pillar-list li:nth-child(3):hover .eve-intro-pillar-icon { background: #7E22CE; color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px rgba(147,51,234,.14); }
.eve-intro-text-col { position: relative; overflow: hidden; }
.eve-intro-text-col .swm {
  font-size: clamp(1.8rem, 3.2vw, 3.4rem) !important;
  right: -0.02em;
  bottom: -0.08em;
}
.eve-intro-p { font-size: .98rem; line-height: 1.8; color: var(--text-2); margin: 0 0 16px; }
.eve-intro-p:last-child { margin-bottom: 0; }

/* ====================================================
   GRIGLIA EVENTI — uniforme, 3 colonne
   ==================================================== */
.eve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ====== SEZIONE EVENTI PASSATI — sfondo alternato, stesso pattern di #chi-siamo/#competenze ====== */
#eventi-passati { background: var(--bg-3); }

/* ====== CARD EVENTO ====== */
.eve-card {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.eve-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-a);
  box-shadow: var(--sh-hover);
}
.eve-grid .eve-card:nth-child(3n+1) { transition-delay: .05s; }
.eve-grid .eve-card:nth-child(3n+2) { transition-delay: .12s; }
.eve-grid .eve-card:nth-child(3n+3) { transition-delay: .19s; }

/* accent bar in cima — stesso pattern di .sol-card-bar/.bar-* (whitepaper.html), 4 tinte nuove scoped qui */
.eve-card-bar { height: 4px; width: 100%; flex-shrink: 0; }
.bar-teal     { background: linear-gradient(90deg, #0D9488, #2DD4BF); }
.bar-rose     { background: linear-gradient(90deg, #E11D48, #FB7185); }
.bar-graphite { background: linear-gradient(90deg, #4B5563, #9CA3AF); }
.bar-amber    { background: linear-gradient(90deg, #EAA32C, #F5B946); }

.eve-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.eve-cover i { font-size: 2.6rem; color: rgba(255,255,255,.92); }
.eve-cover-blue      { background: linear-gradient(135deg, var(--brand-d), var(--brand) 55%, #60CCEF); }
.eve-cover-indigo    { background: linear-gradient(135deg, #4338CA, #6366F1 55%, #818CF8); }
.eve-cover-purple    { background: linear-gradient(135deg, #7E22CE, #9333EA 55%, #C084FC); }
.eve-cover-green     { background: linear-gradient(135deg, #15803D, #16A34A 55%, #4ADE80); }
.eve-cover-teal      { background: linear-gradient(135deg, #0F766E, #0D9488 55%, #2DD4BF); }
.eve-cover-rose      { background: linear-gradient(135deg, #BE123C, #E11D48 55%, #FB7185); }
.eve-cover-graphite  { background: linear-gradient(135deg, #1F2937, #4B5563 55%, #9CA3AF); }
.eve-cover-amber     { background: linear-gradient(135deg, #8A5C0B, #EAA32C 55%, #F5B946); }
.eve-cover-blue-alt  { background: linear-gradient(150deg, var(--brand-d), var(--brand) 55%, #60CCEF); }
.eve-cover-green-alt { background: linear-gradient(150deg, #15803D, #16A34A 55%, #4ADE80); }

/* Sistema per foto reali (pronto, non ancora usato): quando una card avrà una copertina
   vera, aggiungere due <img class="eve-cover-bg"> / <img class="eve-cover-img"> dentro
   .eve-cover — l'immagine "galleggia" centrata (object-fit:contain) su una versione
   sfocata di se stessa come sfondo, qualunque sia il suo aspect ratio. Il gradiente/icona
   resta il fallback automatico finché non c'è un <img>. */
.eve-cover-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(30px) saturate(1.5) brightness(.65);
  z-index: 0;
}
.eve-cover-img {
  position: relative;
  z-index: 1;
  max-width: 86%;
  max-height: 86%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
}

/* badge generico a pillola — colore reale applicato via classi .badge-* (style.css),
   assegnate dinamicamente in JS in base a data-status */
.eve-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  width: fit-content;
}

.eve-card-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.eve-card-title {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 0;
  line-height: 1.35;
  text-align: center;
  letter-spacing: .01em;
}
.eve-card-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  margin: 11px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-l));
}
.eve-card-tagline { margin-bottom: 0 !important; margin-top: 11px !important; text-align: center; }
.eve-card-teaser {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
  text-align: justify;
  text-align-last: center;
}
.eve-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: .78rem;
  color: var(--text-3);
  margin-top: auto;
  padding-top: 4px;
}
.eve-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.eve-card-meta i { color: var(--brand); font-size: .78rem; }
.eve-meta-tbd { font-style: italic; color: var(--text-3); }
.eve-meta-tbd i { color: var(--text-3); }

.eve-card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.eve-card-footer .btn { width: 100%; justify-content: center; }

/* ====================================================
   RESPONSIVE — hero, intro, griglia
   ==================================================== */
@media (max-width: 1024px) {
  .eve-grid { grid-template-columns: repeat(2, 1fr); }
  .eve-intro-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .eve-hero { min-height: 50vh; }
  .eve-h1 { font-size: 2.1rem; }
}
@media (max-width: 640px) {
  .eve-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .eve-card-body { padding: 20px; }
}

/* ====================================================
   OVERLAY DETTAGLIO EVENTO + ISCRIZIONE
   ==================================================== */
.eve-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,15,25,.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease;
}
.eve-overlay.eve-overlay-visible { opacity: 1; visibility: visible; }

.eve-ov-panel {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  max-width: 1180px;
  width: 100%;
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.45);
  transform: scale(.94) translateY(26px);
  opacity: 0;
  transition: transform .48s cubic-bezier(.22,1,.36,1), opacity .4s ease;
}
.eve-ov-bar { height: 6px; width: 100%; flex-shrink: 0; }
.eve-overlay.eve-overlay-visible .eve-ov-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.eve-ov-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-s);
  background: var(--bg-3);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: transform var(--t), background var(--t), color var(--t);
}
.eve-ov-close:hover { transform: scale(1.08); background: var(--brand); color: #fff; border-color: var(--brand); }

/* ====== BODY: copertina + colonna info, affiancate su desktop ====== */
.eve-ov-body {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.eve-ov-visual { flex: 0 0 42%; }

.eve-ov-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.eve-ov-cover {
  position: relative;
  height: 100%;
  min-height: 380px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.eve-ov-cover i { font-size: 3.4rem; color: rgba(255,255,255,.92); }
.eve-ov-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: 200% 0;
  pointer-events: none;
}
.eve-overlay.eve-overlay-visible .eve-ov-cover::after {
  animation: eveShimmer 1.1s ease-out .3s;
}
@keyframes eveShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -60% 0; }
}

.eve-ov-header-text {
  padding: 34px 36px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eve-ov-header-text h3 {
  font-family: var(--font-h);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 0;
  line-height: 1.25;
}
.eve-ov-desc { font-size: .92rem; color: var(--text-2); line-height: 1.65; margin: 0; padding: 20px 36px 8px; }
.eve-ov-desc p { margin: 0 0 10px; text-align: justify; text-align-last: left; }
.eve-ov-desc p:last-child { margin-bottom: 0; }
.eve-ov-desc p.eve-ov-callout {
  text-align: center;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--brand-d);
  background: var(--brand-xl);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 4px 0 16px;
}
[data-theme="dark"] .eve-ov-desc p.eve-ov-callout { color: var(--brand-l); }

.eve-ov-desc ul.eve-ov-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.eve-ov-desc ul.eve-ov-list li {
  position: relative;
  padding-left: 22px;
  text-align: left;
}
.eve-ov-desc ul.eve-ov-list li::before {
  content: '';
  position: absolute;
  left: 4px; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
}
.eve-ov-desc ul.eve-ov-list-check li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  color: var(--brand);
  font-size: .72rem;
  top: .3em; left: 0;
}

/* ====== RIGA DETTAGLI A COLONNE + FORM — zona "azione" tinteggiata, distinta dalla lettura ====== */
.eve-ov-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  background: var(--bg-3);
  padding: 20px 36px;
  margin-top: 8px;
}
.eve-ov-fact { display: flex; align-items: center; gap: 12px; }
.eve-ov-fact-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-xl);
  color: var(--brand-d);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .95rem;
}
.eve-ov-fact-text { display: flex; flex-direction: column; gap: 2px; }
.eve-ov-fact-label { font-family: var(--font-h); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.eve-ov-fact-val { font-family: var(--font-h); font-size: .88rem; font-weight: 700; color: var(--text); line-height: 1.3; }

/* ====== FORM ISCRIZIONE ====== */
.eve-ov-formwrap { padding: 4px 36px 26px; background: var(--bg-3); }
.eve-ov-divider { height: 14px; }
.eve-ov-form-title { font-family: var(--font-h); font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0 0 16px; }
#eve-ov-form .form-row { margin-bottom: 0; }

/* ====== Avviso di stato (evento "prossimo" o "chiuso") — riga compatta, sostituisce il form ====== */
.eve-ov-status-notice {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: 10px;
  font-size: .88rem;
  color: var(--text-2);
}
.eve-ov-status-notice i { font-size: 1.1rem; color: var(--text-3); flex-shrink: 0; }
.eve-ov-status-notice.is-prossimo i { color: #D97706; }
[data-theme="dark"] .eve-ov-status-notice.is-prossimo i { color: #FBBF24; }

/* ====== Animazione d'ingresso a cascata per sezione ====== */
.eve-ov-visual, .eve-ov-header-text, .eve-ov-desc, .eve-ov-facts, .eve-ov-formwrap {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.eve-overlay.eve-overlay-visible .eve-ov-visual      { opacity: 1; transform: translateY(0); transition-delay: .05s; }
.eve-overlay.eve-overlay-visible .eve-ov-header-text { opacity: 1; transform: translateY(0); transition-delay: .10s; }
.eve-overlay.eve-overlay-visible .eve-ov-desc        { opacity: 1; transform: translateY(0); transition-delay: .15s; }
.eve-overlay.eve-overlay-visible .eve-ov-facts       { opacity: 1; transform: translateY(0); transition-delay: .20s; }
.eve-overlay.eve-overlay-visible .eve-ov-formwrap    { opacity: 1; transform: translateY(0); transition-delay: .25s; }

/* ====================================================
   RESPONSIVE OVERLAY
   ==================================================== */
@media (max-width: 760px) {
  .eve-ov-body { flex-direction: column; gap: 18px; overflow-y: auto; }
  .eve-ov-scroll { flex: none; overflow-y: visible; }
  .eve-ov-visual { flex: none; width: 100%; padding: 24px 24px 0; }
  .eve-ov-cover { aspect-ratio: 4 / 5; height: auto; min-height: 0; max-height: 60vh; border-radius: 14px; }
  .eve-ov-header-text { padding: 0 24px; }
  .eve-ov-desc { padding: 16px 24px 8px; }
  .eve-ov-facts { grid-template-columns: repeat(2, 1fr); }
  .eve-ov-formwrap { padding: 20px 24px 28px; }
}
@media (max-width: 640px) {
  .eve-overlay { padding: 0; }
  .eve-ov-panel {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  #eve-ov-form .form-row { grid-template-columns: 1fr; }
}
