body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* Slate 50 */
    color: #1e293b; /* Slate 800 */
}

/* Foco visible consistente en toda la aplicación (WCAG 2.1 AA 2.4.7) */
:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Evita que el header sticky oculte campos enfocados tras errores de validación */
input,
select,
textarea,
button {
    scroll-margin-top: 11rem;
}

/* Custom Scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Ocultar scrollbar en navegación horizontal móvil sin perder scroll táctil */
.scrollbar-none {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-none::-webkit-scrollbar {
    display: none;
}

/* Micro animations and transitions */
.hover-scale {
    transition: transform 0.2s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Skeletons de carga (ver templates/fragments/skeleton.html).
   Clase propia para asegurar que prefers-reduced-motion gane en la cascada. */
@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-pulse {
    animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* WCAG 2.1 AA / 2.3.3: respetar preferencia de movimiento reducido en toda la UI */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    .skeleton-pulse,
    .animate-pulse,
    .animate-spin {
        animation: none !important;
    }

    .hover-scale,
    .hover-scale:hover,
    [data-barra-navegacion] {
        transition: none !important;
        transform: none !important;
    }
}
