/* Mobile-First Responsive Design */

/* Disable animations on mobile for performance and accessibility */
@media (max-width: 767.98px) {
    /* Disable scroll animations on mobile */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Disable floating animations on mobile */
    .hero-decoration-1,
    .hero-decoration-2,
    .shape-1,
    .shape-2,
    .shape-3 {
        animation: none !important;
        display: none;
    }
}

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 100px;
        min-height: 80vh;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Cards */
    .service-card,
    .review-card,
    .blog-card,
    .case-study-card {
        margin-bottom: 1.5rem;
    }
    
    /* Team section - stack photos vertically */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-photo img {
        width: 80px;
        height: 80px;
    }
    
    /* Gallery - 2 columns on mobile */
    .gallery-item img {
        height: 180px;
    }
    
    /* Price cards - full width */
    .price-card {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps - vertical layout */
    .process-step {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Contact form */
    .contact-form .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    #footer .row .col-lg-4,
    #footer .row .col-lg-2,
    #footer .row .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    #footer .text-lg-end {
        text-align: center !important;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    /* Hero adjustments */
    .hero-buttons .btn {
        margin-right: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Team photos */
    .team-photo img {
        width: 100px;
        height: 100px;
    }
    
    /* Gallery - 2 columns */
    .gallery-item img {
        height: 200px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1, .h1 {
        font-size: 2.25rem;
    }
    
    h2, .h2 {
        font-size: 1.875rem;
    }
    
    /* Hero section */
    #hero {
        padding-top: 110px;
    }
    
    /* Cards spacing */
    .service-card,
    .review-card,
    .blog-card {
        margin-bottom: 1.5rem;
    }
    
    /* Team section - 3 columns */
    .team-photo img {
        width: 110px;
        height: 110px;
    }
    
    /* Gallery - 3 columns */
    .gallery-item img {
        height: 220px;
    }
    
    /* Disable some decorative elements */
    .hero-decoration-1,
    .hero-decoration-2 {
        display: none;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Typography fine-tuning */
    h1, .h1 {
        font-size: 2.375rem;
    }
    
    /* Team photos */
    .team-photo img {
        width: 115px;
        height: 115px;
    }
    
    /* Gallery */
    .gallery-item img {
        height: 240px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Full size typography */
    h1, .h1 {
        font-size: 2.5rem;
    }
    
    /* Team photos full size */
    .team-photo img {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery full size */
    .gallery-item img {
        height: 250px;
    }
    
    /* Enhanced hover effects for larger screens */
    .service-card:hover,
    .review-card:hover,
    .blog-card:hover,
    .case-study-card:hover {
        transform: translateY(-8px);
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced spacing for ultra-wide */
    .py-5 {
        padding-top: 6rem !important;
        padding-bottom: 6rem !important;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .gallery-item img,
    .service-card .service-image img,
    .blog-card .blog-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */

/* Print Responsive */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .hero-bg-shapes,
    .btn,
    .gallery-overlay,
    .hero-decoration-1,
    .hero-decoration-2 {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 10pt;
        line-height: 1.3;
    overflow-x: hidden;
}
    
    h1, .h1 { font-size: 18pt; }
    h2, .h2 { font-size: 16pt; }
    h3, .h3 { font-size: 14pt; }
    
    /* Force light background for print */
    .bg-dark,
    .bg-primary {
        background-color: white !important;
        color: black !important;
    }
    
    /* Ensure text is readable */
    .text-white,
    .text-light {
        color: black !important;
    }
}

/* Container Responsive Behavior */
@media (max-width: 1199.98px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Navigation Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0.5rem;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Form Responsive */
@media (max-width: 767.98px) {
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Button Responsive */
@media (max-width: 575.98px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Table Responsive (if needed) */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* Accessibility Responsive */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions on mobile for accessibility */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover effects that rely on motion */
    .service-card:hover,
    .review-card:hover,
    .blog-card:hover {
        transform: none !important;
    }
}

/* Focus Responsive */
@media (max-width: 767.98px) {
    /* Larger focus indicators on mobile */
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline-width: 3px;
        outline-offset: 3px;
    }
}

/* iOS Safari Specific */
@supports (-webkit-touch-callout: none) {
    /* Fix iOS viewport issues */
    #hero {
        min-height: -webkit-fill-available;
    }
    
    /* Fix iOS button styling */
    .btn {
        -webkit-appearance: none;
        border-radius: 0.75rem;
    }
    
    /* Fix iOS form styling */
    .form-control,
    .form-select {
        -webkit-appearance: none;
    }
}

/* Performance Optimizations */
@media (max-width: 767.98px) {
    /* Reduce resource usage on mobile */
    .hero-bg-shapes,
    .hero-decoration-1,
    .hero-decoration-2 {
        display: none !important;
    }
    
    /* Simplify shadows on mobile */
    .shadow-lg {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Loading States Responsive */
@media (max-width: 767.98px) {
    /* Faster loading animations on mobile */
    [data-sal] {
        transition-duration: 0.3s !important;
    }
} 