/* Mobile SEO and Touch Optimizations */

/* Safe area insets for modern mobile devices */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0);
    --safe-area-inset-left: env(safe-area-inset-left, 0);
    --safe-area-inset-right: env(safe-area-inset-right, 0);
}

/* Mobile-first responsive improvements */
@media (max-width: 375px) {
    /* Ensure readable font sizes on small devices */
    body {
        font-size: 16px; /* Prevents zoom on form inputs */
        line-height: 1.5;
    }
    
    /* Better spacing on small screens */
    .hero-content .container {
        padding-left: calc(15px + var(--safe-area-inset-left));
        padding-right: calc(15px + var(--safe-area-inset-right));
    }
    
    /* Improved hero text readability */
    .hero-content h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

/* Touch-friendly navigation */
.navbar-nav .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    touch-action: manipulation;
}

.navbar-toggler {
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

/* Touch-friendly buttons */
.btn {
    min-height: 48px;
    padding: 12px 24px;
    touch-action: manipulation;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-sm {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 1.125rem;
}

/* Enhanced form controls for mobile */
.form-control {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    touch-action: manipulation;
}

.form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* WhatsApp button optimization */
.whatsapp-float {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    z-index: 1000;
}

/* Gallery touch interactions */
.gallery-item {
    touch-action: pan-y;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

@media (hover: none) {
    /* Remove hover effects on touch devices */
    .gallery-item:hover {
        transform: none;
    }
}

/* Team card touch interactions */
.team-card {
    touch-action: manipulation;
    transition: transform 0.2s ease;
}

.team-card:active {
    transform: scale(0.98);
}

/* Video container optimizations */
.video-background-container {
    /* Improve video performance on mobile */
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-video,
    #vinyl-video,
    #vinyl-video-reverse {
        display: none !important;
    }
    
    .video-poster-fallback {
        display: block !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-outline-light {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid transparent;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        border-bottom-color: currentColor;
    }
}

/* Focus improvements for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Mobile navigation improvements */
@media (max-width: 767px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        border-radius: 8px;
        margin-top: 8px;
        padding: 16px;
    }
    
    .navbar-nav {
        gap: 8px;
    }
    
    .nav-link {
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        margin: 4px 0;
    }
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 75vh; /* Reduced from 100vh to 75vh for landscape */
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Force Footer Links Left Alignment - Override All Centering */
.footer .footer-links { 
    display: block !important; 
    width: 100% !important; 
    margin: 0 !important; 
    padding-left: 0 !important; 
    text-align: left !important; 
    justify-content: flex-start !important; 
    align-items: flex-start !important; 
}

.footer .footer-links li, 
.footer .footer-links a, 
.footer .footer-heading { 
    display: block !important; 
    text-align: left !important; 
}

/* Force footer columns to be left-aligned */
.footer .col-12.col-sm-6.col-lg-3 { 
    text-align: left !important; 
}

/* Print styles for SEO */
@media print {
    .video-background-container,
    .whatsapp-float,
    .navbar,
    .btn {
        display: none !important;
    }
    
    .hero-section,
    .section {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}