/**
 * Reset CSS - Normalización de estilos base
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6,
p, ol, ul, li,
figure, figcaption, blockquote, dl, dd {
    margin: 0;
}

/* Remove default padding */
ol, ul {
    padding: 0;
}

/* Remove default list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
svg {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Button reset - Solo para botones SIN clases específicas */
button:not([class]) {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

button:not([class]):disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Input reset */
input {
    border: none;
    outline: none;
    background: transparent;
}

input:focus {
    outline: none;
}

/* Select reset */
select {
    background: transparent;
    border: none;
    outline: none;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Remove default legend styles */
legend {
    padding: 0;
}

/* Table reset */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* HR reset */
hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-md) 0;
}

/* Strong and bold */
strong,
b {
    font-weight: var(--font-weight-bold);
}

/* Emphasis */
em,
i {
    font-style: italic;
}

/* Code */
code,
pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Blockquote */
blockquote {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-md);
    border-left: 4px solid var(--border-color);
    color: var(--text-secondary);
}

/* Small text */
small {
    font-size: 0.875em;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background-color: var(--primary-blue);
    color: var(--text-light);
}