/*
 * Ecrio unified inner-page hero
 * Products, Partners, Newsroom and Company
 */

body.page-template-products #hero.products-page,
body.page-template-page-templates-products-php #hero.products-page,
body.page-template-partners #hero.technologypage,
body.page-template-page-templates-partners-php #hero.technologypage,
body.page-template-news #hero.technologypage,
body.page-template-page-templates-news-php #hero.technologypage,
body.page-template-about #hero.aboutpage,
body.page-template-page-templates-about-php #hero.aboutpage {
  position: relative;
  min-height: 560px;
  padding: clamp(104px, 7vw, 132px) 0 clamp(46px, 4.5vw, 76px);
  overflow: hidden;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5fb 58%, #f7fbff 100%) !important;
}

body.page-template-products #hero.products-page::before,
body.page-template-page-templates-products-php #hero.products-page::before,
body.page-template-partners #hero.technologypage::before,
body.page-template-page-templates-partners-php #hero.technologypage::before,
body.page-template-news #hero.technologypage::before,
body.page-template-page-templates-news-php #hero.technologypage::before,
body.page-template-about #hero.aboutpage::before,
body.page-template-page-templates-about-php #hero.aboutpage::before {
  content: '';
  position: absolute;
  width: min(44vw, 720px);
  aspect-ratio: 1;
  right: -13vw;
  top: -24vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 150, 255, .12) 0%, rgba(73, 150, 255, 0) 70%);
  pointer-events: none;
}

body.page-template-products #hero .container,
body.page-template-page-templates-products-php #hero .container,
body.page-template-partners #hero .container,
body.page-template-page-templates-partners-php #hero .container,
body.page-template-news #hero .container,
body.page-template-page-templates-news-php #hero .container,
body.page-template-about #hero .container,
body.page-template-page-templates-about-php #hero .container {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1440px);
  max-width: 1440px;
  padding-left: 0;
  padding-right: 0;
}

body.page-template-products #hero .row,
body.page-template-page-templates-products-php #hero .row,
body.page-template-partners #hero .row,
body.page-template-page-templates-partners-php #hero .row,
body.page-template-news #hero .row,
body.page-template-page-templates-news-php #hero .row,
body.page-template-about #hero .row,
body.page-template-page-templates-about-php #hero .row {
  align-items: center;
  justify-content: space-between;
  --bs-gutter-x: clamp(34px, 5vw, 84px);
}

/* Normalize desktop column proportions without requiring template changes. */
@media (min-width: 992px) {
  body.page-template-products #hero .row > .col-lg-7,
  body.page-template-page-templates-products-php #hero .row > .col-lg-7 {
    flex: 0 0 48%;
    max-width: 48%;
  }

  body.page-template-products #hero .row > .col-lg-5,
  body.page-template-page-templates-products-php #hero .row > .col-lg-5 {
    flex: 0 0 52%;
    max-width: 52%;
  }

  body.page-template-partners #hero .row > .col-lg-6,
  body.page-template-page-templates-partners-php #hero .row > .col-lg-6,
  body.page-template-news #hero .row > .col-lg-6,
  body.page-template-page-templates-news-php #hero .row > .col-lg-6,
  body.page-template-about #hero .row > .col-lg-6,
  body.page-template-page-templates-about-php #hero .row > .col-lg-6 {
    flex: 0 0 48%;
    max-width: 48%;
  }

  body.page-template-partners #hero .row > .col-lg-5,
  body.page-template-page-templates-partners-php #hero .row > .col-lg-5,
  body.page-template-news #hero .row > .col-lg-5,
  body.page-template-page-templates-news-php #hero .row > .col-lg-5 {
    flex: 0 0 52%;
    max-width: 52%;
  }
}

/* Consistent copy treatment. */
body.page-template-products #hero .text-animation,
body.page-template-page-templates-products-php #hero .text-animation,
body.page-template-partners #hero .text-animation,
body.page-template-page-templates-partners-php #hero .text-animation,
body.page-template-news #hero .text-animation,
body.page-template-page-templates-news-php #hero .text-animation,
body.page-template-about #hero .text-animation,
body.page-template-page-templates-about-php #hero .text-animation {
  position: static !important;
  width: 100% !important;
  max-width: 650px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

body.page-template-products #hero .text-animation h1,
body.page-template-page-templates-products-php #hero .text-animation h1,
body.page-template-partners #hero .text-animation h1,
body.page-template-page-templates-partners-php #hero .text-animation h1,
body.page-template-news #hero .text-animation h1,
body.page-template-page-templates-news-php #hero .text-animation h1,
body.page-template-about #hero .text-animation h1,
body.page-template-page-templates-about-php #hero .text-animation h1 {
  margin: 0 0 20px !important;
  padding: 0 !important;
  color: #0f2346 !important;
  font-size: clamp(42px, 4vw, 68px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em;
  text-align: left !important;
  text-wrap: balance;
}

