/* Safari Mobile Specific Fixes */

/* Fix for Safari mobile viewport issues */
@supports (-webkit-touch-callout: none) {
    /* Safari-specific styles */
    
    /* Fix hero section spacing on Safari mobile */
    #home {
        padding-top: 140px; /* Increased padding for Safari */
    }
    
    /* Ensure hero content has proper spacing */
    #home .relative.z-10 {
        padding-top: 120px !important;
        min-height: calc(100vh - 80px);
    }
    
    /* Fix video scaling issues on Safari */
    #hero-video {
        transform: scale(1.05); /* Slightly less scale for Safari */
        object-position: center center;
    }
    
    /* Safari text rendering improvements */
    h1, h2, h3 {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }
    
    /* Fix Safari button tap highlight */
    button, 
    [data-nav],
    [data-service] {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }
}

/* Additional mobile-specific breakpoints for iOS */
@media screen and (max-width: 390px) and (-webkit-min-device-pixel-ratio: 2) {
    /* iPhone specific styles */
    
    /* Hero section adjustments for smaller iPhones */
    #home {
        padding-top: 120px;
    }
    
    #home .relative.z-10 {
        padding-top: 100px !important;
    }
    
    /* Ensure text is readable on smaller screens */
    #home h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    #home p {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 2rem !important;
    }
}

/* Fix for Safari address bar height changes */
@media screen and (max-width: 768px) {
    /* Use fixed viewport height for Safari mobile */
    .min-h-screen {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    /* Hero content container specific fix */
    #home > div.relative {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    /* Navigation bar spacing fix for mobile Safari */
    #home .flex.items-center.justify-center {
        padding-top: 140px;
        padding-bottom: 60px;
        box-sizing: border-box;
    }
}

/* Landscape orientation fixes for mobile Safari */
@media screen and (max-width: 926px) and (orientation: landscape) {
    #home {
        padding-top: 100px;
    }
    
    #home .relative.z-10 {
        padding-top: 80px !important;
        padding-bottom: 40px !important;
    }
    
    #home h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    #home p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    #home .flex.flex-col.sm\\:flex-row {
        gap: 1rem !important;
    }
    
    #home button {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

/* Fix for iOS Safari bottom safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pb-16,
    .py-16 {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }
}

/* Prevent Safari zoom on input focus */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    font-size: 16px !important;
}

/* Fix Safari navigation bar backdrop blur */
@supports (-webkit-backdrop-filter: blur(10px)) {
    .nav-scrolled {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}