/* Mobile Optimization & Performance */

/* Contact Info Cards - Mobile Fix */
@media (max-width: 768px) {
    .contact-info-cards {
        gap: 0.75rem !important;
    }
    
    .contact-info-cards .info-card {
        padding: 1rem !important;
        flex-wrap: nowrap !important;
    }
    
    .contact-info-cards .info-icon {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        margin-left: 0.75rem !important;
    }
    
    .contact-info-cards .info-icon svg {
        width: 20px !important;
        height: 20px !important;
        display: block !important;
    }
    
    .contact-info-cards h4 {
        font-size: 0.85rem !important;
    }
    
    .contact-info-cards p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
}

/* Performance Optimizations */

/* Reduce animations on mobile */
@media (max-width: 768px) {
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
}

/* Optimize images for mobile */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for better performance */
@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;
    }
}

/* Optimize font loading */
@media (max-width: 768px) {
    body {
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Lazy load images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src]) {
    opacity: 1;
}

/* Optimize shadows and effects on mobile */
@media (max-width: 768px) {
    * {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Reduce box-shadow complexity */
    [style*="box-shadow"] {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
}

/* Improve tap targets */
@media (max-width: 768px) {
    a, button, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Optimize background images */
@media (max-width: 768px) {
    [style*="background-image"] {
        background-size: cover !important;
        background-attachment: scroll !important;
    }
}

/* Reduce gradient complexity on mobile */
@media (max-width: 768px) {
    [style*="linear-gradient"],
    [class*="gradient"] {
        will-change: auto !important;
    }
}

/* Critical CSS - Above the fold */
.hero-modern,
.top-banner,
.contact-section-modern {
    contain: layout style paint;
}

/* Defer non-critical content */
@media (max-width: 768px) {
    .lazy-load {
        content-visibility: auto;
    }
}

/* Optimize scrolling */
* {
    -webkit-overflow-scrolling: touch;
}

/* Reduce repaints */
@media (max-width: 768px) {
    .nav-btn-desktop,
    .nav-btn-desktop-tp,
    .nav-btn-desktop-packages {
        will-change: transform;
        transform: translateZ(0);
    }
}