body.page-template-products #hero .text-animation p,
body.page-template-page-templates-products-php #hero .text-animation p,
body.page-template-partners #hero .text-animation p,
body.page-template-page-templates-partners-php #hero .text-animation p,
body.page-template-news #hero .text-animation p,
body.page-template-page-templates-news-php #hero .text-animation p,
body.page-template-about #hero .text-animation p,
body.page-template-page-templates-about-php #hero .text-animation p {
  margin: 0 0 26px !important;
  max-width: 620px;
  color: #5c6f92 !important;
  font-size: clamp(18px, 1.35vw, 22px) !important;
  line-height: 1.6 !important;
  text-align: left !important;
}

/* One visual language for the right-side image/carousel panel. */
body.page-template-products #hero #productcarousel,
body.page-template-page-templates-products-php #hero #productcarousel,
body.page-template-partners #hero .product-banner1,
body.page-template-page-templates-partners-php #hero .product-banner1,
body.page-template-news #hero .product-banner1,
body.page-template-page-templates-news-php #hero .product-banner1,
body.page-template-about #hero .product-banner2,
body.page-template-page-templates-about-php #hero .product-banner2 {
  position: relative !important;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(16px, 1.7vw, 26px);
  overflow: hidden;
  border: 1px solid rgba(197, 213, 232, .82);
  border-radius: 28px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 48px rgba(23, 63, 108, .10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

body.page-template-products #hero #productcarousel img,
body.page-template-page-templates-products-php #hero #productcarousel img,
body.page-template-partners #hero .product-banner1 > img,
body.page-template-page-templates-partners-php #hero .product-banner1 > img,
body.page-template-news #hero .product-banner1 > img,
body.page-template-page-templates-news-php #hero .product-banner1 > img,
body.page-template-about #hero .product-banner2 > img,
body.page-template-page-templates-about-php #hero .product-banner2 > img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(300px, 30vw, 455px) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Remove the legacy floating decorative hero artwork on Newsroom and Company. */
body.page-template-news #hero .news-img-1,
body.page-template-news #hero .news-img-2,
body.page-template-news #hero .news-img-3,
body.page-template-page-templates-news-php #hero .news-img-1,
body.page-template-page-templates-news-php #hero .news-img-2,
body.page-template-page-templates-news-php #hero .news-img-3,
body.page-template-about #hero .company-img-1,
body.page-template-about #hero .company-img-2,
body.page-template-about #hero .company-img-3,
body.page-template-about #hero .company-img-4,
body.page-template-about #hero .company-img-5,
body.page-template-page-templates-about-php #hero .company-img-1,
body.page-template-page-templates-about-php #hero .company-img-2,
body.page-template-page-templates-about-php #hero .company-img-3,
body.page-template-page-templates-about-php #hero .company-img-4,
body.page-template-page-templates-about-php #hero .company-img-5 {
  display: none !important;
}

/* Remove legacy decorative hero shapes that interfere with the shared layout. */
body.page-template-products #hero .product-shape,
body.page-template-page-templates-products-php #hero .product-shape,
body.page-template-about #hero .tech-shape,
body.page-template-page-templates-about-php #hero .tech-shape {
  display: none !important;
}

