/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .h3 {
        font-size: 1.5rem;
    }
    
    .h5 {
        font-size: 1.125rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Spacing */
    section {
        padding: 2.5rem 0;
    }
    
    .py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1.25rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 160px;
    }
    
    #team .card-img-top {
        height: 180px;
    }
    
    /* Hero Section */
    #hero {
        min-height: 70vh;
        padding-top: 80px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Icons */
    .fa-3x {
        font-size: 2rem;
    }
    
    .fa-2x {
        font-size: 1.5rem;
    }
    
    /* Process Section Circles */
    .bg-primary.rounded-circle {
        width: 50px;
        height: 50px;
    }
    
    .bg-primary.rounded-circle .h5 {
        font-size: 1rem;
    }
    
    /* Form Elements */
    .form-control {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    /* Contact Info */
    .d-flex .fas {
        font-size: 1.25rem;
    }
    
    /* Footer */
    #footer .row {
        text-align: center;
    }
    
    #footer .text-end {
        text-align: center;
    }
    
    /* Disable animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    #hero {
        min-height: 75vh;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    #team .card-img-top {
        height: 200px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    #team .card-img-top {
        height: 220px;
    }
    
    /* Adjust grid for tablets */
    #services .col-md-6:nth-child(odd) {
        padding-right: 0.75rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 0.75rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Full size typography */
    .display-4 {
        font-size: 2.5rem;
    }
    
    /* Hero adjustments */
    #hero {
        min-height: 100vh;
    }
    
    /* Card hover effects */
    .card:hover {
        transform: translateY(-8px);
    }
    
    .btn:hover {
        transform: translateY(-3px);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 6rem 0;
    }
    
    .card-body {
        padding: 2.5rem;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Larger hero content */
    .display-4 {
        font-size: 3rem;
    }
    
    .lead {
        font-size: 1.25rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    #hero {
        min-height: 80vh;
        padding-top: 60px;
    }
    
    section {
        padding: 2rem 0;
    }
    
    /* Reduce vertical spacing in landscape */
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI/Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Dark Mode Support */

/* Reduced Data Mode */
@media (prefers-reduced-data: reduce) {
    /* Disable background images and gradients */
    #hero {
        background: #f8fafc;
    }
    
    .hero-shape {
        display: none;
    }
    
    /* Simplify shadows */
    .card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Print Optimization */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer,
    .hero-shape {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
    
    section {
        padding: 1rem 0;
        break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations */
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    /* Remove transforms */
    .card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Focus Management */
.navbar-toggler:focus,
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* Container Fluid Adjustments */
@media (min-width: 1400px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Navbar Collapse Improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    
    .nav-link:hover {
        background-color: rgba(79, 70, 229, 0.1);
    }
}

/* Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce complexity on mobile */
    .card {
        will-change: auto;
    }
    
    /* Optimize images */
    .card-img-top {
        will-change: auto;
    }
    
    /* Disable expensive effects */
    .shadow-lg {
        box-shadow: var(--shadow-sm);
    }
} 