/* ==========================================================================
   IMPACTA HUB - SEZIONE CONFRONTO ECOSISTEMA (SLIDE CONGIUNTO & DARK LUXURY)
   Standard: Apple Silk Motion Engine / Digitam SAGL
   Zero AI Slop - 100% Fedele al Design Dark Luxury
   ========================================================================== */

#confronto {
  overflow-x: clip;
}

#confronto .comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 48px;
  position: relative;
}

#confronto .comparison-grid article {
  position: relative;
  border-radius: 20px;
  padding: clamp(28px, 3.5vw, 40px);
  box-sizing: border-box;
  will-change: transform, opacity;
}

/* Card Sinistra (Senza un Ecosistema) */
#confronto .comparison-grid .before {
  background: #111111 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6) !important;
  transform: translate3d(-70px, 0, 0) !important;
  opacity: 0 !important;
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Card Destra (Con l'Ecosistema Impacta Hub) */
#confronto .comparison-grid .after {
  background: #121316 !important;
  border: 1.5px solid rgba(255, 85, 0, 0.18) !important;
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.75), 0 0 18px -4px rgba(255, 85, 0, 0.08) !important;
  transform: translate3d(70px, 0, 0) !important;
  opacity: 0 !important;
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Comparsa congiunta al 100% della grandezza definitiva */
#confronto .comparison-grid .before.is-revealed,
#confronto .comparison-grid .after.is-revealed {
  transform: translate3d(0, 0, 0) !important;
  opacity: 1 !important;
}

/* Accensione esponenziale morbida arancione Dark Luxury: parte piano piano e si accentua sempre di più */
#confronto .comparison-grid .after.is-illuminated {
  border-color: #ff5500 !important;
  animation: exponentialOrangeBloom 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes exponentialOrangeBloom {
  0% {
    border-color: rgba(255, 85, 0, 0.12);
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.75), 0 0 0px 0px rgba(255, 85, 0, 0);
  }
  35% {
    border-color: rgba(255, 85, 0, 0.24);
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.75), 0 0 12px 2px rgba(255, 85, 0, 0.14);
  }
  65% {
    border-color: rgba(255, 85, 0, 0.52);
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.78), 0 0 26px 4px rgba(255, 85, 0, 0.28);
  }
  85% {
    border-color: rgba(255, 85, 0, 0.85);
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.82), 0 0 38px 6px rgba(255, 85, 0, 0.38);
  }
  100% {
    border-color: #ff5500;
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.85), 0 0 44px 8px rgba(255, 85, 0, 0.45);
  }
}

/* Righe della lista e icone a cerchietto */
#confronto .comparison-grid li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  padding: 14px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  position: relative;
  min-height: 48px;
}

#confronto .comparison-grid li:first-child {
  border-top: none !important;
  padding-top: 0 !important;
}

.confronto-item-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Icona Cerchietto con X per "Senza un Ecosistema" */
.confronto-item-icon.icon-cross {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

/* Icona Cerchietto con Spunta (✓) verde per "Con l'Ecosistema Impacta Hub" */
.confronto-item-icon.icon-check {
  color: #10b981;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.32);
}

.confronto-item-text {
  flex: 1;
  line-height: 1.55;
  color: #d1d5db;
}

#confronto .comparison-grid .before .confronto-item-text {
  color: #a1a1aa;
}

#confronto .comparison-grid .after .confronto-item-text {
  color: #f3f4f6;
}

#confronto .comparison-grid .before strong {
  color: #f87171;
  font-weight: 600;
}

#confronto .comparison-grid .after strong {
  color: #ffffff;
  font-weight: 600;
}

/* Responsive Mobile */
@media (max-width: 768px) {
  #confronto {
    overflow: hidden !important;
  }
  #confronto .comparison-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #confronto .comparison-grid .before,
  #confronto .comparison-grid .after {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: translate3d(0, 24px, 0) !important;
  }
  #confronto .comparison-grid .before.is-revealed,
  #confronto .comparison-grid .after.is-revealed {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
  }
}

/* Accessibilità (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  #confronto .comparison-grid .before,
  #confronto .comparison-grid .after {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    animation: none !important;
  }
  #confronto .comparison-grid .after {
    border-color: #ff5500 !important;
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.75), 0 0 32px 4px rgba(255, 85, 0, 0.4) !important;
  }
}
