/* OTTIMIZZAZIONI PRESTAZIONI - CRITICAL CSS */

/* Prevenire Layout Shift - Dimensioni esplicite */
.hero img,
.testimonial-card img,
.service-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

/* Ottimizzare rendering font */
body {
    font-display: swap;
}

/* Ridurre reflow */
* {
    box-sizing: border-box;
}

/* Ottimizzare animazioni */
.btn,
.card,
.nav-link {
    will-change: transform;
    transform: translateZ(0);
}

/* Prevenire CLS per immagini hero */
.hero .img-fluid {
    min-height: 400px;
}

/* Ottimizzare caricamento immagini */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Ridurre paint area */
.shadow,
.shadow-sm,
.shadow-lg {
    contain: layout style paint;
}

/* Ottimizzare scroll */
.section-padding {
    contain: layout;
}

/* Prevenire layout shift per stats */
.position-absolute {
    contain: layout size;
}

/* Ottimizzare rendering testo */
h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
}

p, span, div {
    text-rendering: optimizeSpeed;
}

/* Ridurre complessità rendering */
.rounded-circle,
.rounded-4 {
    transform: translateZ(0);
    backface-visibility: hidden;
}
