/* ---------- SAFETY: stop any horizontal overflow inside this module ---------- */
#hs_cos_wrapper_,
#hs_cos_wrapper_ .clean-base {
  max-width: 100%;
  overflow-x: hidden;
}

/* Make headings in this module never exceed viewport */
#hs_cos_wrapper_ h1,
#hs_cos_wrapper_ h2,
#hs_cos_wrapper_ h3,
#hs_cos_wrapper_ h4,
#hs_cos_wrapper_ h5,
#hs_cos_wrapper_ h6 {
  max-width: 100%;
  overflow-wrap: anywhere; /* strongest wrap */
  word-break: break-word;
}

/* Desktop padding is fine */
.magic_module-column-header {
  padding-right: 20px;
}

/* ---------- HERO HEADER BASE (ALL SIZES) ---------- */
/* If your header is in rich text, keep it fluid */
.hero-section_header .hs_cos_wrapper_type_inline_rich_text,
.hero-section_header h1,
.hero-section_header h2,
.hero-section_header h3,
.hero-section_header h4 {
  max-width: 470px;
  margin-top: 50px;
  margin-bottom: 110px;
}

/* ---------- MOBILE OVERRIDES ---------- */
@media (max-width: 768px) {

  /* Reset wrapper spacing on mobile */
  .hero-section_header .hs_cos_wrapper_type_inline_rich_text,
  .hero-section_header h1,
  .hero-section_header h2,
  .hero-section_header h3,
  .hero-section_header h4,
  .hs_cos_wrapper_type_inline_rich_text.hero-section_header {
    max-width: 100%;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    padding-bottom: 0 !important;
  }

  /* IMPORTANT: override the inline h4 styles */
  #hs_cos_wrapper_ h4.magic_module-column-header,
#hs_cos_wrapper_ .magic_module-column-header {
  font-size: clamp(32px, 8vw, 54px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
  max-width: 100% !important;
  width: 100% !important;
  display: block !important;
  white-space: normal !important;
  hyphens: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

  /* Style the span text but keep it safe */
  #hs_cos_wrapper_ .magic_module-column-header {
    width: 100%;
    text-align: center !important;

    font-family: "Items Text Trial", "Items Text", sans-serif !important;
    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;

    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100%;
  }

  /* Ensure any inner elements also wrap */
  #hs_cos_wrapper_ .magic_module-column-header * {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center !important;
  }
  /* RESET absolute positioning on mobile to prevent overflow */
#hs_cos_wrapper_ .c-content-con,
#hs_cos_wrapper_ .c-content-con.c-dblock {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  max-width: 100% !important;
}
  @media (max-width: 768px) {
  #hs_cos_wrapper_ .c-col,
  #hs_cos_wrapper_ .c-col-inner,
  #hs_cos_wrapper_ .c-rich-text,
  #hs_cos_wrapper_ .c-rich-text * {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}