/* =========================================
   RESET CSS - NORMALIZACIÓN
   Archivo: reset.css
   Descripción: Elimina inconsistencias entre navegadores
   ========================================= */

/* Reset básico moderno */
*,
*::before,
*::after {
  box-sizing: border-box;      /* El padding no afecta el ancho total */
  margin: 0;                   /* Elimina márgenes por defecto */
  padding: 0;                  /* Elimina padding por defecto */
}

/* Configuración base del HTML */
html {
  font-size: 16px;             /* Tamaño base */
  scroll-behavior: smooth;     /* Scroll suave al navegar por anclas */
  -webkit-font-smoothing: antialiased;  /* Texto más nítido en Mac */
  -moz-osx-font-smoothing: grayscale;
}

/* Body base */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;            /* Espaciado entre líneas legible */
  color: var(--color-dark);
  background-color: var(--color-white);
  overflow-x: hidden;          /* Evita scroll horizontal no deseado */
}

/* Imágenes fluidas */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;             /* Las imágenes nunca exceden su contenedor */
  height: auto;
}

/* Herencia de fuentes */
input,
button,
textarea,
select {
  font: inherit;               /* Heredan la fuente del body */
}

/* Eliminar estilos por defecto de enlaces */
a {
  text-decoration: none;       /* Sin subrayado */
  color: inherit;              /* Heredan el color del padre */
  transition: var(--transition-fast);
}

/* Listas sin viñetas */
ul,
ol {
  list-style: none;
}

/* Tablas */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Encabezados */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

/* Párrafos */
p {
  margin-bottom: var(--spacing-md);
}

/* Botones - Reset básico */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Formularios */
input,
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

/* =========================================
   UTILIDADES DE ACCESIBILIDAD
   ========================================= */

/* Solo visible para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content (para navegación por teclado) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}