/* ═══════════════════════════════════════════════════════════════════════════
   Performance Optimizations
   ═══════════════════════════════════════════════════════════════════════════ */

/* Font smoothing */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent layout shifts from unloaded images */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* GPU acceleration for animated elements */
/* will-change on the hero caused occasional 1px edge seams with Owl transforms */
.owl-carousel:not(.hero-slider) {
    will-change: transform;
}

.preloader {
    will-change: opacity;
}

/* Remove tap highlight on interactive elements (mobile perf) */
button, a, .nav-link {
    -webkit-tap-highlight-color: transparent;
}

/* Critical layout containment for header */
.header-area, .navbar-area {
    contain: layout style;
}

/* GPU-composited layers for card animations (prevents repaints) */
.service-card, .attorney-card, .testimonials-slider-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ── Reduce motion for accessibility / battery saving ───────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Font Display Optimization (fonts load without blocking render) */
@font-face {
    font-display: swap;
}
