/* Cementare Responsive Core v1
   Shared mobile/tablet safety layer.
   Intentionally avoids design changes and does not hide horizontal overflow. */
:root {
  --cementare-safe-top: env(safe-area-inset-top, 0px);
  --cementare-safe-right: env(safe-area-inset-right, 0px);
  --cementare-safe-bottom: env(safe-area-inset-bottom, 0px);
  --cementare-safe-left: env(safe-area-inset-left, 0px);
  --cementare-vh: 100vh;
}

@supports (height: 100svh) {
  :root { --cementare-vh: 100svh; }
}

@supports (height: 100dvh) {
  :root { --cementare-dvh: 100dvh; }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

/* Flex/grid children must be allowed to shrink instead of forcing viewport overflow. */
:where(.row, .d-flex, .d-grid, [class*="grid"], [class*="flex"]) > * {
  min-width: 0;
}

:where(.container, .container-fluid, [class^="col-"], [class*=" col-"]) {
  min-width: 0;
}

/* Media should never exceed its containing column. Width is not forced to 100% so logos/icons keep their intended size. */
img, video, canvas, svg, iframe {
  max-width: 100%;
}

img, video, canvas {
  height: auto;
}

form, fieldset, input, select, textarea, button {
  max-width: 100%;
}

/* Prevent pathological character-by-character wrapping while still allowing long copy to wrap safely. */
:where(h1, h2, h3, h4, h5, h6, p, li, address, figcaption) {
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

@media (max-width: 700px) {
  /* Avoid iOS form-focus zoom without globally shrinking editorial type. */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}
