/**
 * Legacy Device Support for GEO Heritage Homes
 * Optimizations for older hardware like Intel MacBooks
 */

/* Optimize image rendering for hero carousel */
.hero-slide-img img {
    /* Replace high-performance rendering properties with more compatible ones */
    image-rendering: auto !important;
    /* Add these to help with GPU memory issues */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Force hardware acceleration in a more compatible way */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    transform: translateZ(0);
}

/* Simplify animations for older hardware */
.legacy-device .hero-content .animated {
    /* Use simpler animation with less GPU impact */
    animation-duration: 0.5s !important;
    /* Reduce transform distance for better performance */
    transform: translateY(15px);
}

/* For extremely old devices, disable animations completely */
.legacy-device.reduce-motion .hero-content .animated {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Optimize slick slider performance */
.legacy-device .hero-slider .slick-slide {
    /* Improve slider performance */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* Fix height calculations that may be inconsistent on older browsers */
.legacy-device .hero-carousel,
.legacy-device .hero-slide {
    height: 600px !important; /* Fixed height instead of vh for consistent rendering */
}

/* Optimize overlay rendering */
.legacy-device .hero-overlay {
    /* Simpler gradient that's less taxing on GPU */
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Reduce shadow complexity */
.legacy-device .hero-title,
.legacy-device .hero-subtitle {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Reduce transition complexity */
.legacy-device .hero-prev-arrow,
.legacy-device .hero-next-arrow,
.legacy-device .hero-carousel .slick-dots.hero-dots-custom li button:before {
    transition: all 0.2s linear !important;
}

/* Fix potential z-index stacking context issues on older browsers */
.legacy-device .hero-content {
    z-index: 5 !important;
    transform: translateZ(0);
}

/* Ensure loading state works properly */
.legacy-device .hero-carousel::before {
    background: #f5f5f5 !important; /* Simpler background */
}
