/* ============================================================
   7. HERO — SCROLL SLIDESHOW (index page)
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 80px) 0 100px;
  background: var(--fms-grad-msk); color: #fff; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(800px 500px at 90% 20%, rgba(0,70,255,.55), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(255,255,255,.05), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -40px;
  height: 380px; pointer-events: none;
  background: url('../img/pattern-fms.svg') center bottom / cover no-repeat;
  opacity: .55; mix-blend-mode: screen; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero__eyebrow { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.85); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); margin-bottom: 24px; }
.hero__h { font-size: clamp(2.5rem, 5.2vw, 4.25rem); font-weight: 700; line-height: 1.04; letter-spacing: -.025em; margin: 0; text-wrap: pretty; }
.hero__h em { font-style: normal; color: rgba(255,255,255,.55); }
.hero__payoff { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 500; line-height: 1.45; margin: 24px 0 16px; max-width: 520px; }
.hero__body { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 480px; margin: 0 0 36px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Media frame */
.hero__media {
  aspect-ratio: 4/5; border-radius: 28px; overflow: hidden;
  background: #001A30; border: 1px solid rgba(255,255,255,.12);
  position: relative; --scroll: 0;
}
.hero__media::before { content: ""; position: absolute; inset: -2px; background: conic-gradient(from 220deg, transparent 0%, rgba(0,70,255,.35) 30%, transparent 60%); border-radius: 30px; z-index: -1; filter: blur(20px); }
.hero__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(180deg, rgba(0,26,48,0) 30%, rgba(0,26,48,.7) 100%), linear-gradient(180deg, rgba(0,26,48,.25) 0%, rgba(0,26,48,0) 30%); }
.hero__slide { position: absolute; inset: 0; z-index: 1; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 0; transform: scale(var(--scl, 1.02)); transition: opacity 1.1s cubic-bezier(.4,0,.2,1), transform 1.6s cubic-bezier(.22,1,.36,1); will-change: opacity, transform; }
.hero__slide.is-active { opacity: 1; }
.hero__rail { position: absolute; top: 18px; left: 18px; right: 18px; z-index: 3; display: flex; gap: 6px; }
.hero__rail-seg { flex: 1; height: 3px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.hero__rail-seg span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #fff, rgba(255,255,255,.7)); border-radius: inherit; transition: width .3s linear; }
.hero__cap { position: absolute; top: 38px; left: 18px; z-index: 3; display: flex; align-items: center; gap: 8px; background: rgba(0,26,48,.55); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 12px 6px 8px; color: #fff; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; transition: background .3s; }
.hero__cap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fms-electric-blue); box-shadow: 0 0 0 3px rgba(0,70,255,.22), 0 0 18px rgba(0,70,255,.6); animation: heroPulse 1.6s ease-in-out infinite; }
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,70,255,.22), 0 0 14px rgba(0,70,255,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(0,70,255,.08), 0 0 24px rgba(0,70,255,.8); }
}
.hero__label { position: absolute; left: 22px; bottom: 80px; z-index: 3; color: #fff; font-family: var(--font-serif); font-style: italic; font-size: 22px; line-height: 1.1; letter-spacing: -.01em; text-shadow: 0 4px 24px rgba(0,0,0,.4); max-width: 80%; transition: opacity .35s ease, transform .55s cubic-bezier(.22,1,.36,1); }
.hero__label small { display: block; font-family: var(--font-sans); font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.hero__scroll { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.hero__scroll-bar { position: relative; width: 38px; height: 2px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.hero__scroll-bar::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--scroll) * 100%); background: #fff; transition: width .15s linear; }
.hero__media-tag { position: absolute; bottom: 18px; left: 18px; z-index: 3; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 10px 14px; font-size: 12px; color: #fff; text-align: left; }
.hero__media-tag strong { display: block; font-size: 13px; margin-bottom: 2px; }
@media (prefers-reduced-motion: reduce) { .hero__slide { transition: opacity .3s linear; } .hero__cap-dot { animation: none; } }

/* ============================================================
   FIX HERO MOBILE (Da aggiungere alla fine del CSS)
   ============================================================ */
@media (max-width: 991px) {
  .hero__inner {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }

  .hero__inner > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .hero__ctas {
    justify-content: center;
  }

  .hero__media {
    width: 100%;
    aspect-ratio: 1 / 1 !important; 
    margin-top: 16px;
  }
  
  /* Nascondiamo gli elementi secondari che creano sovrapposizioni su mobile */
  .hero__media-tag,
  .hero__scroll {
    display: none !important;
  }

  /* Riposizioniamo la scritta principale della scena pulita in basso */
  .hero__label {
    font-size: 18px !important;
    bottom: 24px !important;
    left: 20px !important;
    max-width: 85% !important;
  }
  
  .hero__label small {
    font-size: 10px !important;
  }
}