/*
 * Ecrio inner-page hero — Home-style override
 * Loaded only on Products, Partners, Newsroom and Company.
 */

#hero {
  width: 100% !important;
  min-height: 0 !important;
  padding: 92px 18px 18px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  background: #fff !important;
}

#hero::before,
#hero::after {
  display: none !important;
}

#hero > .container {
  position: relative !important;
  width: 100% !important;
  max-width: 1720px !important;
  margin: 0 auto !important;
  padding: clamp(18px, 2vw, 34px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7fc 100%) !important;
}

#hero > .container > .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(24px, 3vw, 64px) !important;
  margin: 0 !important;
  --bs-gutter-x: 0 !important;
}

/* Desktop: image LEFT, text card RIGHT — same composition as Home. */
@media (min-width: 992px) {
  #hero > .container > .row > .d-flex.flex-column {
    order: 2 !important;
    flex: 0 1 44% !important;
    width: 44% !important;
    max-width: 640px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  #hero > .container > .row > [class*="col-lg-"]:not(.d-flex) {
    order: 1 !important;
    flex: 1 1 56% !important;
    width: 56% !important;
    max-width: 900px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
}

/* Home-style white copy card. Also neutralizes old clip/transform rules. */
#hero .text-animation,
#hero .text-animation.alter {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 640px !important;
  min-width: 0 !important;
  min-height: clamp(360px, 28vw, 540px) !important;
  margin: 0 auto !important;
  padding: clamp(28px, 3vw, 52px) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  clip-path: none !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  text-align: left !important;
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(204, 217, 233, .9) !important;
  border-radius: 28px !important;
  box-shadow: 0 18px 48px rgba(15, 54, 96, .09) !important;
}

#hero .text-animation h1,
#hero .text-animation.alter h1 {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-wrap: balance;
  color: #0b1a45 !important;
  font-size: clamp(34px, 2.8vw, 54px) !important;
  line-height: 1.06 !important;
  letter-spacing: -.025em !important;
  font-weight: 700 !important;
  text-align: left !important;
}

#hero .text-animation p,
#hero .text-animation.alter p,
#hero .mobile-font {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #5c6f92 !important;
  font-size: clamp(17px, 1.1vw, 21px) !important;
  line-height: 1.55 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}

/* Home-style visual card. */
#hero #productcarousel,
#hero .product-banner1,
#hero .product-banner2 {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 900px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: clamp(14px, 1.4vw, 24px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transform: none !important;
  border: 1px solid rgba(204, 217, 233, .72) !important;
  border-radius: 26px !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 12px 38px rgba(15, 54, 96, .07) !important;
}

#hero #productcarousel .owl-stage-outer,
#hero #productcarousel .owl-stage,
#hero #productcarousel .owl-item,
#hero #productcarousel .item {
  max-width: 100% !important;
}

#hero #productcarousel img,
#hero .product-banner1 > img,
#hero .product-banner2 > img {
  display: block !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(320px, 31vw, 520px) !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

/* Remove the old hero decorations that do not exist on the new Home hero. */
#hero .product-shape,
#hero .tech-shape,
#hero .news-img-1,
#hero .news-img-2,
#hero .news-img-3,
#hero .company-img-1,
#hero .company-img-2,
#hero .company-img-3,
#hero .company-img-4,
#hero .company-img-5 {
  display: none !important;
}

/* Company CTA alignment inside the copy card. */
#hero .text-animation .text-center,
#hero .text-animation .text-lg-start {
  text-align: left !important;
}

#hero .text-animation .ebtn {
  margin-top: 22px !important;
}

/* Tablet/mobile: scale together and stack image first, text second. */
@media (max-width: 991.98px) {
  #hero {
    padding: 78px 14px 14px !important;
  }

  #hero > .container {
    max-width: 760px !important;
    padding: 18px !important;
    border-radius: 20px !important;
  }

  #hero > .container > .row {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
  }

  #hero > .container > .row > [class*="col-"] {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  #hero > .container > .row > [class*="col-"]:not(.d-flex) {
    order: 1 !important;
  }

  #hero > .container > .row > .d-flex.flex-column {
    order: 2 !important;
  }

  #hero #productcarousel,
  #hero .product-banner1,
  #hero .product-banner2 {
    display: block !important;
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  #hero #productcarousel img,
  #hero .product-banner1 > img,
  #hero .product-banner2 > img {
    width: 100% !important;
    height: auto !important;
    max-height: 390px !important;
  }

  #hero .text-animation,
  #hero .text-animation.alter {
    width: 100% !important;
    max-width: 620px !important;
    min-height: 0 !important;
    padding: 28px 24px !important;
  }

  #hero .text-animation h1,
  #hero .text-animation.alter h1 {
    font-size: clamp(30px, 5.8vw, 44px) !important;
  }
}

@media (max-width: 575.98px) {
  #hero {
    padding: 70px 8px 10px !important;
  }

  #hero > .container {
    padding: 10px !important;
    border-radius: 16px !important;
  }

  #hero > .container > .row {
    gap: 14px !important;
  }

  #hero #productcarousel,
  #hero .product-banner1,
  #hero .product-banner2 {
    padding: 8px !important;
    border-radius: 18px !important;
  }

  #hero #productcarousel img,
  #hero .product-banner1 > img,
  #hero .product-banner2 > img {
    max-height: 300px !important;
  }

  #hero .text-animation,
  #hero .text-animation.alter {
    padding: 22px 18px !important;
    border-radius: 20px !important;
  }

  #hero .text-animation h1,
  #hero .text-animation.alter h1 {
    font-size: clamp(27px, 8vw, 36px) !important;
    line-height: 1.08 !important;
  }

  #hero .text-animation p,
  #hero .text-animation.alter p,
  #hero .mobile-font {
    font-size: 15px !important;
    line-height: 1.42 !important;
  }
}
