/* =====================================================
   SECTION: hero
   File: assets/css/sections/hero.css
===================================================== */

/* -----------------------------------------------------
   0) Base section scope
----------------------------------------------------- */
.am-section--hero {
  padding-top: var(--section_padding_top, 72px);
  padding-bottom: var(--section_padding_bottom, 72px);
  background: var(--section-bg, var(--section_bg_color, transparent));
}

.am-section--hero .hero__title {
  margin: 0;
  font-family: var(--font-headings, var(--font-base, inherit));
  color: var(--text_color, var(--dark, #111));
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.am-section--hero .hero__subtitle {
  margin-top: 12px;
  color: var(--text_secondary_color, var(--gray, #555));
  font-family: var(--font-body, var(--font-base, inherit));
}

.am-section--hero .hero__subtitle p { margin: 0; }

.am-section--hero .hero__actions { margin-top: 18px; }

.am-section--hero .hero__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.am-section--hero .hero__wrap { position: relative; }

/* Shadow fallback “reale” (prima era none -> spariva se il token non è definito) */
.am-section--hero {
  --am-hero-shadow-soft: var(--shadow-soft, 0 18px 44px rgba(0,0,0,0.10));
  --am-hero-shadow-strong: var(--shadow-strong, 0 22px 60px rgba(0,0,0,0.14));
  --am-hero-border: var(--border, rgba(0,0,0,0.08));
  --am-hero-surface: var(--surface, rgba(255,255,255,0.92));
  --am-hero-default-gap: var(--skin-section-gap, 28px);
  --am-hero-default-minh: var(--skin-hero-panel-min-height, 420px);
  --am-hero-panel-radius: var(--skin-hero-panel-radius, var(--radius-lg, 18px));
  --am-hero-media-radius: var(--skin-hero-media-radius, var(--skin-media-radius, var(--radius-lg, 18px)));
  --am-hero-panel-padding: var(--skin-hero-panel-padding, 26px);
  --am-hero-minimal-padding: var(--skin-hero-panel-padding, 18px);
  --am-hero-minimal-thumb-radius: var(--skin-media-radius, var(--radius-md, 14px));
  --am-hero-default-hover-lift: var(--skin-card-hover-lift, 4px);
}

/* -----------------------------------------------------
   1) Variant: default (overlap panel + media)
----------------------------------------------------- */
.am-section--hero.am-variant--default .hero__wrap--default { position: relative; }

.am-section--hero.am-variant--default .hero__layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--am-hero-default-gap);
  align-items: center;
  min-height: var(--am-hero-default-minh);
}

.am-section--hero.am-variant--default .hero__media { position: relative; }

.am-section--hero.am-variant--default .hero__media-inner {
  aspect-ratio: 16 / 9;
  border-radius: var(--am-hero-media-radius);
  overflow: hidden;
  border: 1px solid var(--am-hero-border);
  background: var(--am-hero-surface);
  box-shadow: var(--am-hero-shadow-soft);
}

.am-section--hero.am-variant--default .hero__panel {
  position: relative;
  z-index: 2;
  padding: var(--am-hero-panel-padding);
  border-radius: var(--am-hero-panel-radius);
  background: var(--am-hero-surface);
  border: 1px solid var(--am-hero-border);
  box-shadow: var(--am-hero-shadow-soft);
  max-width: 620px;
}

@media (min-width: 992px) {
  .am-section--hero.am-variant--default .hero__panel {
    margin-right: -56px;
  }
}

.am-section--hero.am-variant--default .hero__title {
  font-size: clamp(34px, 3.4vw, 58px);
}

.am-section--hero.am-variant--default .hero__layout.is-no-media {
  grid-template-columns: 1fr;
  min-height: 0;
}
@media (min-width: 992px) {
  .am-section--hero.am-variant--default .hero__layout.is-no-media .hero__panel {
    margin-right: 0;
    max-width: 820px;
  }
}

/* -----------------------------------------------------
   1b) Shared image-led full-cover behavior
----------------------------------------------------- */
.am-section--hero.am-variant--carousel,
.am-section--hero.am-variant--split,
.am-section--hero.am-variant--visual.am-hero-visual--pos-background {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.homepage-wrapper > .am-section--hero.am-variant--carousel,
.homepage-wrapper > .am-section--hero.am-variant--split,
.homepage-wrapper > .am-section--hero.am-variant--visual.am-hero-visual--pos-background {
  padding-top: 0;
  padding-bottom: 0;
}

/* -----------------------------------------------------
   2) Variant: split (full-bleed under header)
----------------------------------------------------- */
.am-section--hero.am-variant--split {
  background: var(--section-bg, var(--section_bg_color, transparent));

  /* FIX: niente “gradino” dato dal padding globale della sezione.
     La gestione dell’offset header avviene internamente al wrapper. */
  padding-top: 0;
  padding-bottom: 0;
}

.am-section--hero.am-variant--split .hero__bleed {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;

  /* FIX: il bleed fa solo full-width, NON gestisce l’offset header */
  margin-top: 0;
  padding-top: 0;
}

.am-section--hero.am-variant--split .hero__wrap--split {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  box-shadow: none;

  background-image: var(--am-hero-bg, none);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  /* FIX: l’offset header è interno (hero “passa dietro” al menu,
     ma il contenuto parte sotto l’header) */
  min-height: 520px;
  display: grid;
  align-items: stretch;
  grid-auto-rows: auto;
}

.am-section--hero.am-variant--split .hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.46) 42%,
    rgba(0,0,0,0.14) 100%
  );
  pointer-events: none;
}

.am-section--hero.am-variant--split .hero__content {
  position: relative;
  z-index: 1;
  padding: 56px 0;
  width: 100%;
}

.am-section--hero.am-variant--split .hero__content .am-container {
  padding-top: var(--am-header-offset, 84px);
}

.am-section--hero.am-variant--split .hero__content-inner { max-width: 760px; }

.am-section--hero.am-variant--split .hero__title,
.am-section--hero.am-variant--split .hero__subtitle {
  color: var(--on_hero_text, #fff);
}
/* FIX: evita che il colore globale dei <p> (main.css) sovrascriva la subtitle */
.am-section--hero.am-variant--split .hero__subtitle p{
  color: inherit;
}

.am-section--hero.am-variant--split .hero__subtitle { opacity: 0.92; }

.am-section--hero.am-variant--split .hero__title {
  font-size: clamp(38px, 4.1vw, 66px);
}

.am-section--hero.am-variant--split .hero__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.am-section--hero.am-variant--split.is-no-media .hero__wrap--split {
  background-image: none;
  min-height: 360px;
}
.am-section--hero.am-variant--split.is-no-media .hero__overlay {
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0.02) 100%
  );
}
.am-section--hero.am-variant--split.is-no-media .hero__title,
.am-section--hero.am-variant--split.is-no-media .hero__subtitle {
  color: var(--text_color, var(--dark, #111));
}

/* -----------------------------------------------------
   3) Variant: centered (editorial band)
----------------------------------------------------- */
.am-section--hero.am-variant--centered .hero__wrap--centered {
  display: grid;
  gap: 18px;
}

.am-section--hero.am-variant--centered .hero__content {
  text-align: center;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.am-section--hero.am-variant--centered .hero__title {
  font-size: clamp(36px, 3.6vw, 64px);
}

.am-section--hero.am-variant--centered .hero__actions {
  justify-content: center;
}

.am-section--hero.am-variant--centered .hero__band { margin-top: 12px; }

.am-section--hero.am-variant--centered .hero__band-media {
  margin: 0;
  border-radius: var(--am-hero-media-radius);
  overflow: hidden;
  border: 1px solid var(--am-hero-border);
  box-shadow: var(--am-hero-shadow-soft);
  background: var(--am-hero-surface);
}

.am-section--hero.am-variant--centered .hero__band-inner {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Se manca immagine, riduce un pelo il gap */
.am-section--hero.am-variant--centered.is-no-media .hero__wrap--centered { gap: 10px; }

/* -----------------------------------------------------
   4) Variant: minimal (true premium strip)
----------------------------------------------------- */
.am-section--hero.am-variant--minimal .hero__wrap--minimal {
  padding: var(--am-hero-minimal-padding);
  border-radius: var(--am-hero-panel-radius);
  background: var(--am-hero-surface);
  border: 1px solid var(--am-hero-border);
  box-shadow: var(--am-hero-shadow-soft);
}

.am-section--hero.am-variant--minimal .hero__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.am-section--hero.am-variant--minimal.is-no-media .hero__row {
  grid-template-columns: 1fr auto;
}

.am-section--hero.am-variant--minimal.is-no-cta .hero__row {
  grid-template-columns: 1fr auto;
}

.am-section--hero.am-variant--minimal .hero__title {
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.12;
}

.am-section--hero.am-variant--minimal .hero__subtitle {
  margin-top: 6px;
}

/* CTA più "inline hero" */
.am-section--hero.am-variant--minimal .hero__actions {
  margin-top: 0;
}

/* Thumb inline: piccolo, premium, non dominante */
.am-section--hero.am-variant--minimal .hero__thumb--inline {
  width: 84px;
}

.am-section--hero.am-variant--minimal .hero__thumb-inner {
  aspect-ratio: 1 / 1;
  border-radius: var(--am-hero-minimal-thumb-radius);
  overflow: hidden;
  border: 1px solid var(--am-hero-border);
  background: var(--am-hero-surface);
}
/* =====================================================
   HERO — Variant: minimal (CREATIVE DESKTOP)
   - Mobile invariato
   - Desktop: layout moderno 2-col + thumb grande + CTA “hero”
===================================================== */
@media (min-width: 992px) {

  .am-section--hero.am-variant--minimal .hero__wrap--minimal{
    position: relative;
    padding: var(--am-hero-panel-padding);
    border-radius: var(--skin-hero-panel-radius, 22px);
    overflow: hidden;
    box-shadow: var(--am-hero-shadow-soft);
  }

  /* background soft “creative” (senza colori hard-coded) */
  .am-section--hero.am-variant--minimal .hero__wrap--minimal::before{
    content:"";
    position:absolute;
    inset:-2px;
    pointer-events:none;
    background:
      radial-gradient(900px 260px at 16% 12%, rgba(255,255,255,0.55), rgba(255,255,255,0) 60%),
      radial-gradient(520px 220px at 84% 36%, rgba(0,0,0,0.045), rgba(0,0,0,0) 62%);
    opacity: .9;
  }

  .am-section--hero.am-variant--minimal .hero__row{
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "copy  thumb"
      "cta   thumb";
    gap: 18px 22px;
    align-items: center;
  }

  /* aree */
  .am-section--hero.am-variant--minimal .hero__copy{ grid-area: copy; }
  .am-section--hero.am-variant--minimal .hero__actions{ grid-area: cta; }
  .am-section--hero.am-variant--minimal .hero__thumb{ grid-area: thumb; }

  /* tipografia più “hero” */
  .am-section--hero.am-variant--minimal .hero__title{
    font-size: clamp(34px, 3.3vw, 54px);
    line-height: 1.03;
    letter-spacing: -0.03em;
  }

  .am-section--hero.am-variant--minimal .hero__subtitle{
    margin-top: 10px;
    max-width: 62ch;
    font-size: 16px;
    line-height: 1.55;
  }

  /* CTA: più presente, ma pulita */
  .am-section--hero.am-variant--minimal .hero__actions{
    margin-top: 8px;
    justify-content: flex-start;
  }
  .am-section--hero.am-variant--minimal .hero__actions .am-button{
    width: auto;
    max-width: none;
    padding: 13px 20px;
    border-radius: var(--skin-button-radius, 14px);
  }

  /* thumb: diventa “visual” vero */
  .am-section--hero.am-variant--minimal .hero__thumb--inline{
    width: 100%;
    max-width: none;
    justify-self: end;
  }

  .am-section--hero.am-variant--minimal .hero__thumb-inner{
    border-radius: var(--skin-media-radius, 18px);
    aspect-ratio: 16 / 9;
    border: 1px solid var(--am-hero-border);
    box-shadow: var(--am-hero-shadow-strong);
    transform: rotate(1.1deg);    /* piccolo twist creativo */
  }

  /* mini “ring” dietro al visual (creative ma soft) */
  .am-section--hero.am-variant--minimal .hero__thumb{
    position: relative;
  }
  .am-section--hero.am-variant--minimal .hero__thumb::after{
    content:"";
    position:absolute;
    inset:-14px -10px -10px -10px;
    border-radius: var(--skin-hero-panel-radius, 26px);
    background:
      radial-gradient(closest-side at 55% 45%, rgba(0,0,0,0.06), rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events:none;
  }

  /* Hover: enfatizza il visual (senza cambiare il tuo hover globale) */
  @media (hover: hover) and (pointer: fine){
    .am-section--hero.am-variant--minimal .hero__thumb-inner{
      transition: transform var(--transition, .25s ease), box-shadow var(--transition, .25s ease);
      will-change: transform;
    }
    .am-section--hero.am-variant--minimal .hero__thumb-inner:hover{
      transform: translateY(calc(var(--am-hero-default-hover-lift) * -1)) rotate(0.2deg);
      box-shadow: var(--shadow-strong, 0 18px 50px rgba(0,0,0,.14));
    }
  }
}

/* Safety: se manca la media, torna a layout semplice su desktop */
@media (min-width: 992px) {
  .am-section--hero.am-variant--minimal.is-no-media .hero__row{
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "cta";
  }
  .am-section--hero.am-variant--minimal.is-no-media .hero__actions{
    justify-content: flex-start;
  }
}
/* -----------------------------------------------------
   5) Responsive
----------------------------------------------------- */
@media (max-width: 991px) {
  /* DEFAULT: mobile/tablet come desktop ma stack:
     immagine sopra + card testo sotto che “sale” sopra l’immagine */
  .am-section--hero.am-variant--default .hero__layout {
    display: flex;              /* (prima era grid) */
    flex-direction: column;
    gap: 18px;
    min-height: 0;
  }

  /* Forzo ordine: prima media, poi panel */
  .am-section--hero.am-variant--default .hero__media { order: 1; }
  .am-section--hero.am-variant--default .hero__panel { order: 2; }

  .am-section--hero.am-variant--default .hero__panel {
    max-width: none;
    margin-right: 0;
    /* overlap “premium” come il desktop (card sopra immagine) */
    margin-top: -58px;
    /* un minimo di aria ai lati */
    margin-left: 14px;
    margin-right: 14px;
    box-shadow: var(--am-hero-shadow-strong);
  }

  .am-section--hero.am-variant--default .hero__media-inner {
    box-shadow: var(--am-hero-shadow-soft);
  }

  .am-section--hero.am-variant--default .hero__layout.is-no-media .hero__panel {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .am-section--hero.am-variant--split .hero__content {
    padding: 44px 0;
  }

  .am-section--hero.am-variant--split .hero__wrap--split {
    background-image: var(--am-hero-bg-mobile, var(--am-hero-bg, none));
  }
}

/* Media reale usata solo nel layout mobile: evita il crop del background. */
.am-section--hero.am-variant--split .hero__split-media{
  display: none !important;
}

@media (max-width: 900px) {
  .am-section--hero.am-variant--split .hero__wrap--split {
    min-height: 440px;
  }

  .am-section--hero.am-variant--centered .hero__band-inner {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 767px) {
  .am-section--hero.am-variant--split .hero__wrap--split{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 0 auto auto auto;
    min-height: 0;
    background-image: none !important;
    overflow: hidden;
  }

  .am-section--hero.am-variant--split .hero__overlay{
    display: none;
  }

  .am-section--hero.am-variant--split .hero__split-media{
    display: block !important;
    grid-column: 1;
    grid-row: 2;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
  }

  .am-section--hero.am-variant--split .hero__split-media picture,
  .am-section--hero.am-variant--split .hero__split-media img{
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
    border-radius: 0 !important;
  }

  .am-section--hero.am-variant--split .hero__content{
    display: contents;
    padding: 0;
  }

  .am-section--hero.am-variant--split .hero__content .am-container,
  .am-section--hero.am-variant--split .hero__content-inner,
  .am-section--hero.am-variant--split .hero__head{
    display: contents;
  }

  .am-section--hero.am-variant--split .hero__title{
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    justify-self: stretch;
    z-index: 2;
    width: 100vw;
    margin: 0;
    margin-left: calc(50% - 50vw);
    padding: 28px 18px 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(7,17,35,.84) 100%);
    color: var(--on_hero_text, #fff);
    text-align: center;
  }

  .am-section--hero.am-variant--split .hero__subtitle{
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    padding: 18px 18px 24px;
    color: var(--on_hero_text, #fff);
    text-align: center;
    background: transparent;
  }

  .am-section--hero.am-variant--split .hero__actions{
    grid-column: 1;
    grid-row: 4;
    align-self: end;
    justify-self: center;
    padding: 0 18px 24px;
  }
}

@media (max-width: 767px) {
  .am-section--hero {
    padding-top: var(--section_padding_top, 64px);
    padding-bottom: var(--section_padding_bottom, 64px);
  }

  .am-section--hero .am-actions {
    justify-content: center;
  }

  .am-section--hero .am-actions .am-button,
  .am-section--hero .hero__button {
    width: 100%;
    max-width: 520px;
  }

  .am-section--hero.am-variant--centered .hero__actions .am-button {
    width: auto;
    max-width: 340px;
  }

  .am-section--hero.am-variant--minimal .hero__actions .am-button {
    width: auto;
    max-width: 340px;
  }

  .am-section--hero.am-variant--default .hero__media-inner {
    aspect-ratio: 16 / 9;
  }

  /* overlap un pelo più “tight” su telefoni piccoli */
  .am-section--hero.am-variant--default .hero__panel {
    margin-top: -54px;
    margin-left: 12px;
    margin-right: 12px;
  }

  .am-section--hero.am-variant--split .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(0,0,0,0.74) 0%,
      rgba(0,0,0,0.50) 58%,
      rgba(0,0,0,0.18) 100%
    );
  }

  .am-section--hero.am-variant--split .hero__content {
    padding: 34px 0;
    text-align: left;
  }

  .am-section--hero.am-variant--split .hero__title {
    font-size: clamp(32px, 8vw, 46px);
  }

  /* Minimal mobile: titolo e immagine affiancati, descrizione a tutta riga. */
  .am-section--hero.am-variant--minimal .hero__wrap--minimal {
    padding: 16px;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__copy {
    display: contents;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__subtitle {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__thumb--inline {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: none;
    align-self: start;
  }

  .am-section--hero.am-variant--minimal:not(.is-no-media) .hero__actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    margin-top: 0;
  }

  .am-section--hero.am-variant--minimal.is-no-media .hero__row {
    grid-template-columns: 1fr;
  }

  .am-section--hero.am-variant--minimal .hero__actions {
    margin-top: 4px;
  }

  .am-section--hero.am-variant--minimal .hero__thumb-inner {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 560px) {
  .am-section--hero.am-variant--default .hero__panel {
    padding: 20px;
    margin-top: -48px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .am-section--hero.am-variant--split .hero__wrap--split {
    min-height: max(600px, 100svh);
  }

  .am-section--hero.am-variant--centered .hero__band-inner {
    aspect-ratio: 16 / 8;
  }
}
/* FIX: il bleed non deve ereditare il gap globale della section body */
.am-section--hero.am-variant--split .am-section-body{
  margin-top: 0 !important;
}

/* =====================================================
   HERO DEFAULT — Hover lift (solo device con hover)
   Ripristina l’effetto “card che si muove” come nel vecchio main.css
===================================================== */
@media (hover: hover) and (pointer: fine) {

  .am-section--hero.am-variant--default .hero__panel,
  .am-section--hero.am-variant--default .hero__media-inner {
    transition:
      transform var(--transition, .25s ease),
      box-shadow var(--transition, .25s ease);
    will-change: transform;
  }

  .am-section--hero.am-variant--default .hero__panel:hover,
  .am-section--hero.am-variant--default .hero__media-inner:hover {
    transform: translateY(calc(var(--am-hero-default-hover-lift) * -1));
    box-shadow: var(--shadow-strong, 0 18px 50px rgba(0,0,0,.14));
  }
}

/* =====================================================
   FASE B3 — Shared primitives: content / overlay / buttons
   Usati da video / carousel / visual
===================================================== */
.am-section--hero .hero__eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-body, var(--font-base, inherit));
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, var(--primary, #6d5efc));
}

.am-section--hero .hero__button--secondary {
  background: transparent;
  border: 1px solid var(--am-hero-border);
  color: inherit;
}

.am-section--hero .am-hero-content {
  position: relative;
  max-width: 720px;
}

.am-section--hero .am-hero-content.am-align--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.am-section--hero .am-hero-content.am-align--right {
  margin-left: auto;
  text-align: right;
}

.am-section--hero .am-hero-content.am-align--center .hero__actions,
.am-section--hero .am-hero-content.am-align--right .hero__actions {
  justify-content: inherit;
}

.am-section--hero .am-hero-content.am-align--center .am-actions { justify-content: center; }
.am-section--hero .am-hero-content.am-align--right .am-actions { justify-content: flex-end; }

.am-section--hero .am-hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.am-section--hero .am-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--am-hero-overlay-opacity, 0.4);
}

.am-section--hero .am-hero-overlay--dark { background: #000; }
.am-section--hero .am-hero-overlay--light { background: #fff; }
.am-section--hero .am-hero-overlay--brand { background: var(--primary, var(--accent, #6d5efc)); }
.am-section--hero .am-hero-overlay--gradient_dark {
  background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 100%);
}
.am-section--hero .am-hero-overlay--gradient_light {
  background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.15) 100%);
}

/* -----------------------------------------------------
   6) Variant: video
----------------------------------------------------- */
.am-section--hero.am-variant--video {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 560px;
  max-height: 100vh;
  display: grid;
  align-items: center;
  padding-top: var(--am-header-offset, 84px);
}

.am-section--hero.am-variant--video .am-hero-video-media { z-index: 0; }

.am-section--hero.am-variant--video .am-hero-video,
.am-section--hero.am-variant--video .am-hero-fallback-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.am-section--hero.am-variant--video .am-hero-fallback-image {
  background-image: var(--am-hero-fallback-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Desktop: il video ha sempre priorità assoluta. */
.am-section--hero.am-variant--video .am-hero-video { display: block; }

/* HOTFIX B3.3: il fallback mobile-only non deve MAI coprire il video su desktop.
   Viene stampato dal template solo quando mobile_use_poster_only è attivo,
   e resta nascosto finché non siamo sotto il breakpoint tablet/mobile. */
.am-section--hero.am-variant--video .am-hero-fallback-image--mobile-only {
  display: none;
}

/* Tablet/mobile: solo poster/fallback (mai video), se richiesto da mobile_use_poster_only */
@media (max-width: 991px) {
  .am-section--hero.am-variant--video.is-mobile-poster-only .am-hero-video {
    display: none;
  }
  .am-section--hero.am-variant--video.is-mobile-poster-only .am-hero-fallback-image--mobile-only {
    display: block;
  }
}

.am-section--hero.am-variant--video .am-container { position: relative; z-index: 1; }

.am-section--hero.am-variant--video .hero__title {
  color: var(--on_hero_text, #fff);
  font-size: clamp(38px, 4.1vw, 66px);
}
.am-section--hero.am-variant--video .hero__subtitle {
  color: var(--on_hero_text, #fff);
  opacity: 0.92;
}
.am-section--hero.am-variant--video .hero__subtitle p { color: inherit; }
.am-section--hero.am-variant--video .hero__eyebrow { color: var(--on_hero_text, #fff); opacity: 0.85; }

.am-section--hero.am-variant--video.is-no-video.is-no-fallback {
  background: var(--section-bg, var(--section_bg_color, transparent));
}
.am-section--hero.am-variant--video.is-no-video.is-no-fallback .hero__title,
.am-section--hero.am-variant--video.is-no-video.is-no-fallback .hero__subtitle,
.am-section--hero.am-variant--video.is-no-video.is-no-fallback .hero__eyebrow {
  color: var(--text_color, var(--dark, #111));
}

@media (max-width: 991px) {
  .am-section--hero.am-variant--video { min-height: 460px; }
}

@media (max-width: 767px) {
  .am-section--hero.am-variant--video { min-height: 380px; }
}

/* -----------------------------------------------------
   7) Variant: carousel
----------------------------------------------------- */
.am-section--hero.am-variant--carousel {
  padding-top: 0;
  padding-bottom: 0;
}

.am-section--hero.am-variant--carousel .am-hero-carousel {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  max-height: 100vh;
  display: grid;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  min-height: inherit;
  max-height: 100vh;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: none;
  align-items: center;
  padding-top: 0;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-slide.is-active {
  display: grid;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-media,
.am-section--hero.am-variant--carousel .am-hero-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: 0;
}

.am-section--hero.am-variant--carousel .am-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-content {
  padding-top: var(--am-header-offset, 84px);
}

.am-section--hero.am-variant--carousel .hero__title {
  color: var(--on_hero_text, #fff);
  font-size: clamp(34px, 3.6vw, 58px);
}
.am-section--hero.am-variant--carousel .hero__subtitle {
  color: var(--on_hero_text, #fff);
  opacity: 0.92;
}
.am-section--hero.am-variant--carousel .hero__subtitle p { color: inherit; }

.am-section--hero.am-variant--carousel .am-hero-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.28);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition, .18s ease), transform var(--transition, .18s ease);
}
.am-section--hero.am-variant--carousel .am-hero-carousel-nav:hover { background: rgba(0,0,0,0.45); }
.am-section--hero.am-variant--carousel .am-hero-carousel-nav--prev { left: 18px; }
.am-section--hero.am-variant--carousel .am-hero-carousel-nav--next { right: 18px; }

.am-section--hero.am-variant--carousel .am-hero-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.am-section--hero.am-variant--carousel .am-hero-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.25);
  padding: 0;
  cursor: pointer;
  transition: background var(--transition, .18s ease), transform var(--transition, .18s ease);
}
.am-section--hero.am-variant--carousel .am-hero-carousel-dot.is-active,
.am-section--hero.am-variant--carousel .am-hero-carousel-dot[aria-current="true"] {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 991px) {
  .am-section--hero.am-variant--carousel .am-hero-carousel,
  .am-section--hero.am-variant--carousel .am-hero-carousel-track {
    min-height: 440px;
  }
}

@media (max-width: 767px) {
  .am-section--hero.am-variant--carousel .am-hero-carousel,
  .am-section--hero.am-variant--carousel .am-hero-carousel-track {
    min-height: 360px;
  }
  .am-section--hero.am-variant--carousel .am-hero-carousel-nav {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* -----------------------------------------------------
   8) Variant: visual
----------------------------------------------------- */

/* -----------------------------------------------------
   9) Variant: media_copy
   Editorial/commercial split: copy left, media right.
----------------------------------------------------- */
.am-section--hero.am-variant--media_copy {
  background: var(--am-hero-surface, var(--surface, #15223d));
  color: var(--am-hero-text, var(--text, #f5f7fb));
  overflow: hidden;
}

.am-section--hero.am-variant--media_copy > .am-container {
  width: min(1200px, calc(100% - 2.5rem));
  max-width: 1200px;
  margin-inline: auto;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  column-gap: clamp(1.5rem, 3vw, 3.25rem);
  row-gap: clamp(.65rem, 1.1vw, 1rem);
  align-items: stretch;
  grid-auto-rows: auto;
  min-height: min(720px, calc(100svh - 2rem));
  padding-block: clamp(2.25rem, 5vh, 4rem);
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__content {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  max-width: none;
  text-align: left;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__body {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.am-section--hero.am-variant--media_copy.is-align-center .am-hero-media-copy__content {
  margin-inline: auto;
  text-align: center;
}

.am-section--hero.am-variant--media_copy.is-align-right .am-hero-media-copy__content {
  margin-left: auto;
  text-align: right;
}

.am-section--hero.am-variant--media_copy .hero__eyebrow {
  margin: 0 0 1rem;
  color: var(--am-hero-accent, var(--primary, #1da1f2));
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.am-section--hero.am-variant--media_copy .hero__title {
  max-width: 21ch;
  margin: 0;
  color: inherit;
  font-size: clamp(2.3rem, 3.1vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.am-section--hero.am-variant--media_copy .hero__subtitle {
  max-width: 35rem;
  margin-top: 0;
  color: color-mix(in srgb, currentColor 76%, transparent);
  font-size: clamp(.9rem, .98vw, 1rem);
  line-height: 1.5;
}

.am-section--hero.am-variant--media_copy .hero__subtitle p {
  margin: 0 0 .65rem;
}

.am-section--hero.am-variant--media_copy .hero__subtitle p:last-child {
  margin-bottom: 0;
}

.am-section--hero.am-variant--media_copy .hero__actions {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: clamp(.25rem, 1vw, .75rem);
}

.am-section--hero.am-variant--media_copy.is-align-center .hero__actions {
  justify-content: center;
}

.am-section--hero.am-variant--media_copy.is-align-right .hero__actions {
  justify-content: flex-end;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
  grid-column: 1 / -1;
  grid-row: 4;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
  color: color-mix(in srgb, currentColor 58%, transparent);
  font-size: .9rem;
  line-height: 1.5;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy p {
  margin: 0;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__media {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  overflow: hidden;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
  aspect-ratio: 5 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__media picture,
.am-section--hero.am-variant--media_copy .am-hero-media-copy__image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__media picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.am-section--hero.am-variant--media_copy .am-hero-media-copy__image {
  object-fit: contain;
  object-position: center;
}

.am-section--hero.am-variant--media_copy.is-no-media .am-hero-media-copy {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 980px) {
  .am-section--hero.am-variant--media_copy > .am-container {
    width: min(calc(100% - 2rem), 1200px);
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    column-gap: 1.5rem;
    row-gap: .9rem;
    min-height: min(640px, calc(100svh - 1.5rem));
  }

  .am-section--hero.am-variant--media_copy .hero__title {
    font-size: clamp(2.15rem, 4.1vw, 3.2rem);
  }
}

@media (max-width: 767px) {
  .am-section--hero.am-variant--media_copy .am-hero-media-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 2rem;
    padding-block: 3rem 3.5rem;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__media,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__body,
  .am-section--hero.am-variant--media_copy .hero__actions,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
    grid-column: auto;
    grid-row: auto;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content {
    order: 1;
    align-self: auto;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__media {
    order: 2;
    min-height: 0;
    width: 100%;
    aspect-ratio: 5 / 4;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__body {
    order: 3;
  }

  .am-section--hero.am-variant--media_copy .hero__actions {
    order: 4;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
    order: 5;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content {
    max-width: none;
    text-align: left;
  }

  .am-section--hero.am-variant--media_copy.is-align-center .am-hero-media-copy__content,
  .am-section--hero.am-variant--media_copy.is-align-right .am-hero-media-copy__content {
    text-align: left;
  }

  .am-section--hero.am-variant--media_copy .hero__title {
    max-width: 14ch;
    font-size: clamp(2.15rem, 10.5vw, 3.35rem);
  }

  .am-section--hero.am-variant--media_copy .hero__actions,
  .am-section--hero.am-variant--media_copy.is-align-center .hero__actions,
  .am-section--hero.am-variant--media_copy.is-align-right .hero__actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

.am-section--hero.am-variant--media_copy .hero__actions .am-button {
    width: 100%;
  }

}

/* -----------------------------------------------------
   MEDIA_COPY - ingresso iniziale leggero
   Solo questa variante: non interferisce con Hero visual,
   carousel o con il reveal globale delle sezioni.
----------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content {
    animation: am-hero-media-copy-content-in 560ms cubic-bezier(.2, .75, .25, 1) both;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__media {
    animation: am-hero-media-copy-media-in 520ms cubic-bezier(.2, .75, .25, 1) 70ms both;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__body,
  .am-section--hero.am-variant--media_copy .hero__actions,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
    animation: am-hero-media-copy-content-in 520ms cubic-bezier(.2, .75, .25, 1) 120ms both;
  }
}

@keyframes am-hero-media-copy-content-in {
  from {
    opacity: .96;
    transform: translate3d(-8px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes am-hero-media-copy-media-in {
  from {
    opacity: .96;
    transform: translate3d(0, 8px, 0) scale(.995);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Mobile: stesso ingresso, ma piu' breve e quasi impercettibile. */
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content {
    animation-duration: 380ms;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__media {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .am-section--hero.am-variant--media_copy .am-hero-media-copy__body,
  .am-section--hero.am-variant--media_copy .hero__actions,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
    animation-duration: 360ms;
    animation-delay: 60ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__content,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__media,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__body,
  .am-section--hero.am-variant--media_copy .hero__actions,
  .am-section--hero.am-variant--media_copy .am-hero-media-copy__microcopy {
    animation: none !important;
    transform: none !important;
  }
}

.am-section--hero.am-variant--visual .am-hero-visual-layout {
  display: grid;
  gap: var(--am-hero-default-gap);
  align-items: center;
}

.am-section--hero.am-variant--visual.am-hero-visual--pos-right .am-hero-visual-layout {
  grid-template-columns: 1.05fr 0.95fr;
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-left .am-hero-visual-layout {
  grid-template-columns: 0.95fr 1.05fr;
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-left .am-hero-content { order: 2; }
.am-section--hero.am-variant--visual.am-hero-visual--pos-left .am-hero-visual-media-wrap { order: 1; }

.am-section--hero.am-variant--visual.am-hero-visual--pos-center .am-hero-visual-layout {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-center .am-hero-visual-media-wrap {
  max-width: 720px;
  width: 100%;
}

.am-section--hero.am-variant--visual .am-hero-visual-media-inner {
  position: relative;
    aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--am-hero-border);
  box-shadow: var(--am-hero-shadow-soft);
  background: var(--am-hero-surface);
  border-radius: var(--am-hero-media-radius);
}

.am-section--hero.am-variant--visual .am-hero-visual-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-section--hero.am-variant--visual .am-hero-visual-img--mobile { display: none; }

.am-section--hero.am-variant--visual.has-mobile-image .am-hero-visual-img--desktop { display: none; }
.am-section--hero.am-variant--visual.has-mobile-image .am-hero-visual-img--mobile { display: block; }
@media (min-width: 768px) {
  .am-section--hero.am-variant--visual.has-mobile-image .am-hero-visual-img--desktop { display: block; }
  .am-section--hero.am-variant--visual.has-mobile-image .am-hero-visual-img--mobile { display: none; }
}

/* Mask styles (solo estetica, CSS-only) */
.am-section--hero.am-variant--visual.am-hero-visual--mask-rounded .am-hero-visual-media-inner {
  border-radius: var(--radius-lg, 24px);
}
.am-section--hero.am-variant--visual.am-hero-visual--mask-organic .am-hero-visual-media-inner {
  border-radius: 62% 38% 55% 45% / 45% 55% 45% 55%;
}
.am-section--hero.am-variant--visual.am-hero-visual--mask-arch .am-hero-visual-media-inner {
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
}

/* Background layout (media_position = background) */
.am-section--hero.am-variant--visual.am-hero-visual--pos-background {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: grid;
  align-items: center;
}

.am-section--hero.am-variant--visual.am-hero-visual--pos-background .am-hero-visual-media--background {
  z-index: 0;
}

.am-section--hero.am-variant--visual.am-hero-visual--pos-background .am-hero-visual-media--background .am-hero-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-background .am-container { position: relative; z-index: 1; }

.am-section--hero.am-variant--visual.am-hero-visual--pos-background .am-hero-content {
  padding-top: var(--am-header-offset, 84px);
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-background .hero__title,
.am-section--hero.am-variant--visual.am-hero-visual--pos-background .hero__subtitle {
  color: var(--on_hero_text, #fff);
}
.am-section--hero.am-variant--visual.am-hero-visual--pos-background .hero__subtitle p { color: inherit; }

/* Effetti (sempre soft, CSS-only) */
.am-section--hero.am-variant--visual.am-hero-visual--effect-kenburns .am-hero-visual-img {
  animation: am-hero-visual-kenburns 16s ease-in-out infinite alternate;
}
.am-section--hero.am-variant--visual.am-hero-visual--effect-zoom .am-hero-visual-img {
  animation: am-hero-visual-zoom 10s ease-in-out infinite alternate;
}
.am-section--hero.am-variant--visual.am-hero-visual--effect-floating .am-hero-visual-media-wrap {
  animation: am-hero-visual-floating 6s ease-in-out infinite;
}
.am-section--hero.am-variant--visual.am-hero-visual--effect-parallax_soft .am-hero-visual-img {
  animation: am-hero-visual-parallax-soft 14s ease-in-out infinite alternate;
}

@keyframes am-hero-visual-kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}
@keyframes am-hero-visual-zoom {
  0%   { transform: scale(1); }
  100% { transform: scale(1.06); }
}
@keyframes am-hero-visual-floating {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes am-hero-visual-parallax-soft {
  0%   { transform: translateY(0) scale(1.02); }
  100% { transform: translateY(-2%) scale(1.05); }
}

@media (max-width: 991px) {
  .am-section--hero.am-variant--visual .am-hero-visual-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .am-section--hero.am-variant--visual.am-hero-visual--pos-left .am-hero-content,
  .am-section--hero.am-variant--visual.am-hero-visual--pos-left .am-hero-visual-media-wrap {
    order: initial;
  }
  .am-section--hero.am-variant--visual .am-hero-visual-media-wrap { max-width: 560px; margin: 0 auto; }
}

/* Header Rail mobile: riserva spazio al dock fisso senza alterare la split. */
@media (max-width: 991px) {
  body.am-has-header-rail .am-section--hero:not(.am-variant--split),
  body:has(.header-rail-mobile-dock) .am-section--hero:not(.am-variant--split) {
    padding-top: calc(var(--section_padding_top, 64px) + 24px) !important;
  }
}

/* -----------------------------------------------------
   9) Reduced motion (obbligatorio per video/carousel/visual)
----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .am-section--hero.am-variant--visual .am-hero-visual-img,
  .am-section--hero.am-variant--visual .am-hero-visual-media-wrap {
    animation: none !important;
  }
  .am-section--hero.am-variant--carousel .am-hero-carousel-nav,
  .am-section--hero.am-variant--carousel .am-hero-carousel-dot {
    transition: none;
  }
}

/*
 * Header Rail — safe area della hero media_copy.
 * La sezione resta full-width: viene corretto soltanto il container interno,
 * così testo e visual non finiscono sotto la rail compatta.
 */
@media (min-width: 992px) and (max-width: 1299px) {
  body.am-has-header-rail .am-section--hero.am-variant--media_copy > .am-container {
    box-sizing: border-box;
    width: calc(100% - 80px);
    max-width: min(var(--container_width, var(--container-width, 1200px)), calc(100% - 80px));
    margin-left: 80px;
    margin-right: 0;
  }
}
