/* Base adaptable para páginas históricas que no disponen de CSS responsive propio. */
:root {
  --site-responsive-gutter: clamp(12px, 3vw, 32px);
}

html {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  min-height: 100vh;
  margin-inline: auto;
  padding-inline: var(--site-responsive-gutter);
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

img,
picture,
video,
canvas,
svg,
object,
embed,
applet {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

table {
  max-width: 100%;
}

td,
th {
  min-width: 0;
  overflow-wrap: anywhere;
}

pre,
code,
samp {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

@media (min-width: 768px) and (max-width: 1180px) {
  body {
    --site-responsive-gutter: clamp(20px, 3.2vw, 38px);
  }

  table[width],
  iframe[width],
  object[width],
  embed[width] {
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  body {
    --site-responsive-gutter: clamp(10px, 4vw, 20px);
    font-size: clamp(14px, 4vw, 17px);
    line-height: 1.55;
  }

  body > table[width],
  body > center > table[width] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  table[width] {
    max-width: 100% !important;
  }

  td[width],
  th[width] {
    width: auto !important;
    max-width: 100% !important;
  }

  iframe[width],
  object[width],
  embed[width],
  applet[width] {
    width: 100% !important;
    max-width: 100% !important;
  }

  iframe[height] {
    height: min(72vh, 720px) !important;
  }

  img[align="left"],
  img[align="right"] {
    float: none;
    display: block;
    margin: 12px auto;
  }

  h1,
  h2,
  h3 {
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
}

@media (max-width: 359px) {
  body {
    --site-responsive-gutter: 10px;
  }
}

@media (min-width: 1600px) {
  body {
    --site-responsive-gutter: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
