/* Enhanced Mobile Responsive Styles - Add to index.php or separate CSS file */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-gradient {
        padding: 40px 20px;
    }
    
    .hero-gradient h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-gradient .text-2xl {
        font-size: 1.25rem;
    }
    
    .hero-gradient .text-xl {
        font-size: 1rem;
    }
    
    .hero-gradient .logo-float img {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Stats Section Mobile */
    .stat-card {
        padding: 16px !important;
    }
    
    .stat-card .text-4xl {
        font-size: 2rem !important;
    }
    
    .stat-card .text-lg {
        font-size: 0.875rem !important;
    }
    
    /* Testimonial Carousel Mobile */
    .testimonial-carousel {
        padding: 40px 0;
    }
    
    .testimonial-carousel h2 {
        font-size: 2rem !important;
    }
    
    .testimonial-image {
        height: 200px !important;
    }
    
    .testimonial-content {
        padding: 20px !important;
    }
    
    .testimonial-content p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px !important;
    }
    
    /* Hide navigation arrows on very small screens */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    /* Services Section Mobile */
    .service-card {
        padding: 24px !important;
    }
    
    .service-card .text-5xl {
        font-size: 3rem !important;
    }
    
    .service-card h3 {
        font-size: 1.5rem !important;
    }
    
    /* Why Choose Us Mobile */
    .text-center.p-6 {
        padding: 20px !important;
    }
    
    .w-16.h-16 {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    .w-16.h-16 i {
        font-size: 1.5rem !important;
    }
    
    /* CTA Section Mobile */
    .cta-section {
        padding: 60px 20px;
    }
    
    .cta-section h2 {
        font-size: 2rem !important;
    }
    
    .cta-section .text-xl {
        font-size: 1rem !important;
    }
    
    .cta-section .text-6xl {
        font-size: 3rem !important;
    }
    
    .cta-section .flex.gap-8 {
        flex-direction: column;
        gap: 16px !important;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: flex;
    }
    
    .testimonial-image {
        height: 250px !important;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-gradient h1 {
        font-size: 3.5rem !important;
    }
    
    .testimonial-image {
        height: 280px !important;
    }
    
    .stat-card {
        padding: 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .service-card,
    .stat-card,
    .testimonial-card {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover::before {
        display: none;
    }
    
    /* Better spacing for touch */
    .swiper-pagination {
        bottom: 10px !important;
    }
}

/* High DPI Screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-float img,
    .testimonial-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-gradient {
        padding: 30px 20px;
    }
    
    .hero-gradient .logo-float img {
        width: 100px !important;
        height: 100px !important;
    }
    
    .testimonial-image {
        height: 180px !important;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    header,
    footer,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination,
    .cta-section {
        display: none !important;
    }
    
    .md\:ml-64 {
        margin-left: 0 !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .logo-float,
    .logo-rotate,
    .logo-pulse {
        animation: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
    .testimonial-card {
        background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .testimonial-content p {
        color: #e5e5e5;
    }
}

/* Loading States */
.swiper-slide img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.swiper-slide img[src] {
    animation: none;
    background: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .testimonial-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Accessibility Improvements */
.swiper-button-next:focus,
.swiper-button-prev:focus,
.swiper-pagination-bullet:focus {
    outline: 3px solid var(--primary-yellow);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid #000;
    }
    
    .service-card:hover {
        border-width: 3px;
    }
}

/* Performance Optimization */
.testimonial-image img,
.service-card,
.stat-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Safe Area for Notched Devices */
@supports (padding: max(0px)) {
    .hero-gradient,
    .testimonial-carousel,
    section {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}