/* Mobile fixes: prevent horizontal scroll and responsive embeds */
html, body {
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Responsive embed wrapper (16:9 by default) */
.responsive-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}
.responsive-embed > iframe,
.responsive-embed > video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Divi video box normalization */
.et_pb_video .et_pb_video_box iframe,
.et_pb_video .et_pb_video_box video {
  width: 100% !important;
  height: auto !important;
  display: block;
}
/* Hide Divi video overlay so it doesn't cover HTML5 video */
.et_pb_video .et_pb_video_overlay {
  display: none !important;
}

/* Trim unexpected bottom whitespace across pages */
#page-container,
#main-content .container {
  padding-bottom: 0 !important;
}
.et_pb_section:last-of-type,
.et_pb_section.et-last-child,
.et_pb_section:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
.et_pb_row:last-child {
  margin-bottom: 0 !important;
}
/* Hide empty footer builder wrappers if present */
.et-l--footer:empty,
#main-footer:empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Extra safeguards for hero text squeezing on phones */
@media (max-width: 767px) {
  .et_pb_section_0,
  .et_pb_row_0,
  .et_pb_row_1,
  .et_pb_row_2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .et_pb_column_0,
  .et_pb_column_1,
  .et_pb_column_2 {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .et_pb_module.et_pb_heading_0,
  .et_pb_module.et_pb_heading_1,
  .et_pb_module.et_pb_heading_2 {
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: block !important;
  }
}
