/* Optimized CSS for better performance */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Critical CSS - Load this first */
.critical-css {
    display: block;
}

/* Media query for print */
@media print {
    header, footer, nav, .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
    
    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Responsive image handling */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Preload critical resources */
.preload {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
}

/* Optimize for mobile devices */
@media (max-width: 480px) {
    /* Reduce unnecessary animations on mobile */
    .fade-in, .slide-in-left, .slide-in-right {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    /* Optimize touch targets for mobile */
    button, .btn, nav a, .footer-nav a {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* Simplify layout for very small screens */
    .feature-card, .testimonial-card {
        padding: 15px;
    }
    
    /* Adjust font sizes for readability */
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
}

/* Performance optimizations */
.content-visibility-auto {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Reduce layout shifts */
.aspect-ratio-box {
    position: relative;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.aspect-ratio-box img,
.aspect-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
