/* ===============================================
   RESET Y NORMALIZACIÓN BASE
   =============================================== */

/* Box sizing universal */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset de márgenes y paddings */
* {
    margin: 0;
    padding: 0;
}

/* HTML y body base */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-gray-900);
    background-color: var(--color-gray-50);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Encabezados */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* Párrafos */
p {
    margin-bottom: var(--spacing-md);
    color: var(--color-gray-700);
}

/* Enlaces */
a {
    color: var(--color-guindo-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-guindo-dark);
}

a:focus {
    outline: 2px solid var(--color-guindo-primary);
    outline-offset: 2px;
}

/* Listas */
ul, ol {
    list-style: none;
}

/* Imágenes */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Formularios */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Tablas */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Prevenir overflow de texto */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* Scroll suave en elementos con overflow */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* Selección de texto */
::selection {
    background-color: var(--color-guindo-light);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-guindo-light);
    color: var(--color-white);
}
