/* Home page mobile: paired content, consistent images, clear section breaks */
@media (max-width: 767px) {
  .home-page-wrap .home_main_top .dnd_area-row-3-padding,
  .home-page-wrap .home_main_top .dnd_area-row-4-padding {
    display: none !important;
  }

  /* ── Feature rows: stack columns, text before image where needed ── */
  .home-page-wrap .content-with-image [class*="-vertical-alignment"] > .row-fluid,
  .home-page-wrap .home-page-section:not(.content-with-image) [class*="dnd_area_bottom-row-0-vertical-alignment"] > .row-fluid,
  .home-page-wrap .content-with-image [class*="dnd_area_middle-row"][class*="-vertical-alignment"] > .row-fluid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .home-page-wrap .content-with-image .span6,
  .home-page-wrap .home-page-section [class*="dnd_area_bottom-row-0-vertical-alignment"] .span6 {
    float: none;
    width: 100%;
  }

  /* Image-first rows on desktop → text first on mobile */
  .home-page-wrap .dnd_area_middle-row-0-vertical-alignment > .row-fluid > .span6:first-child,
  .home-page-wrap .dnd_area_middle-row-2-vertical-alignment > .row-fluid > .span6:first-child,
  .home-page-wrap .dnd_area_middle-row-4-vertical-alignment > .row-fluid > .span6:first-child {
    order: 2;
  }

  .home-page-wrap .dnd_area_middle-row-0-vertical-alignment > .row-fluid > .span6:last-child,
  .home-page-wrap .dnd_area_middle-row-2-vertical-alignment > .row-fluid > .span6:last-child,
  .home-page-wrap .dnd_area_middle-row-4-vertical-alignment > .row-fluid > .span6:last-child {
    order: 1;
  }

  /* Text-first rows: keep natural order */
  .home-page-wrap .dnd_area_middle-row-1-vertical-alignment > .row-fluid > .span6:first-child,
  .home-page-wrap .dnd_area_middle-row-3-vertical-alignment > .row-fluid > .span6:first-child,
  .home-page-wrap .dnd_area_bottom-row-0-vertical-alignment > .row-fluid > .span6:first-child {
    order: 1;
  }

  .home-page-wrap .dnd_area_middle-row-1-vertical-alignment > .row-fluid > .span6:last-child,
  .home-page-wrap .dnd_area_middle-row-3-vertical-alignment > .row-fluid > .span6:last-child,
  .home-page-wrap .dnd_area_bottom-row-0-vertical-alignment > .row-fluid > .span6:last-child {
    order: 2;
  }

  /* ── Section separators between topics ── */
  .home-page-wrap .content-with-image .dnd-section[class*="dnd_area_middle-row"] {
    border-bottom: 1px solid #e3e8ec;
    margin-bottom: 0;
    padding-bottom: 36px !important;
    padding-top: 36px !important;
  }

  .home-page-wrap .content-with-image .dnd-section.dnd_area_middle-row-0-padding {
    padding-top: 28px !important;
  }

  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-0-padding {
    border-bottom: 1px solid #e3e8ec;
    margin-bottom: 0;
    padding-bottom: 36px !important;
    padding-top: 36px !important;
  }

  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-4-padding {
    border-top: 1px solid #e3e8ec;
    margin-bottom: 0;
    padding-bottom: 36px !important;
    padding-top: 36px !important;
  }

  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-5-padding {
    padding-top: 36px !important;
  }

  /* ── Typography spacing within each topic block ── */
  .home-page-wrap .content-with-image .span6 .widget-type-rich_text,
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .widget-type-rich_text {
    max-width: none;
    padding: 0 20px 12px;
  }

  .home-page-wrap .content-with-image .span6 .widget-type-rich_text h2,
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .widget-type-rich_text h2 {
    margin-top: 0;
    padding-bottom: 10px;
  }

  .home-page-wrap .content-with-image .span6 .widget-type-rich_text p:last-child,
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .widget-type-rich_text p:last-child {
    margin-bottom: 0;
  }

  .home-page-wrap #hs_cos_wrapper_widget_1669291412973_ {
    padding-top: 0 !important;
  }

  /* ── Consistent, centred feature illustrations ── */
  .home-page-wrap .content-with-image .span6 .widget-type-linked_image,
  .home-page-wrap .content-with-image .span6 .hs_cos_wrapper_type_linked_image,
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .widget-type-linked_image,
  .home-page-wrap .content-with-image [class*="-flexbox-positioning"] {
    align-items: center;
    display: flex;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    padding: 8px 20px 16px;
    width: 100%;
  }

  .home-page-wrap .content-with-image .span6 .widget-type-linked_image img,
  .home-page-wrap .content-with-image .span6 .hs-image-widget,
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .hs-image-widget {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 260px;
    max-width: 260px;
    object-fit: contain;
    width: 100%;
  }

  /* Full-width marketing illustrations below the feature band */
  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-2-padding .hs-image-widget,
  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-5-padding .hs-image-widget {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: min(100%, 360px);
    object-fit: contain;
    width: 100%;
  }

  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-2-padding .widget-type-linked_image,
  .home-page-wrap .home-page-section:not(.content-with-image) .dnd_area_bottom-row-5-padding .widget-type-linked_image {
    display: flex;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Reset inline width attributes fighting mobile layout */
  .home-page-wrap .content-with-image .hs-image-widget[width],
  .home-page-wrap .home-page-section .dnd_area_bottom-row-0-vertical-alignment .hs-image-widget[width] {
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
  }
}

@media (max-width: 767px) {
  /* Override theme aspect-ratio rules that only target image widgets, not linked_image */
  .home-page-wrap .content-with-image .hs_cos_wrapper_type_linked_image img {
    aspect-ratio: auto;
  }
}
