/* page_settings hero — Drupal .block-hero cover-image / cover-content parity */

#hero:not(.hero--product) {
  position: relative;
  width: 100%;
  background-color: var(--brand-yellow, #ffb447);
  margin-bottom: 1.875rem; /* 30px */
}

#hero.hero--has-image:not(.hero--product) {
  background-color: var(--brand-yellow, #ffb447);
}

#hero:not(.hero--product) .hero__cover-image {
  position: relative;
  display: block;
  width: 100%;
}

#hero:not(.hero--product) .hero__cover-image::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: 75%; /* Drupal mobile cover ratio */
  pointer-events: none;
}

@media (min-width: 639px) {
  #hero:not(.hero--product) .hero__cover-image::before {
    padding-top: 62.5%;
  }
}

#hero:not(.hero--product) .hero__cover-image-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#hero:not(.hero--product) .hero__cover-content {
  position: relative;
  width: 100%;
  padding: 2rem 0 0;
}

#hero:not(.hero--product) .hero__container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 0 5px 3.25rem;
}

#hero:not(.hero--product) .hero__text {
  max-width: 50rem;
}

#hero:not(.hero--product) .hero__text--right {
  margin-left: auto;
  text-align: right;
}

#hero:not(.hero--product) .hero__text--left {
  text-align: left;
}

#hero .hero__title {
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 2rem; /* 32px — mobile + tablet */
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

@media (min-width: 1024px) {
  #hero .hero__title {
    max-width: 650px;
    font-size: 4.6875rem; /* 75px */
    line-height: 5.3125rem; /* 85px */
  }
}

#hero .hero__description {
  margin: 0;
  padding: 0;
  font-family: "Suisse", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  color: #000;
}

#hero .hero__description :is(p) {
  margin: 0;
  font: inherit;
}

#hero .hero__description :is(p) + :is(p) {
  margin-top: 1rem;
}

#hero:not(.hero--product) .hero-cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.75rem;
}

#hero:not(.hero--product) .hero-cta-buttons--right {
  align-items: flex-end;
}

#hero:not(.hero--product) .hero-cta-buttons--left {
  align-items: flex-start;
}

#hero:not(.hero--product) .hero-cta-buttons a.btn-cws-red,
#hero:not(.hero--product) .hero-cta-buttons a.btn-black-outline {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: 1.0625rem;
  text-align: center;
}

#hero:not(.hero--product) .hero__form {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.5rem 0.8rem;
  background: #fff;
}

