/* Italian home: long CTA labels must never sit on the hero copy or image.
   Cookie bar is position:fixed; inset:auto 0 0 0; z-index:9999; ~16–18rem
   tall. CTAs stay in document flow above that strip (z-index below 9999 so
   the bar remains usable) and the hero image is taken out of the overlapping
   absolute desktop slot. */

html[lang="it"],
html[lang="it"] body,
html[lang="it"] .rc-home {
  overflow-x: hidden;
  max-width: 100%;
}

html[lang="it"] [data-rc-home="hero"] {
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 100%;
}

html[lang="it"] [data-rc-home="hero"] .wrap {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html[lang="it"] [data-rc-home="hero"] .rc-home-hero-copy {
  position: relative;
  z-index: 4;
  isolation: isolate;
  max-width: 40rem;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  background-image: linear-gradient(to right, #000 0%, #000 78%, transparent 100%);
}

html[lang="it"] [data-rc-home="hero"] .rc-home-hero-copy h1,
html[lang="it"] [data-rc-home="hero"] .rc-home-hero-copy p {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

html[lang="it"] [data-rc-home="hero"] .hero-blend {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-top: 1.25rem;
  z-index: 0;
  pointer-events: none;
}

html[lang="it"] [data-rc-home="hero"] .hero-blend img {
  position: relative !important;
  inset: auto !important;
}

html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta,
[data-rc-home="hero"] .rc-home-hero-cta {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 100%;
}

html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta a,
html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta .btn-primary,
html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta .btn-secondary {
  position: relative;
  z-index: 5;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Cookie bar clearance: body already pads 16–18rem, but stacked Italian
   CTAs sit lower in the first screen. Extra hero padding keeps the row
   above the fixed strip on desktop and mobile. */
html[lang="it"]:has(.rc-cookie-consent) [data-rc-home="hero"] {
  padding-bottom: 1.5rem;
}

html[lang="it"]:has(.rc-cookie-consent) [data-rc-home="hero"] .rc-home-hero-cta {
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}

@media (max-width: 640px) {
  html[lang="it"] [data-rc-home="hero"] .wrap {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
  }

  html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 100%;
  }

  html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta > :first-child {
    grid-column: 1 / -1;
  }

  html[lang="it"]:has(.rc-cookie-consent) [data-rc-home="hero"] {
    padding-bottom: 2rem;
  }

  html[lang="it"]:has(.rc-cookie-consent) [data-rc-home="hero"] .rc-home-hero-cta {
    margin-bottom: 1rem;
  }
}

@media (min-width: 640px) {
  [data-rc-home="hero"] .rc-home-hero-cta {
    flex-direction: row;
    align-items: stretch;
  }

  html[lang="it"] [data-rc-home="hero"] .rc-home-hero-cta {
    display: flex;
    flex-direction: column;
    max-width: 22rem;
  }
}

@media (min-width: 1024px) {
  html[lang="it"] [data-rc-home="hero"] .hero-blend {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin-top: 1.5rem;
  }

  html[lang="it"] [data-rc-home="hero"] .rc-home-hero-copy {
    max-width: 40rem;
  }

  html[lang="it"]:has(.rc-cookie-consent) [data-rc-home="hero"] {
    padding-bottom: 1.75rem;
  }
}