@media (max-width: 991.98px) {
  body.page-template-products #hero.products-page,
  body.page-template-page-templates-products-php #hero.products-page,
  body.page-template-partners #hero.technologypage,
  body.page-template-page-templates-partners-php #hero.technologypage,
  body.page-template-news #hero.technologypage,
  body.page-template-page-templates-news-php #hero.technologypage,
  body.page-template-about #hero.aboutpage,
  body.page-template-page-templates-about-php #hero.aboutpage {
    min-height: 0;
    padding: 90px 0 34px;
  }

  body.page-template-products #hero .container,
  body.page-template-page-templates-products-php #hero .container,
  body.page-template-partners #hero .container,
  body.page-template-page-templates-partners-php #hero .container,
  body.page-template-news #hero .container,
  body.page-template-page-templates-news-php #hero .container,
  body.page-template-about #hero .container,
  body.page-template-page-templates-about-php #hero .container {
    width: min(100% - 28px, 760px);
  }

  body.page-template-products #hero .row,
  body.page-template-page-templates-products-php #hero .row,
  body.page-template-partners #hero .row,
  body.page-template-page-templates-partners-php #hero .row,
  body.page-template-news #hero .row,
  body.page-template-page-templates-news-php #hero .row,
  body.page-template-about #hero .row,
  body.page-template-page-templates-about-php #hero .row {
    display: flex;
    flex-direction: column;
    gap: 26px;
  }

  /* Visual first, copy second on tablet/mobile. */
  body.page-template-products #hero .row > :last-child,
  body.page-template-page-templates-products-php #hero .row > :last-child,
  body.page-template-partners #hero .row > :last-child,
  body.page-template-page-templates-partners-php #hero .row > :last-child,
  body.page-template-news #hero .row > :last-child,
  body.page-template-page-templates-news-php #hero .row > :last-child,
  body.page-template-about #hero .row > :last-child,
  body.page-template-page-templates-about-php #hero .row > :last-child {
    order: 1 !important;
    width: 100%;
    max-width: 100%;
  }

  body.page-template-products #hero .row > :first-child,
  body.page-template-page-templates-products-php #hero .row > :first-child,
  body.page-template-partners #hero .row > :first-child,
  body.page-template-page-templates-partners-php #hero .row > :first-child,
  body.page-template-news #hero .row > :first-child,
  body.page-template-page-templates-news-php #hero .row > :first-child,
  body.page-template-about #hero .row > :first-child,
  body.page-template-page-templates-about-php #hero .row > :first-child {
    order: 2 !important;
    width: 100%;
    max-width: 100%;
  }

  body.page-template-products #hero #productcarousel,
  body.page-template-page-templates-products-php #hero #productcarousel,
  body.page-template-partners #hero .product-banner1,
  body.page-template-page-templates-partners-php #hero .product-banner1,
  body.page-template-news #hero .product-banner1,
  body.page-template-page-templates-news-php #hero .product-banner1,
  body.page-template-about #hero .product-banner2,
  body.page-template-page-templates-about-php #hero .product-banner2 {
    max-width: 620px;
    border-radius: 22px;
    padding: 14px;
  }

  body.page-template-products #hero #productcarousel img,
  body.page-template-page-templates-products-php #hero #productcarousel img,
  body.page-template-partners #hero .product-banner1 > img,
  body.page-template-page-templates-partners-php #hero .product-banner1 > img,
  body.page-template-news #hero .product-banner1 > img,
  body.page-template-page-templates-news-php #hero .product-banner1 > img,
  body.page-template-about #hero .product-banner2 > img,
  body.page-template-page-templates-about-php #hero .product-banner2 > img {
    height: auto !important;
    max-height: 390px;
  }

  body.page-template-products #hero .text-animation,
  body.page-template-page-templates-products-php #hero .text-animation,
  body.page-template-partners #hero .text-animation,
  body.page-template-page-templates-partners-php #hero .text-animation,
  body.page-template-news #hero .text-animation,
  body.page-template-page-templates-news-php #hero .text-animation,
  body.page-template-about #hero .text-animation,
  body.page-template-page-templates-about-php #hero .text-animation {
    max-width: 620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page-template-products #hero .text-animation h1,
  body.page-template-page-templates-products-php #hero .text-animation h1,
  body.page-template-partners #hero .text-animation h1,
  body.page-template-page-templates-partners-php #hero .text-animation h1,
  body.page-template-news #hero .text-animation h1,
  body.page-template-page-templates-news-php #hero .text-animation h1,
  body.page-template-about #hero .text-animation h1,
  body.page-template-page-templates-about-php #hero .text-animation h1 {
    font-size: clamp(34px, 6.8vw, 48px) !important;
  }
}

@media (max-width: 575.98px) {
  body.page-template-products #hero.products-page,
  body.page-template-page-templates-products-php #hero.products-page,
  body.page-template-partners #hero.technologypage,
  body.page-template-page-templates-partners-php #hero.technologypage,
  body.page-template-news #hero.technologypage,
  body.page-template-page-templates-news-php #hero.technologypage,
  body.page-template-about #hero.aboutpage,
  body.page-template-page-templates-about-php #hero.aboutpage {
    padding-top: 76px;
  }

  body.page-template-products #hero .container,
  body.page-template-page-templates-products-php #hero .container,
  body.page-template-partners #hero .container,
  body.page-template-page-templates-partners-php #hero .container,
  body.page-template-news #hero .container,
  body.page-template-page-templates-news-php #hero .container,
  body.page-template-about #hero .container,
  body.page-template-page-templates-about-php #hero .container {
    width: min(100% - 20px, 520px);
  }

  body.page-template-products #hero #productcarousel,
  body.page-template-page-templates-products-php #hero #productcarousel,
  body.page-template-partners #hero .product-banner1,
  body.page-template-page-templates-partners-php #hero .product-banner1,
  body.page-template-news #hero .product-banner1,
  body.page-template-page-templates-news-php #hero .product-banner1,
  body.page-template-about #hero .product-banner2,
  body.page-template-page-templates-about-php #hero .product-banner2 {
    padding: 10px;
    border-radius: 18px;
  }

  body.page-template-products #hero .text-animation h1,
  body.page-template-page-templates-products-php #hero .text-animation h1,
  body.page-template-partners #hero .text-animation h1,
  body.page-template-page-templates-partners-php #hero .text-animation h1,
  body.page-template-news #hero .text-animation h1,
  body.page-template-page-templates-news-php #hero .text-animation h1,
  body.page-template-about #hero .text-animation h1,
  body.page-template-page-templates-about-php #hero .text-animation h1 {
    margin-bottom: 14px !important;
    font-size: clamp(30px, 10vw, 40px) !important;
  }

  body.page-template-products #hero .text-animation p,
  body.page-template-page-templates-products-php #hero .text-animation p,
  body.page-template-partners #hero .text-animation p,
  body.page-template-page-templates-partners-php #hero .text-animation p,
  body.page-template-news #hero .text-animation p,
  body.page-template-page-templates-news-php #hero .text-animation p,
  body.page-template-about #hero .text-animation p,
  body.page-template-page-templates-about-php #hero .text-animation p {
    margin-bottom: 20px !important;
    font-size: 17px !important;
    line-height: 1.5 !important;
  }
}
