/* Alcoweb Sticky Steps - Styles (completo, con fade e fix wrapper) */
.aws-steps {
  --sticky-top: 10vh;
  --title-space: 0px;
  /* eredita colori/sfondo/typo dai preset di Gutenberg */
  color: inherit;
  background: inherit;
}

/* Mobile first: layout a blocchi */
.aws-steps__grid { display: none; }
.aws-steps__mobile { display: block; }

/* Titoli/testi: non forziamo colori/font, solo spaziatura */
.aws-steps__title,
.aws-steps__text {
  margin-top: 0;
  margin-bottom: .75em;
}

/* Editor niceties (solo editor) */
.aws-steps-editor__item {
  border: 1px dashed rgba(0,0,0,.15);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.aws-steps-editor__controls { display: flex; justify-content: flex-end; }
.aws-steps-editor__hint { opacity:.7; font-size: 12px; margin-top: 8px; }

.aws-steps__mobile-img {
    width: 100%;
    height: auto;
  }

/* Desktop layout */
@media (min-width: 768px) {
  .aws-steps__mobile { display: none; }

  .aws-steps__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(24px, 4vw, 56px);
  }

  .aws-steps__left { position: relative; }

  /* Il titolo resta fisso sopra */
  .aws-steps__heading {
    top: var(--sticky-top);
    margin: 0 0 12px 0;
    z-index: 2;
  }

  .aws-steps__sticky {
    position: sticky;
    top: calc(var(--sticky-top) + var(--title-space));
    z-index: 1;
    height: var(--sticky-height, auto); /* impostata via JS */
    isolation: isolate;                 /* crea stacking context */
  }

  .aws-steps__sticky.is-ending {
    position: absolute;
    top: auto;
    bottom: 0;
	width: 100%;
  }

  /* Fading: sovrapposti, niente display:none */
  .aws-steps__item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
    z-index: 1;
    will-change: opacity, transform;
    backface-visibility: hidden;
    background: inherit; /* evita “ghost” su temi con sfondi */
  }
  .aws-steps__item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 2;
  }

  .aws-steps__right {
    display: grid;
    gap: 24px;
  }

  .aws-steps__media { margin: 0; }

  .aws-steps__media img,
  .aws-steps__mobile-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
}

/* Rispetto preferenze utente: niente animazioni se richiesto */
@media (prefers-reduced-motion: reduce) {
  .aws-steps__item {
    transition: none !important;
    transform: none !important;
  }
}