/* Desktop: image fills hero; copy overlays (Drupal ≥1024) */
@media (min-width: 1024px) {
  #hero:not(.hero--product) {
    display: block;
    height: max(650px, 74vh);
    min-height: max(650px, 74vh);
    overflow: hidden;
  }

  #hero.hero--no-image:not(.hero--product) {
    display: flex;
    align-items: center;
  }

  #hero.hero--has-image:not(.hero--product)::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 0.7) 40%,
      rgba(255, 255, 255, 0) 70%,
      rgba(255, 255, 255, 0.95) 95%
    );
  }

  #hero:not(.hero--product) .hero__cover-image {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  #hero:not(.hero--product) .hero__cover-image::before {
    display: none;
  }

  #hero:not(.hero--product) .hero__cover-content {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    /* Full width so .hero__container can share the site 1360px gutter
       (header nav / breadcrumbs / body). A 70% overlay + fixed margin-left
       left the copy too far left on wide viewports. */
    width: 100%;
    height: auto;
    padding: 2.5rem 0 0;
    transform: translateY(-50%);
    background: transparent;
  }

  #hero.hero--no-image:not(.hero--product) .hero__cover-content {
    position: relative;
    top: auto;
    width: 100%;
    transform: none;
    padding: 0;
  }

  #hero:not(.hero--product) .hero__container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1360px;
    margin-inline: auto;
    /* Match .hs-page-breadcrumbs__inner desktop inset (no extra 1.5rem / 4rem). */
    padding-inline: 0;
  }

  #hero:not(.hero--product) .hero__text {
    max-width: 50rem;
  }

  #hero .hero__title {
    margin: 0 0 1.875rem;
    font-size: 4.6875rem; /* 75px */
    line-height: 5.3125rem; /* 85px */
  }

  #hero .hero__description {
    padding: 0 0 3.75rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  #hero:not(.hero--product) .hero-cta-buttons {
    margin-top: 0;
  }

  #hero:not(.hero--product) .hero-cta-buttons a.btn-cws-red,
  #hero:not(.hero--product) .hero-cta-buttons a.btn-black-outline {
    width: 450px;
    max-width: 100%;
  }

  #hero:not(.hero--product) .hero__form {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* short forms centered in the column */
    width: 25%;
    margin: 0;
    padding: 2rem;
    background: #fff;
    overflow-y: auto;
    z-index: 3;
  }

  @supports (justify-content: safe center) {
    #hero:not(.hero--product) .hero__form {
      justify-content: safe center; /* tall forms: scroll from the top, no clipped start */
    }
  }

  #hero:not(.hero--product) .hero__form--right {
    right: 0;
  }

  #hero:not(.hero--product) .hero__form--left {
    left: 0;
  }

  /* Form column is nested in .hero__cover-content; stretch the overlay so
     top/bottom: 0 on .hero__form fills the capped hero instead of dangling. */
  #hero:not(.hero--product):has(#hero-hs-form) .hero__cover-content {
    top: 0;
    height: 100%;
    transform: none;
    padding-top: 0;
    display: flex;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  #hero:not(.hero--product) {
    height: max(650px, 69vh);
    min-height: max(650px, 69vh);
  }
}

#hero #hero-hs-form {
  z-index: 3;
}

/* Product PDP hero (Drupal .block-hero.firesafety + .hero-text-product) */
#hero.hero--product {
  display: flex;
  align-items: center;
  min-height: max(650px, 70vh);
  color: #000;
  font-family: "Suisse", ui-sans-serif, system-ui, sans-serif;
}

@media (min-width: 1024px) {
  #hero.hero--product {
    min-height: max(650px, 80vh);
  }
}

#hero.hero--product .hero--product__grid {
  box-sizing: border-box;
  display: grid;
  gap: 2rem;
  width: 100%;
  align-items: center;
  padding: 2.5rem 5px;
}

@media (min-width: 900px) {
  #hero.hero--product .hero--product__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
    gap: 2.5rem;
    padding: 4rem 1.5rem;
  }
}

#hero.hero--product .hero--product__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  min-width: 0;
  max-width: 40rem;
  width: 100%;
}

#hero.hero--product .hero__title {
  margin: 0;
  padding: 0;
  font-size: 2rem; /* 32px — mobile + tablet */
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

@media (min-width: 1024px) {
  #hero.hero--product .hero__title {
    font-size: 4.6875rem; /* 75px — all hero H1s */
    line-height: 5.3125rem;
  }
}

#hero.hero--product .hero__description--product,
#hero.hero--product .hero__description--product :is(p, h2, h3) {
  margin: 0;
  padding: 0;
  font-family: "Suisse", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.125rem, 2vw, 1.375rem); /* ~22px */
  font-weight: 700;
  line-height: 1.35;
  color: #000;
}

#hero.hero--product .hero-cta-buttons {
  padding-top: 0.25rem;
}

#hero.hero--product .hero--product__media {
  margin: 0;
}

#hero.hero--product .hero--product__image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

/* Migrated product body (ProductPageBuilder → full_html) */
.product-detail {
  box-sizing: border-box;
  color: #000;
  font-family: "Suisse", ui-sans-serif, system-ui, sans-serif;
}

.product-detail__layout {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .product-detail__layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 3rem;
    align-items: start;
  }
}

.product-detail__gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-detail__gallery-item {
  margin: 0;
  width: 200px;
  max-width: calc(50% - 0.375rem);
}

