/* Animazioni e stati hover delle card "Destinatari"
   (le classi erano nell'export di Stitch ma senza regole CSS associate).
   Valori presi da DESIGN.md › Depth Architecture › Hover & Focused Card. */

.sanitary-dest-card,
.special-dest-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.sanitary-dest-card:hover,
.special-dest-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 24px -4px rgba(30, 41, 59, 0.08),
    0 4px 10px -2px rgba(30, 41, 59, 0.04);
}

.sanitary-dest-card:hover {
  border-color: #9fcaff; /* tertiary-fixed-dim */
}

.special-dest-card:hover {
  border-color: #84db65; /* primary-fixed-dim */
}

/* Riquadro dell'icona: si riempie con il colore del settore.
   Selettore annidato per prevalere su .transition-colors di Tailwind. */
.sanitary-dest-card .dest-icon-wrapper,
.special-dest-card .dest-icon-wrapper {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.sanitary-dest-card:hover .dest-icon-wrapper {
  background-color: #1e5f98; /* tertiary */
  color: #ffffff;
  transform: scale(1.08);
}

.special-dest-card:hover .dest-icon-wrapper {
  background-color: #1c6b00; /* primary */
  color: #ffffff;
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .sanitary-dest-card,
  .special-dest-card,
  .sanitary-dest-card .dest-icon-wrapper,
  .special-dest-card .dest-icon-wrapper {
    transition: none;
  }

  .sanitary-dest-card:hover,
  .special-dest-card:hover,
  .sanitary-dest-card:hover .dest-icon-wrapper,
  .special-dest-card:hover .dest-icon-wrapper {
    transform: none;
  }
}

/* Apertura modali legali */
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.legal-modal[open] {
  animation: modal-in 0.25s ease-out;
}

.legal-modal[open]::backdrop {
  animation: backdrop-in 0.25s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .legal-modal[open],
  .legal-modal[open]::backdrop {
    animation: none;
  }
}

/* Apertura menu mobile */
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mobile-menu:not([hidden]) {
  animation: menu-in 0.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu:not([hidden]) {
    animation: none;
  }
}
