/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Typography adjustments */
    :root {
        --h1-size: 1.75rem;
        --h2-size: 1.5rem;
        --h3-size: 1.25rem;
        --section-padding: 3rem 0;
    }
    
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    /* Hero section mobile */
    #hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    #hero h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    #hero h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    #hero .lead {
        font-size: var(--font-size-base);
    }
    
    /* Cards mobile spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Team cards mobile */
    #team .card-img-top {
        height: 120px;
    }
    
    /* Process steps mobile */
    .process-step .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    /* Contact form mobile */
    #contacts .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Gallery mobile */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Footer mobile */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* No animations on small devices */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    :root {
        --section-padding: 4rem 0;
    }
    
    #hero {
        min-height: 85vh;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    #team .card-img-top {
        height: 140px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* No animations on tablets */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    /* Services grid */
    #services .col-md-6:nth-child(odd) {
        padding-right: 1rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 1rem;
    }
    
    /* Team layout */
    #team .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* FAQ layout */
    #faq .col-lg-6 {
        padding: 0 0.75rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Enable animations on desktop only */
    @media (prefers-reduced-motion: no-preference) {
        .card:hover {
            transform: translateY(-2px);
        }
        
        #gallery img:hover {
            transform: scale(1.02);
        }
        
        .breadcrumb-item img:hover {
            opacity: 1;
        }
    }
    
    #hero {
        min-height: 100vh;
    }
    
    /* Services layout */
    #services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team layout */
    #team .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    /* Process layout */
    .process-step {
        padding: 0 1rem;
    }
    
    /* Contact layout */
    #contacts .col-lg-8 {
        padding-right: 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Hero enhanced */
    #hero h1 {
        font-size: 2.25rem;
    }
    
    #hero h2 {
        font-size: 1.875rem;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 2rem;
    }
    
    /* Services enhanced */
    #services .card-img-top {
        height: 220px;
    }
    
    /* Gallery enhanced */
    #gallery img {
        margin-bottom: 1.5rem;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    :root {
        --section-padding: 6rem 0;
    }
    
    /* Enhanced spacing */
    #hero {
        padding: 8rem 0;
    }
    
    .card {
        margin-bottom: 2.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top, #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    #hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    :root {
        --section-padding: 3rem 0;
    }
}

/* Print responsive */
@media print {
    .container {
        max-width: none;
        width: 100%;
    }
    
    .col-lg-4, .col-lg-6, .col-lg-8, .col-lg-12 {
        width: 100%;
        float: none;
    }
    
    .card {
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    #footer {
        border-top: 3px solid #fff;
    }
}

/* Dark mode support */

body {
    overflow-x: hidden;
}