/* Mobile First Responsive Design */

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.913px) {
    .container {
        padding-left: 18px;
        padding-right: 15px;
    }
    
    /* Typography Adjustments */
    h1 {
        font-size: 1.80rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.52rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.39rem;
    }
    
    .navbar-brand {
        font-size: 1.16rem;
    }
    
    /* Hero Section Mobile */
    #hero {
        padding-top: 80px;
        min-height: 100vh;
        text-align: center;
    }
    
    #hero .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* Card Adjustments */
    .card {
        margin-bottom: 1.58rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Team Images */
    .rounded-circle {
        width: 100px;
        height: 100px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.97rem;
    }
    
    /* Spacing Adjustments */
    .py-5 {
        padding-top: 2.57rem !important;
        padding-bottom: 2.61rem !important;
    }
    
    .mt-5, .my-5 {
        margin-top: 2rem !important;
    }
    
    .mb-5, .my-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Form Adjustments */
    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 1.03rem;
    }
    
    /* Footer Adjustments */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Hide animations on mobile when prefers-reduced-motion */
    @media (prefers-reduced-motion: reduce) {
        .card:hover {
            transform: none;
        }
        
        .btn:hover {
            transform: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.84rem;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 90px;
    }
    
    /* Card Grid Adjustments */
    .col-sm-6 .card {
        height: 100%;
    }
    
    /* Team Images */
    .rounded-circle {
        width: 120px;
        height: 120px;
    }
    
    /* Process Steps */
    .col-lg-2.col-md-4 {
        margin-bottom: 2rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav {
        margin-top: 1rem;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 100px;
    }
    
    /* Services Grid */
    .col-lg-4 .card {
        height: 100%;
        margin-bottom: 2rem;
    }
    
    /* Team Section */
    .col-lg-2.col-md-4 {
        margin-bottom: 2rem;
    }
    
    .rounded-circle {
        width: 130px;
        height: 130px;
    }
    
    /* Contact Form */
    .col-lg-8 {
        margin-bottom: 2rem;
    }
    
    /* Gallery */
    .col-lg-3.col-md-4 {
        margin-bottom: 1.62rem;
    }
}

/* Large Devices (desktops, 995px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Hero fine-tuning */
    #hero h1 {
        font-size: 2.26rem;
    }
    
    /* Services layout */
    .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team spacing */
    .col-lg-2 {
        margin-bottom: 1.71rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for large screens */
    .py-5 {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
    
    /* Hero section enhancements */
    #hero h1 {
        font-size: 2.89rem;
    }
    
    #hero .lead {
        font-size: 1.24rem;
    }
}

/* Landscape Orientation Specific */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* High DPI/Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    
    .card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    #gallery {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
    
    .card {
        border: 1px solid #cbcbcb;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations for users who prefer reduced motion */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
}

/* Dark Mode Support */

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none;
    }
    
    /* Increase form control size for touch */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Specific Mobile Navigation Fixes */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(248, 249, 250, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 0.68rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Specific fixes for gallery responsiveness */
@media (max-width: 575.98px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* FAQ section responsive adjustments */
@media (max-width: 767.98px) {
    .col-lg-6.mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .card.h-100 {
        height: auto !important;
    }
} 