/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    
    /* Typography adjustments */
    .display-5 {
        font-size: 1.8rem;
    }
    
    .h3 {
        font-size: 1.25rem;
    }
    
    .h4 {
        font-size: 1.1rem;
    }
    
    /* Hero section */
    #hero {
        padding-top: 5rem;
        text-align: center;
    }
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Process steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Team members */
    .team-card img {
        width: 120px;
        height: 120px;
    }
    
    /* Section padding */
    section {
        padding: 3rem 0;
    }
    
    /* Contact form */
    .contact-form .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Footer */
    #footer .col-md-6,
    #footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Disable animations on mobile for better performance */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Remove hover effects on mobile */
    .card:hover,
    .feature-card:hover,
    .team-card:hover img,
    .process-step:hover .step-number,
    .timeline-item:hover .year-badge {
        transform: none;
        box-shadow: none;
        background-color: initial;
        color: initial;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    
    .display-5 {
        font-size: 2rem;
    }
    
    #hero {
        padding-top: 5.5rem;
    }
    
    .hero-cta .btn {
        display: inline-block;
        width: auto;
        margin: 0.25rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .step-number {
        width: 55px;
        height: 55px;
    }
    
    .team-card img {
        width: 140px;
        height: 140px;
    }
    
    /* Reduce animations on small screens */
    .card:hover {
        transform: translateY(-2px);
    }
    
    .feature-card:hover {
        transform: translateY(-1px);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    
    .display-5 {
        font-size: 2.25rem;
    }
    
    #hero {
        padding-top: 6rem;
    }
    
    section {
        padding: 4.5rem 0;
    }
    
    /* Adjust grid layouts for tablets */
    .col-md-6.col-lg-3 {
        margin-bottom: 2rem;
    }
    
    .col-md-6.col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1.25rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    
    .container {
        max-width: 960px;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    
    .container {
        max-width: var(--container-max-width);
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 6rem 0;
    }
    
    /* Better spacing for hero section */
    #hero {
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    /* Larger hero decorative element */
    #hero::before {
        width: 400px;
        height: 400px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    
    /* Ensure crisp images on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove all hover transforms */
    .card:hover,
    .feature-card:hover,
    .team-card:hover img,
    .process-step:hover .step-number,
    .timeline-item:hover .year-badge,
    #gallery img:hover,
    .btn:hover {
        transform: none;
    }
}

/* Print styles for better printing */
@media print {
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    .card,
    .feature-card,
    .service-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    .hero-cta,
    #footer,
    .contact-form {
        display: none !important;
    }
    
    /* Adjust spacing for print */
    section {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    
    :root {
        --primary-color: #0000FF;
        --secondary-color: #006600;
        --accent-color: #FF6600;
        --neutral-color: #000000;
    }
    
    .card,
    .feature-card {
        border: 2px solid #000;
    }
    
    .btn-outline-primary,
    .btn-outline-secondary {
        border-width: 2px;
    }
}

/* Dark mode support */

/* Focus visible for better keyboard navigation */
@supports selector(:focus-visible) {
    
    .btn:focus:not(:focus-visible),
    .nav-link:focus:not(:focus-visible),
    .form-control:focus:not(:focus-visible) {
        outline: none;
    }
    
    .btn:focus-visible,
    .nav-link:focus-visible,
    .form-control:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Container queries for modern browsers */
@supports (container-type: inline-size) {
    
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-body {
            padding: 0.75rem;
        }
        
        .card-title {
            font-size: 0.9rem;
        }
    }
}

/* Modern viewport units for mobile browsers */
@supports (height: 100dvh) {
    
    #hero {
        min-height: 100dvh;
    }
}

@supports (height: 100svh) {
    
    @media (max-width: 767.98px) {
        #hero {
            min-height: 100svh;
        }
    }
} 