/* Sintergy template refinements added during final Joomla 6 QA. */

/* The legacy thumbnail wrapper used percentage padding. Remove that padding for
   the live iframe so the 16:9 height is not counted twice. */
.sintergy-home-video.sintergy-video-embed {
  aspect-ratio: 16 / 9;
  padding-top: 0 !important;
}

.sintergy-home-video.sintergy-video-embed > iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}

/* Resolve the shared article hero from the template stylesheet so it works at
   every SEF route depth on staging and after the production-domain cutover. */
html body.com-content.view-article .article-details > .article-details-intro {
  background-image:
    linear-gradient(90deg, rgba(12, 20, 23, 0.88) 0%, rgba(12, 20, 23, 0.68) 52%, rgba(12, 20, 23, 0.82) 100%),
    url('../../../images/sintergy/sintergy-inside-hero-v1-web.jpg') !important;
}

/* Native category/blog and contact layouts use different title markup. Give
   those inside pages the same full-width hero treatment as articles/forms. */
body.com-content.view-category #sp-main-body,
body.com-contact.view-contact #sp-main-body {
  padding-top: 0 !important;
}

body.com-content.view-category .blog-list-wrapper {
  margin-top: 0 !important;
}

body.com-content.view-category .blog-list-wrapper > .page-header,
body.com-contact.view-contact #sp-component > .sp-column > .com-contact > h1 {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 360px;
  margin: 0 calc(50% - 50vw) 64px !important;
  padding: 90px max(24px, calc((100vw - 1320px) / 2)) 120px !important;
  color: #fff !important;
  font-size: clamp(2.5rem, 5vw, 4.75rem) !important;
  line-height: 1.08 !important;
  background-color: #151f22;
  background-image:
    linear-gradient(90deg, rgba(12, 20, 23, 0.88) 0%, rgba(12, 20, 23, 0.68) 52%, rgba(12, 20, 23, 0.82) 100%),
    url('../../../images/sintergy/sintergy-inside-hero-v1-web.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.com-content.view-category .blog-list-wrapper > .page-header > h1 {
  margin: 0;
  color: inherit !important;
  font: inherit !important;
}

/* Joomla 6 RSForm pages: match the Sintergy inside-page hero and brand styling. */
body.com-rsform.view-rsform #sp-main-body {
  padding-top: 0 !important;
  padding-bottom: 90px !important;
}

body.com-rsform.view-rsform #sp-component > .sp-column > h1 {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 360px;
  margin: 0 calc(50% - 50vw) 64px !important;
  padding: 90px max(24px, calc((100vw - 1320px) / 2)) 120px !important;
  color: #fff !important;
  font-size: clamp(2.5rem, 5vw, 4.75rem) !important;
  line-height: 1.08 !important;
  background-color: #151f22;
  background-image:
    linear-gradient(90deg, rgba(12, 20, 23, 0.88) 0%, rgba(12, 20, 23, 0.68) 52%, rgba(12, 20, 23, 0.82) 100%),
    url('../../../images/sintergy/sintergy-inside-hero-v1-web.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.com-rsform.view-rsform .formRequired {
  color: #ec2028;
}

body.com-rsform.view-rsform .rsform-submit-button,
body.com-rsform.view-rsform button[type='submit'] {
  border-color: #ec2028 !important;
  background: #ec2028 !important;
  color: #fff !important;
}

body.com-rsform.view-rsform .rsform-submit-button:hover,
body.com-rsform.view-rsform .rsform-submit-button:focus,
body.com-rsform.view-rsform button[type='submit']:hover,
body.com-rsform.view-rsform button[type='submit']:focus {
  border-color: #c71920 !important;
  background: #c71920 !important;
}

body.com-rsform.view-rsform .formResponsive table {
  max-width: 100%;
}

/* Related Articles: remove the template-generated publication date row. */
.related-article-list-container .article-info {
  display: none !important;
}

@media (max-width: 767.98px) {
  body.com-content.view-category .blog-list-wrapper > .page-header,
  body.com-contact.view-contact #sp-component > .sp-column > .com-contact > h1 {
    min-height: 240px;
    margin-bottom: 40px !important;
    padding: 64px 24px 72px !important;
    font-size: clamp(2.25rem, 12vw, 3.5rem) !important;
  }

  body.com-rsform.view-rsform #sp-main-body {
    padding-bottom: 56px !important;
  }

  body.com-rsform.view-rsform #sp-component > .sp-column > h1 {
    min-height: 240px;
    margin-bottom: 40px !important;
    padding: 64px 24px 72px !important;
    font-size: clamp(2.25rem, 12vw, 3.5rem) !important;
  }

  body.com-rsform.view-rsform .form-group.row > .formControlLabel,
  body.com-rsform.view-rsform .form-group.row > .formControls {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  body.com-rsform.view-rsform .formControlLabel {
    margin-bottom: 0.45rem;
  }
}

/* Sintergy translated desktop navigation fit */
@media (min-width: 1200px) {
  #sp-header .sp-megamenu-parent > li > a {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  #sp-header .sp-megamenu-parent > li:last-child > a {
    padding-left: 12px !important;
    padding-right: 0 !important;
  }
}

/* Keep desktop dropdowns above the language bar so hover remains continuous. */
@media (min-width: 992px) {
  #sp-header .sp-megamenu-parent {
    z-index: 980 !important;
  }

  #sp-header .sp-megamenu-parent .sp-dropdown {
    z-index: 990 !important;
  }
}