.product-detail__gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-detail__headline,
.product-headline {
  margin: 0 0 1rem;
  font-size: 1.0625rem; /* 17px — mobile + tablet */
  font-weight: 700;
  line-height: 1.25;
}

@media (min-width: 1024px) {
  .product-detail__headline,
  .product-headline {
    font-size: 1.875rem; /* 30px */
    line-height: 1.2;
  }
}

.product-detail__section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.product-detail__section-title:first-child {
  margin-top: 0;
}

.product-detail__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail__list li,
.product-detail__richtext :is(ul, ol) > li {
  position: relative;
  margin: 0;
  padding: 0.35rem 0 0.35rem 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.45;
}

.product-detail__list li::before,
.product-detail__richtext :is(ul, ol) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #000;
}

.product-detail__richtext :is(ul, ol) {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-detail__cta {
  margin-top: 1.5rem;
}

.product-detail__body {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

/* Match HubDB .product__description rhythm — more air between sections */
.product-detail__body :is(h2, h3, h4) {
  font-weight: 700;
  line-height: 1.2;
}

.product-detail__body h2 {
  margin: 1.875rem 0 1.25rem;
  font-size: 1.875rem; /* 30px — mobile + tablet */
  line-height: 1.2;
}

.product-detail__body h3 {
  margin: 1.75rem 0 1rem;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
}

.product-detail__body h4 {
  margin: 1.5rem 0 0.875rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

.product-detail__body :is(h2, h3, h4):first-child {
  margin-top: 0;
}

.product-detail__body :is(p, ul, ol) {
  margin: 0 0 1em;
  font-size: 1.0625rem; /* 17px */
  font-weight: 400;
  line-height: 1.65;
}

.product-detail__body :is(p, ul, ol):last-child {
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .product-detail__body h2 {
    margin: 2.375rem 0 1.5rem;
    font-size: 3.625rem; /* 58px — body H2 in text */
    line-height: 1.14;
  }

  .product-detail__body h3 {
    margin: 2rem 0 1.25rem;
  }
}

.product-detail__advantages {
  margin-top: 2rem;
}

.product-detail__related {
  margin-top: 2.5rem;
}

.product-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail__related-link {
  display: flex;
  flex-direction: column;
  color: #000;
  text-decoration: none;
}

.product-detail__related-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 0 0.75rem;
  overflow: hidden;
  /* Square mat; product photos already include their own soft gray edge */
  background-color: #efefef;
}

.product-detail__related-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-detail__related-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.product-detail__enquiry {
  scroll-margin-top: 5rem;
}

/* Align full_html product body with hero/breadcrumb horizontal inset */
.widget-type-full_html > div > .container {
  box-sizing: border-box;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .widget-type-full_html > div > .container {
    padding-inline: 1.5rem;
  }
}

/* Breadcrumb layout lives ONLY in css/style.css (.hs-page-breadcrumbs*).
   Do not redefine padding here — page-specific rules keep regressing left indent. */

#hero.hero--product .hero-cta-buttons a.btn-cws-red,
#hero.hero--product .hero-cta-buttons a.btn-black-outline {
    width: 450px;
    max-width: 100%;
    font-size: 1.125rem;
    text-align: center;
}

#hero-hs-form {
    font-family: 'Suisse', ui-sans-serif, system-ui, sans-serif;
    color: #000;
}

#hero-hs-form .hs-form,
#hero-hs-form .hs-form fieldset {
    max-width: 100% !important;
}

#hero-hs-form .hs-richtext {
    margin-bottom: 1.5rem;
}

#hero-hs-form .hs-richtext h1,
#hero-hs-form .hs-richtext h2,
#hero-hs-form .hs-richtext h3,
#hero-hs-form .hs-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    color: #000;
}

#hero-hs-form .hs-richtext p {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 1.5rem;
    color: #000;
}

#hero-hs-form .hs-form-field {
    margin-bottom: 1.75rem;
    width: 100%;
    max-width: 100% !important;
}

#hero-hs-form .hs-form-field > label,
#hero-hs-form .hs-form-field > legend {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    color: #000;
}

