/* Mobile layout corrections — loaded after page-specific styles.
   Desktop styles (768px and wider) are intentionally untouched.
   Keep Nicepage class names because the HTML and carousel scripts still use them. */
@media (max-width: 767px) {
  /* Avoid horizontal overflow from generated pixel-based widths. */
  html, body { max-width: 100%; overflow-x: clip; }
  .u-body .u-sheet { max-width: calc(100% - 24px); }
  .u-body img, .u-body video, .u-body iframe { max-width: 100%; }
  .u-body .u-text { overflow-wrap: break-word; }

  /* Seven slides share the same markup, but Nicepage generated different offsets. */
  .u-carousel-item[class*="u-section-1-"] .u-layout-wrap-1 {
    width: min(500px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
  }
  .u-carousel-item[class*="u-section-1-"] .u-group-1 {
    max-width: 100%;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-container-layout-2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-1,
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-2,
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-3,
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-btn-1 {
    position: static;
    float: none;
    transform: none;
    max-width: 100%;
    margin: 0;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-3 {
    font-size: 0.875rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-btn-1 {
    align-self: flex-start;
    white-space: normal;
  }
  /* Ensure slide text can grow instead of colliding with the image. */
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 { height: auto; }
  .u-carousel-item[class*="u-section-1-"] .u-container-layout-2 { height: auto; }

  /* Constrain fixed-width content blocks without changing their desktop widths. */
  .u-section-3 .u-layout-wrap-1,
  .u-section-4 .u-layout-wrap-1,
  .u-section-5 .u-layout-wrap-1,
  .u-section-6 .u-layout-wrap-1,
  .u-section-7 .u-layout-wrap-1,
  .u-section-8 .u-layout-wrap-1,
  .u-section-9 .u-layout-wrap-1,
  .u-section-10 .u-layout-wrap-1 { max-width: 100%; }
}

@media (max-width: 575px) {
  .u-carousel-item[class*="u-section-1-"] .u-layout-wrap-1 {
    width: min(340px, calc(100% - 20px));
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-container-layout-2 {
    padding: 24px 12px;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-1 {
    font-size: clamp(1.35rem, 5.2vw, 1.65rem);
    line-height: 1.15;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-text-2 {
    width: auto;
  }
  .u-carousel-item[class*="u-section-1-"] .u-layout-cell-1 .u-btn-1 {
    margin: 0;
  }
  .u-section-3 .u-layout-wrap-1 { width: min(340px, 100%); }
}
