/* ==========================================================================
   Hero Animations - icone animate a tema scacchi per i pulsanti di invito
   all'azione della Hero (alternativa a un'icona Bootstrap Icons o a
   un'immagine). Pure CSS, nessuna immagine/libreria esterna - si animano
   quando si passa il mouse sul contenitore che porta la classe
   .hanim-hover-zone (il pulsante hero reale sul sito, oppure la card di
   anteprima nel picker del wizard). Vedi hero-animations.js per il catalogo
   e l'helper chessoraHeroAnimationHtml().
   ========================================================================== */

.hanim { position:relative; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:0 0 auto; vertical-align:middle; }

/* ---- cavallo + scacchiera ---- */
.hanim-knight-board {
  position:relative; width:28px; height:28px; border-radius:3px;
  background-image:
    linear-gradient(45deg,#65513a 25%,transparent 25%,transparent 75%,#65513a 75%),
    linear-gradient(45deg,#65513a 25%,transparent 25%,transparent 75%,#65513a 75%);
  background-size:14px 14px; background-position:0 0,7px 7px; background-color:#eee7d8;
  transform:perspective(220px) rotateX(45deg) rotateZ(-3deg);
  box-shadow:0 6px 8px rgba(0,0,0,.28);
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.hanim-knight-piece {
  position:absolute; left:50%; bottom:1px; transform:translateX(-50%) translateZ(10px);
  font-size:18px; line-height:1; color:#e5dccb; text-shadow:1px 2px 2px rgba(0,0,0,.55);
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.hanim-hover-zone:hover .hanim-knight-board { transform:perspective(220px) rotateX(48deg) rotateZ(-8deg) translateY(-2px); }
.hanim-hover-zone:hover .hanim-knight-piece { transform:translateX(-50%) translateZ(14px) translateY(-3px) rotate(4deg); }

/* ---- tessera che si apre ---- */
.hanim-card { position:relative; width:28px; height:20px; perspective:280px; }
.hanim-card-body {
  position:absolute; inset:0; border-radius:4px; border:1px solid rgba(212,187,135,.5);
  background:linear-gradient(135deg,#514330,#211d18); box-shadow:0 5px 8px rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center; font-size:11px; color:#d4bb87; line-height:1;
  transition:transform .6s cubic-bezier(.2,.8,.2,1);
}
.hanim-hover-zone:hover .hanim-card-body { transform:rotateY(180deg) rotateZ(2deg); }

/* ---- coppa ---- */
.hanim-trophy { position:relative; width:24px; height:30px; }
.hanim-trophy-cup {
  position:absolute; top:2px; left:5px; width:14px; height:14px; border:2px solid #b99a63; border-top:none;
  border-radius:0 0 8px 8px; background:linear-gradient(90deg,rgba(185,154,99,.18),rgba(238,231,216,.08));
}
.hanim-trophy-cup::before, .hanim-trophy-cup::after { content:""; position:absolute; top:1px; width:7px; height:8px; border:2px solid #b99a63; border-radius:50%; }
.hanim-trophy-cup::before { left:-7px; }
.hanim-trophy-cup::after { right:-7px; }
.hanim-trophy-stem { position:absolute; left:11px; top:15px; width:3px; height:8px; background:#b99a63; }
.hanim-trophy-base { position:absolute; bottom:1px; left:6px; width:12px; height:3px; border-radius:2px; background:linear-gradient(90deg,#65513a,#b99a63,#65513a); }
.hanim-hover-zone:hover .hanim-trophy { animation:hanimTrophyBounce .8s cubic-bezier(.2,.8,.2,1); }
@keyframes hanimTrophyBounce {
  0% { transform:translateY(0) rotate(0); }
  30% { transform:translateY(-5px) rotate(-6deg); }
  60% { transform:translateY(-2px) rotate(5deg); }
  100% { transform:translateY(0) rotate(0); }
}

/* ---- calendario che si sfoglia ---- */
.hanim-calendar { position:relative; width:24px; height:28px; perspective:240px; }
.hanim-calendar-back {
  position:absolute; inset:0; border-radius:4px; background:linear-gradient(145deg,#5b4934,#251f19);
  border:1px solid rgba(212,187,135,.45); display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:#eee7d8;
}
.hanim-calendar-page {
  position:absolute; inset:0; border-radius:4px; background:linear-gradient(145deg,#eee7d8,#c9bda9);
  transform-origin:top center; transition:transform .6s cubic-bezier(.2,.8,.2,1); z-index:2;
}
.hanim-calendar-ring { position:absolute; top:-3px; width:2.5px; height:6px; border-radius:2px; background:#332a20; z-index:4; }
.hanim-calendar-ring:nth-of-type(3) { left:6px; }
.hanim-calendar-ring:nth-of-type(4) { right:6px; }
.hanim-hover-zone:hover .hanim-calendar-page { transform:rotateX(-155deg); }

.hero-anim-scale-box { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }

/* ---- card grande per un pulsante Hero con animazione ---- */
/* Stessa idea delle card della griglia menu di riferimento: pannello vetro
   scuro con bordo dorato all'hover, icona animata grande al centro, sotto
   l'etichetta del pulsante - molto più grande del pulsante "pillola" usato
   per icona/immagine, come richiesto per l'opzione Animazione. */
.hero-anim-card {
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:.85rem;
  width:170px; min-height:190px; padding:1.5rem 1rem;
  border-radius:1rem; border:1px solid rgba(238,231,216,.13);
  background:linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  box-shadow:0 20px 50px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08);
  text-decoration:none; color:var(--cream,#eee7d8); text-align:center;
  transition:transform .45s cubic-bezier(.2,.8,.2,1), border-color .4s ease, box-shadow .4s ease, background .4s ease;
}
.hero-anim-card:hover {
  color:var(--cream,#eee7d8); transform:translateY(-6px);
  border-color:rgba(185,154,99,.38);
  box-shadow:0 28px 65px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
}
.hero-anim-card-icon { display:flex; align-items:center; justify-content:center; height:100px; }
.hero-anim-card-label { font-weight:700; font-size:1rem; }

@media (max-width:576px) {
  .hero-anim-card { width:140px; min-height:160px; padding:1.1rem .85rem; }
  .hero-anim-card-icon { height:80px; }
}

@media (prefers-reduced-motion: reduce) {
  .hanim-knight-board, .hanim-knight-piece, .hanim-card-body, .hanim-trophy, .hanim-calendar-page {
    transition:none !important; animation:none !important;
  }
}
