/**
 * Reset CSS - Plataforma SEAP-IAP
 * 
 * Normalización de estilos base para consistencia cross-browser
 * Basado en modern-normalize + ajustes personalizados
 */

/* ============================================
   BOX-SIZING
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================
   DOCUMENTO
   ============================================ */

html {
    /* Prevent font size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    /* Smooth scroll */
    scroll-behavior: smooth;
    /* Base font size para rem */
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
}

/* ============================================
   SECCIONES
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
    font-weight: inherit;
    font-size: inherit;
}

p,
ul,
ol,
dl,
dd,
blockquote,
figure,
pre {
    margin: 0;
    padding: 0;
}

/* ============================================
   LISTAS
   ============================================ */

ul,
ol {
    list-style: none;
}

/* ============================================
   ENLACES
   ============================================ */

a {
    text-decoration: none;
    color: inherit;
    background-color: transparent;
}

a:hover {
    text-decoration: none;
}

/* ============================================
   TEXTO
   ============================================ */

b,
strong {
    font-weight: bolder;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* ============================================
   ELEMENTOS EMBEBIDOS
   ============================================ */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

iframe {
    border: 0;
}

/* ============================================
   FORMULARIOS
   ============================================ */

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
    -webkit-appearance: button;
    appearance: button;
    cursor: pointer;
}

button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

legend {
    padding: 0;
    display: table;
    max-width: 100%;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
    resize: vertical;
}

[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;
    outline-offset: -2px;
}

[type='search']::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* ============================================
   TABLAS
   ============================================ */

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

th,
td {
    padding: 0;
    text-align: left;
}

/* ============================================
   DETALLES/SUMMARY
   ============================================ */

details {
    display: block;
}

summary {
    display: list-item;
    cursor: pointer;
}

/* ============================================
   ELEMENTOS INTERACTIVOS
   ============================================ */

[hidden] {
    display: none !important;
}

[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

/* Ocultar visualmente pero mantener accesible 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;
}

/* Mostrar al hacer focus (útil para "Skip to content") */
.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@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;
    }
}