/* ===== Global Performance Optimized Styles ===== */

/* Better layout calculations */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent oversized media */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improve font rendering */
html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

/* Remove default spacing issues */
body {
    margin: 0;
    padding: 0;
}

/* Faster image rendering */
img {
    border-style: none;
    image-rendering: auto;
}

/* Reduce layout shift */
iframe {
    border: 0;
    max-width: 100%;
}

/* Improve form consistency */
input,
button,
textarea,
select {
    font: inherit;
}

/* Faster tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Reduce animation cost for users preferring reduced motion */
@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;
    }
}
