/* ========================================================================== */
/*                        Modern CSS Reset & Normalize                        */
/* ========================================================================== */


/* ========================================================================== */
/*                               1. Box Model                                 */
/* ========================================================================== */

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


/* ========================================================================== */
/*                           2. Margin & Padding Reset                        */
/* ========================================================================== */

html, body, div, span,
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
a, abbr, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strong, sub, sup, var,
b, u, i, mark,
dl, dt, dd, ol, ul, li,
figure, figcaption,
form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
footer, header, nav, output, section, summary,
time, audio, video {
	margin: 0;
	padding: 0;
}


/* ========================================================================== */
/*                        3. HTML5 Semantic Display                           */
/* ========================================================================== */

/* Garantiza display:block en navegadores legacy (IE 9-) */
article, aside, details, figcaption, figure,
footer, header, main, nav, section {
	display: block;
}

/* Previene sobreescritura accidental del atributo hidden */
[hidden] {
	display: none !important;
}


/* ========================================================================== */
/*                                  4. Base                                   */
/* ========================================================================== */

html {
	-webkit-text-size-adjust: 100%;	/* iOS Safari */
	-ms-text-size-adjust: 100%;		/* IE 10+ / Edge legacy */
	font-size: 100%;
	scroll-behavior: smooth;
}

body {
	line-height: 1.5;
	overflow-wrap: break-word;			/* Evita desbordamiento de texto */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}


/* ========================================================================== */
/*                               5. Typography                                */
/* ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	font-size: inherit;
	font-weight: inherit;
	line-height: 1.2;
}

b, strong {
	font-weight: bolder;
}

small {
	font-size: 0.875em;
}

sub, sup {
	font-size: 0.75em;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sup { top: -0.5em; }
sub { bottom: -0.25em; }

code, kbd, samp, pre {
	font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
	font-size: 1em;
}

pre {
	overflow: auto;
	white-space: pre-wrap;
}

abbr[title] {
	text-decoration: underline dotted;
	cursor: help;
}

mark {
	background: #ff0;
	color: #000;
}


/* ========================================================================== */
/*                                  6. Links                                  */
/* ========================================================================== */

a {
	color: inherit;
	text-decoration: none;
}


/* ========================================================================== */
/*                                  7. Lists                                  */
/* ========================================================================== */

ol, ul {
	list-style: none;
}


/* ========================================================================== */
/*                              8. Media Elements                             */
/* ========================================================================== */

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Reemplaza el obsoleto svg:not(:root) */
svg:not(:host) {
	overflow: hidden;
}


/* ========================================================================== */
/*                                  9. Forms                                  */
/* ========================================================================== */

button, input, optgroup, select, textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: inherit;
	margin: 0;
}

button, select {
	text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
	-webkit-appearance: button;
	appearance: button;				/* Estándar moderno */
	cursor: pointer;
	touch-action: manipulation;		/* Elimina delay de 300ms en mobile */
}

button:disabled,
[type='button']:disabled,
[type='reset']:disabled,
[type='submit']:disabled {
	cursor: not-allowed;
}

button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

[type='checkbox'],
[type='radio'] {
	padding: 0;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
	height: auto;
}

[type='search'] {
	-webkit-appearance: textfield;
	appearance: textfield;			/* Estándar moderno */
	outline-offset: -2px;
}

[type='search']::-webkit-search-decoration {
	-webkit-appearance: none;
}

textarea {
	overflow: auto;
	resize: vertical;
}

fieldset {
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
}

legend {
	padding: 0;
}


/* ========================================================================== */
/*                                 10. Tables                                 */
/* ========================================================================== */

table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* ========================================================================== */
/*                              11. Accessibility                             */
/* ========================================================================== */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);		/* Legacy fallback */
	clip-path: inset(50%);			/* Reemplazo moderno de clip */
	white-space: nowrap;
	border-width: 0;
}

/* Respeta la preferencia del usuario de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}