/* I.M. Distribuzione — correzione finale Home
   Intervento esclusivamente visivo: CTA, topbar e contrasto statistiche. */

/* CTA: sempre nel flusso dell'hero, subito sotto la descrizione. */
body.im-route-main .im-home-hero-premium,
body.im-route-main .im-home-hero-final{
  min-height:0!important;
  padding-bottom:8rem!important;
  overflow:hidden!important;
}
body.im-route-main .im-home-hero-premium .im-home-hero-cta-fixed[data-im-hero-cta="true"],
body.im-route-main .im-home-hero-final .im-home-hero-cta-fixed[data-im-hero-cta="true"]{
  position:static!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:min(820px,100%)!important;
  margin:30px auto 0!important;
  padding:0!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:14px!important;
  flex-wrap:wrap!important;
  z-index:10!important;
}
body.im-route-main .im-home-hero-title-final{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:0 3px 14px rgba(0,0,0,.5)!important;
}
body.im-route-main .im-home-hero-subtitle-final{
  color:#f5fbf8!important;
  -webkit-text-fill-color:#f5fbf8!important;
  opacity:1!important;
  text-shadow:0 2px 10px rgba(0,0,0,.44)!important;
}
body.im-route-main .im-home-hero-description-final{
  color:#ecf7f2!important;
  -webkit-text-fill-color:#ecf7f2!important;
  background:transparent!important;
  opacity:1!important;
  text-shadow:0 2px 10px rgba(0,0,0,.48)!important;
}
body.im-route-main .im-home-hero-cta-fixed .im-home-cta{
  min-width:210px!important;
  min-height:54px!important;
  padding:0 24px!important;
  border-radius:15px!important;
  font-size:.96rem!important;
  font-weight:900!important;
  box-shadow:0 12px 26px rgba(4,26,35,.24)!important;
}

/* Header desktop: logo, menu e azioni in tre zone realmente giustificate. */
@media (min-width:769px){
  body.im-route-main .im-home-header-final{
    min-height:76px!important;
    background:linear-gradient(180deg,rgba(5,72,81,.98),rgba(7,91,99,.98))!important;
    border-bottom:1px solid rgba(255,255,255,.14)!important;
    box-shadow:0 8px 24px rgba(4,34,41,.16)!important;
  }
  body.im-route-main .im-home-header-shell-final{
    width:min(1280px,calc(100vw - 32px))!important;
    max-width:1280px!important;
    margin:0 auto!important;
    padding:0 16px!important;
  }
  body.im-route-main .im-home-header-row-final{
    min-height:76px!important;
    height:auto!important;
    display:grid!important;
    grid-template-columns:minmax(220px,260px) minmax(470px,1fr) minmax(190px,230px)!important;
    align-items:center!important;
    justify-content:stretch!important;
    gap:22px!important;
  }
  body.im-route-main .im-home-brand-final{
    justify-self:start!important;
    min-width:0!important;
    margin:0!important;
  }
  body.im-route-main .im-home-nav-final{
    justify-self:center!important;
    width:100%!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    gap:10px!important;
    margin:0!important;
  }
  body.im-route-main .im-home-nav-final .im-nav-button-fix{
    flex:0 1 auto!important;
    min-width:112px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 15px!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.1)!important;
    border:1px solid rgba(255,255,255,.16)!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    box-shadow:none!important;
  }
  body.im-route-main .im-home-nav-final .im-nav-button-fix:hover,
  body.im-route-main .im-home-nav-final .im-nav-button-fix[aria-current="page"]{
    background:rgba(255,255,255,.18)!important;
    border-color:rgba(255,255,255,.28)!important;
  }
  body.im-route-main .im-home-header-actions-final{
    justify-self:end!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    margin:0!important;
  }
  body.im-route-main .im-home-header-actions-final > .im-nav-button-fix,
  body.im-route-main .im-home-header-actions-final > a > .im-nav-button-fix{
    height:46px!important;
    min-height:46px!important;
    padding:0 15px!important;
    border-radius:13px!important;
  }
}

@media (min-width:769px) and (max-width:1180px){
  body.im-route-main .im-home-header-row-final{
    grid-template-columns:minmax(190px,220px) minmax(420px,1fr) minmax(170px,205px)!important;
    gap:12px!important;
  }
  body.im-route-main .im-home-nav-final{
    gap:6px!important;
  }
  body.im-route-main .im-home-nav-final .im-nav-button-fix{
    min-width:0!important;
    padding:0 11px!important;
    font-size:13px!important;
  }
}