#hero-hs-form .hs-input:not([type='radio']):not([type='checkbox']):not([type='submit']):not([type='file']),
#hero-hs-form select.hs-input {
    display: block;
    width: 100%;
    padding: 0.4rem 0 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: #000;
    background: transparent;
    border: none;
    border-bottom: 1px solid #ebebeb;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    appearance: none;
}

#hero-hs-form textarea.hs-input {
    min-height: 3.5rem;
    resize: vertical;
}

#hero-hs-form .hs-input:not([type='radio']):not([type='checkbox']):not([type='submit']):focus,
#hero-hs-form select.hs-input:focus {
    border-bottom-color: #000;
}

#hero-hs-form .inputs-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

#hero-hs-form .inputs-list > li {
    margin: 0;
}

#hero-hs-form .hs-form-radio label,
#hero-hs-form .hs-form-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}

#hero-hs-form input[type='radio'],
#hero-hs-form input[type='checkbox'] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #a3a3a3;
    border: 1px solid #c4c4c4;
    flex-shrink: 0;
}

#hero-hs-form .hs_submit {
    margin-top: 0.5rem;
}

#hero-hs-form .hs_submit .actions {
    padding: 0;
    margin: 0;
}

#hero-hs-form input[type='submit'].hs-button,
#hero-hs-form .hs-button.primary {
    display: block;
    width: 100%;
    margin: 0;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    background-color: var(--brand-red, #eb0045);
    border: none;
    border-radius: 9999px;
    box-shadow: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

#hero-hs-form input[type='submit'].hs-button:hover,
#hero-hs-form .hs-button.primary:hover {
    opacity: 0.92;
}

#hero-hs-form .legal-consent-container,
#hero-hs-form .hs-richtext.hs-main-font-element {
    margin-top: 1rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
    color: #000;
}

#hero-hs-form .legal-consent-container a,
#hero-hs-form .hs-richtext a {
    color: inherit;
    text-decoration: underline;
}

#hero-hs-form .hs-error-msgs label {
    font-size: 0.8125rem;
    color: var(--brand-red, #eb0045);
}

/* three-quarters (span9) + one-quarter (span3) — Drupal landing-page-columns */
@media (min-width: 768px) {
  .widget-type-cell.hs-columns > .row-fluid-wrapper > .row-fluid > .widget-type-cell.span9 {
    flex: 0 0 calc(75% - 0.625rem);
    max-width: calc(75% - 0.625rem);
  }
}

/*
  text_highlight parity (Drupal .paragraph--type--text-highlight)
  Kept here because module_text_highlight.min.css sometimes fails to regenerate on upload.
*/
.hs-text-highlight__inner {
  padding: 4.375rem 1rem !important; /* 70px */
}

@media (min-width: 1024px) {
  .hs-text-highlight__inner {
    padding: 6.875rem 0 !important; /* 110px */
  }

  .hs-text-highlight__row {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0 !important;
    margin: 0 -1.5rem !important;
  }

  .hs-text-highlight__title {
    flex: 1 1 0% !important;
    max-width: none !important;
    margin: 0 1.5rem !important;
    font-size: 2.75rem !important; /* 44px */
  }

  .hs-text-highlight__description {
    flex: 2 1 0% !important;
    min-width: 0 !important;
    margin: 0 1.5rem !important;
  }
}

.hs-text-highlight__headline {
  font-size: clamp(2.75rem, 6vw, 3.625rem) !important; /* ≤58px */
  line-height: 1.1 !important;
}

.hs-text-highlight__description blockquote {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 1.875rem 0 0 !important;
  padding: 1.5rem !important;
  background-color: #f5f5f5 !important;
  border: none !important;
}

.hs-text-highlight__description blockquote > * {
  margin: 0 !important;
}

.hs-text-highlight__description a {
  color: #000 !important;
  text-decoration: underline !important;
}

.hs-text-highlight__description a:hover,
.hs-text-highlight__description a:focus {
  color: var(--brand-red, #eb0045) !important;
}
