/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-4 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 4px 8px;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 0;
        text-align: center;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
        padding: 60px 0;
    }
    
    #hero .display-4 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    #hero .lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    #hero .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    /* Team Images */
    #team .card-img-top {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .form-control {
        padding: 10px 12px;
    }
    
    /* Footer */
    #footer .col-lg-4,
    #footer .col-lg-2,
    #footer .col-lg-3 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    #footer .text-end {
        text-align: center !important;
    }
    
    /* Process Section */
    #process .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Timeline Section */
    #timeline .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Utility */
    .text-center-mobile {
        text-align: center;
    }
    
    /* No animations on mobile for better performance */
    @media (prefers-reduced-motion: no-preference) {
        [data-sal] {
            animation: none !important;
            transform: none !important;
            opacity: 1 !important;
        }
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    #hero {
        min-height: 85vh;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    #team .card-img-top {
        width: 130px;
        height: 130px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    section {
        padding: 70px 0;
    }
    
    /* Navigation adjustments */
    .navbar-nav .nav-link {
        padding: 8px 12px;
    }
    
    /* Team grid adjustments */
    #team .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    #team .card-img-top {
        width: 140px;
        height: 140px;
    }
    
    /* Services grid */
    .services .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    section {
        padding: 80px 0;
    }
    
    #hero .display-4 {
        font-size: 2.75rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    section {
        padding: 100px 0;
    }
    
    #hero .display-4 {
        font-size: 3rem;
    }
    
    /* Enhanced hover effects for larger screens */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
}

/* Landscape Orientation */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding: 40px 0;
    }
    
    #hero .display-4 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    #hero .lead {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    #hero p {
        margin-bottom: 1rem;
    }
    
    section {
        padding: 40px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .card {
        border-radius: 10px;
    }
    
    .btn {
        border-radius: 6px;
    }
}

/* Dark Mode Support */

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #hero .d-flex,
    .no-print {
        display: none !important;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Optimize sections for print */
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    /* Hide decorative elements */
    .fa {
        display: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    .btn:hover {
        transform: none;
    }
    
    #team .card:hover .card-img-top {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .text-center .fa:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable Sal.js animations */
    [data-sal] {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 2px;
    }
    
    .card {
        border: 1px solid #000;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Container Queries for Modern Browsers */
@container (max-width: 400px) {
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Flexible Grid System Enhancements */
.row-cols-auto > * {
    flex: 0 0 auto;
    width: auto;
}

/* Custom Responsive Utilities */
.d-mobile-block {
    display: none !important;
}

@media (max-width: 767.98px) {
    .d-mobile-block {
        display: block !important;
    }
    
    .d-mobile-none {
        display: none !important;
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 767.98px) {
    /* Reduce box shadows for better performance */
    .shadow-sm {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .shadow {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Simplify gradients */
    #hero {
        background: var(--secondary-light);
    }
    
    #hero::before {
        display: none;
    }
} 