/* Base visual estável USEMED — sem rolagem automática e sem flashes de logo. */
:root {
    color-scheme: light;
}

html {
    min-width: 320px;
    overflow-x: hidden;
    scroll-behavior: auto;
    background: #f5f9fd;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Regra crítica aplicada antes do JavaScript e do CSS completo do cabeçalho. */
header img[src*="logo-usemed" i],
header img[alt*="USEMED" i] {
    display: block !important;
    width: 225px !important;
    max-width: min(48vw, 225px) !important;
    height: 62px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
}

header a:has(> img[src*="logo-usemed" i]),
header a:has(> img[alt*="USEMED" i]) {
    display: inline-flex;
    align-items: center;
    max-width: 225px;
    background: transparent !important;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a,
button {
    transition: none !important;
}

/* Preferência oficial USEMED: navegação direta, sem animações ou transições. */
*,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

@media (max-width: 650px) {
    header img[src*="logo-usemed" i],
    header img[alt*="USEMED" i] {
        width: 185px !important;
        max-width: min(52vw, 185px) !important;
        height: 54px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
