/* ==== Box-sizing: border-box en todo ==== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ==== Quitar márgenes por defecto en los elementos comunes ==== */
body, h1, h2, h3, h4, h5, h6, p, blockquote,
dl, dd, ul, ol, figure, hr, pre, table {
  margin: 0;
  padding: 0;
}

/* ==== Asegurar altura completa en html y body ==== */
html, body {
  height: 100%;
}

/* ==== Ajustes básicos del body ==== */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ==== Heredar fuentes en formularios ==== */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* ==== Botones y links sin estilos extra ==== */
button, [type="button"], [type="reset"], [type="submit"] {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  cursor: pointer;
}

/* ==== Listas sin viñetas por defecto ==== */
ul, ol {
  list-style: none;
}

/* ==== Asegurar estilo base de los headings ==== */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

/* ==== Enlaces sin subrayado por defecto ==== */
a {
  color: inherit;
  text-decoration: none;
}

/* ==== Imágenes fluidas ==== */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==== Tablas sin espaciado interno por defecto ==== */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ==== Asegurar scroll suave en navegadores modernos ==== */
html:focus-within {
  scroll-behavior: smooth;
}

/* ==== Evitar zoom no deseado en mobile Safari ==== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* ==== Placeholder accesible y no invasivo ==== */
::placeholder {
  opacity: 0.6;
  color: inherit;
}

/* ==== Texto preformateado con scroll si es necesario ==== */
pre {
  overflow-x: auto;
}

/* ==== Eliminar estilo de quotes en blockquote/cite ==== */
blockquote, q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* ==== SVGs accesibles (sin focus outline feo por defecto) ==== */
svg {
  vertical-align: middle;
}

/* ==== Cursor por defecto en elementos deshabilitados ==== */
[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}
