/*
 * MadeForHosts Mobile Stack Swipe
 * Scope intenzionalmente limitato alla hero .mfh-stage della home.
 * Nessuna modifica a colori, tipografia, dimensioni, sezioni o demo.
 */

@media (max-width: 719px) and (hover: none),
       (max-width: 719px) and (pointer: coarse) {
  .mfh-stage.mfh-touch-stack {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card {
    will-change: transform;
    transition: transform .42s cubic-bezier(.2,.7,.2,1), box-shadow .42s cubic-bezier(.2,.7,.2,1);
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-front {
    transform: translate(-57%,-58%) rotate(-7deg) !important;
    z-index: 3 !important;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-middle {
    transform: translate(-42%,-42%) rotate(7deg) !important;
    z-index: 2 !important;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-back {
    transform: translate(-50%,-20%) rotate(-1deg) !important;
    z-index: 1 !important;
  }
}

/* Tablet touch: conserva le proporzioni/posizioni previste dal tema al breakpoint >=720px. */
@media (min-width: 720px) and (max-width: 1039px) and (hover: none),
       (min-width: 720px) and (max-width: 1039px) and (pointer: coarse) {
  .mfh-stage.mfh-touch-stack {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card {
    will-change: transform;
    transition: transform .42s cubic-bezier(.2,.7,.2,1), box-shadow .42s cubic-bezier(.2,.7,.2,1);
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-front {
    transform: translate(-69%,-57%) rotate(-8deg) !important;
    z-index: 3 !important;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-middle {
    transform: translate(-31%,-46%) rotate(7deg) !important;
    z-index: 2 !important;
  }

  .mfh-stage.mfh-touch-stack .mfh-stage-card.mfh-stack-back {
    transform: translate(-50%,-18%) rotate(-1deg) !important;
    z-index: 1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mfh-stage.mfh-touch-stack .mfh-stage-card {
    transition: none !important;
  }
}