/* Mobile: manteniamo il menu nativo a scomparsa e non forziamo la nav desktop. */
@media (max-width:768px){
  body.im-route-main .im-home-header-row-final{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
  }
  body.im-route-main .im-home-nav-final{
    display:none!important;
  }
  body.im-route-main .im-home-header-actions-final{
    margin-left:auto!important;
  }
  body.im-route-main .im-home-hero-premium,
  body.im-route-main .im-home-hero-final{
    padding-bottom:5rem!important;
  }
  body.im-route-main .im-home-hero-premium .im-home-hero-cta-fixed[data-im-hero-cta="true"],
  body.im-route-main .im-home-hero-final .im-home-hero-cta-fixed[data-im-hero-cta="true"]{
    width:min(420px,100%)!important;
    margin-top:24px!important;
    flex-direction:column!important;
  }
  body.im-route-main .im-home-hero-cta-fixed .im-home-cta{
    width:100%!important;
    min-width:0!important;
  }
}

/* Statistiche: contrasto elevato e gerarchia leggibile. */
body.im-route-main .im-home-stats-final{
  padding:64px 0!important;
  background:linear-gradient(135deg,#edf6f2 0%,#dceee7 100%)!important;
  border-top:1px solid rgba(8,91,74,.14)!important;
  border-bottom:1px solid rgba(8,91,74,.14)!important;
  color:#153e35!important;
}
body.im-route-main .im-home-stats-shell-final{
  width:min(1160px,calc(100vw - 32px))!important;
  max-width:1160px!important;
  margin:0 auto!important;
  padding:0!important;
}
body.im-route-main .im-home-stats-grid-final{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:24px!important;
}
body.im-route-main .im-home-stat-card-final{
  min-height:190px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  padding:28px 20px!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.76)!important;
  border:1px solid rgba(10,104,83,.16)!important;
  box-shadow:0 14px 32px rgba(22,77,64,.1)!important;
  color:#153e35!important;
  opacity:1!important;
}
body.im-route-main .im-home-stat-icon-final{
  width:58px!important;
  height:58px!important;
  margin-bottom:16px!important;
  border-radius:16px!important;
  background:#e1f1e9!important;
  border:1px solid rgba(15,138,88,.22)!important;
  color:#0f8a58!important;
  opacity:1!important;
}
body.im-route-main .im-home-stat-icon-final svg{
  color:#0f8a58!important;
  stroke:#0f8a58!important;
  opacity:1!important;
}
body.im-route-main .im-home-stat-number-final{
  color:#123f34!important;
  -webkit-text-fill-color:#123f34!important;
  opacity:1!important;
  text-shadow:none!important;
  font-weight:950!important;
}
body.im-route-main .im-home-stat-label-final{
  color:#315b51!important;
  -webkit-text-fill-color:#315b51!important;
  opacity:1!important;
  text-shadow:none!important;
  font-weight:800!important;
}
@media (max-width:760px){
  body.im-route-main .im-home-stats-grid-final{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  body.im-route-main .im-home-stat-card-final{
    min-height:160px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  body.im-route-main .im-home-hero-cta-fixed .im-home-cta,
  body.im-route-main .im-home-stat-card-final{
    transition:none!important;
  }
}

@media (min-width:769px) and (max-width:980px){
  body.im-route-main .im-home-header-shell-final{
    width:calc(100vw - 20px)!important;
    padding:0 8px!important;
  }
  body.im-route-main .im-home-header-row-final{
    grid-template-columns:minmax(160px,180px) minmax(350px,1fr) minmax(145px,170px)!important;
    gap:8px!important;
  }
  body.im-route-main .im-home-brand-final{
    gap:7px!important;
  }
  body.im-route-main .im-home-brand-final img{
    width:36px!important;
    height:36px!important;
  }
  body.im-route-main .im-home-brand-final span:first-child{
    font-size:14px!important;
  }
  body.im-route-main .im-home-nav-final{
    gap:3px!important;
  }
  body.im-route-main .im-home-nav-final .im-nav-button-fix{
    min-width:0!important;
    padding:0 7px!important;
    font-size:11.5px!important;
    gap:5px!important;
  }
  body.im-route-main .im-home-nav-final .im-nav-button-fix svg{
    width:14px!important;
    height:14px!important;
  }
  body.im-route-main .im-home-header-actions-final{
    gap:5px!important;
  }
  body.im-route-main .im-home-header-actions-final .im-nav-button-fix{
    padding:0 9px!important;
    font-size:12px!important;
  }
}
