/* Performance Optimizations */

/* Critical footer styles moved from inline */
.foot2 {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto;
    padding: 10px;
    margin-top: 0;
}

.foot2 > div {
    margin-top: 0 !important;
    display: block !important;
    opacity: 1 !important;
}

/* Map container optimizations */
.map-container {
    text-align: center;
    margin-bottom: -10px;
    width: 100%;
}

#map-fallback {
    width: 100%;
    max-width: 400px;
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
}

#map-fallback img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

#google-map-iframe {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
    max-width: 400px;
    width: 100%;
    height: 250px;
}

/* Mobile optimizations */
@media (max-width: 856px) {
    .foot2 {
        width: 100% !important;
        margin-right: 0 !important;
        justify-content: center !important;
        padding: 20px !important;
    }
    
    .foot2 > div {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    .foot2 .map-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .foot2 #map-fallback,
    .foot2 #google-map-iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: 200px !important;
    }
}

@media (max-width: 480px) {
    .foot2 {
        padding: 15px !important;
    }
    
    .foot2 > div {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .foot2 #map-fallback,
    .foot2 #google-map-iframe {
        height: 180px !important;
    }
}

/* Reduce font loading impact */
.font-display-swap {
    font-display: swap;
}

/* Optimize image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce layout shifts */
* {
    box-sizing: border-box;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Expertise page mobile fixes */
@media (max-width: 856px) {
    .page-1 {
        margin-top: 80px; /* Ensure proper spacing from fixed navbar */
    }
    
    .main-body {
        padding-top: 10px;
        min-height: auto; /* Remove fixed height on mobile */
    }
    
    /* Fix slideshow navigation on mobile */
    .prev, .next {
        font-size: 24px !important;
        margin-top: -12px !important;
    }
    
    /* Ensure proper spacing between sections */
    .Gallery {
        margin-top: 80px !important;
    }
    
    .row {
        margin-bottom: 40px !important;
    }
}

@media (max-width: 480px) {
    .page-1 {
        margin-top: 70px;
    }
    
    .Gallery {
        margin-top: 60px !important;
        padding: 0 10px !important;
    }
    
    .row-header h1 {
        font-size: 14px !important;
        letter-spacing: 1px !important;
    }
    
    .row-header p {
        font-size: 12px !important;
        line-height: 18px !important;
    }
}
