/* responsive.css: loaded after the Nicepage styles on every page.
   Nicepage lays pages out with fixed widths and pixel margins per breakpoint.
   These rules let that layout shrink with the screen instead of overflowing. */

/* Nicepage's slide-in animations start up to 300px off screen; don't let them add sideways scrolling. */
html, body { overflow-x: clip; }

img, svg, video, iframe { max-width: 100%; }
.u-text, h1, h2, h3, h4, h5, h6, p, a { overflow-wrap: break-word; }

/* Sheets and their direct children never exceed the screen. */
.u-sheet { max-width: 100%; }
.u-sheet > *, section > *, .u-layout-wrap, .u-list, .u-repeater { max-width: 100%; }

@media (max-width: 575px) {
  .u-sheet { width: 100% !important; padding-left: 0; padding-right: 0; }

  /* Lists and grids: drop the negative margins that push them off screen. */
  .u-section-1 .u-list, .u-section-2 .u-list, .u-section-3 .u-list,
  .u-section-4 .u-list, .u-section-5 .u-list, .u-section-6 .u-list,
  .u-section-7 .u-list, .u-section-8 .u-list, .u-section-9 .u-list,
  .u-section-10 .u-list, .u-section-11 .u-list, .u-section-12 .u-list {
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Text blocks and images with a fixed design width. */
  .u-sheet > .u-text, .u-sheet > .u-image, .u-sheet > .u-shape {
    width: auto;
    max-width: calc(100% - 20px);
  }
  .u-sheet > .u-image { height: auto; margin-left: auto !important; margin-right: auto !important; }

  /* Form controls and buttons stay usable by touch. */
  .u-input { width: 100%; font-size: 16px; }
  .u-btn { max-width: 100%; white-space: normal; }
}
/* Very small phones (under the 340px Nicepage design width). */
@media (max-width: 360px) {
  .u-sheet > .u-text { width: auto !important; margin-left: 10px !important; margin-right: 10px !important; }
  .u-sheet > .u-group, .u-sheet > .u-layout-grid, .u-sheet > .u-list, .u-rotation-parent {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .u-layout-grid > * { width: 100% !important; }
  .u-container-layout > .u-text { width: auto !important; margin-right: 10px !important; }
  h1.u-text { font-size: 2.25rem !important; }
  h2.u-text { font-size: 1.75rem !important; }
}
@media (max-width: 360px) {
  .u-group, .u-gallery, .u-gallery-inner, .u-gallery-item { max-width: 100% !important; }
  .u-group { margin-right: 0 !important; }
  .u-gallery { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .u-layout-wrap { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  section h1.u-text, section h2.u-text {
    width: auto !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
}

/* Hero card: keep the site name on one line. */
@media (max-width: 575px) {
  .u-section-1 .u-group-1 { width: calc(100% - 40px) !important; margin-left: 20px !important; margin-right: 20px !important; }
  .u-section-1 .u-group-1 .u-text { font-size: clamp(1.4rem, 7vw, 2.25rem); overflow-wrap: normal; }
}

@media (max-width: 360px) {
  .u-layout-cell img { margin-left: 0 !important; margin-right: 0 !important; }
  .u-form { width: auto !important; margin-left: 10px !important; margin-right: 10px !important; }
}
