/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Disable animations on mobile for performance */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
    }
    
    /* Hero Section */
    #hero {
        padding: 2rem 0;
        min-height: 100vh;
    }
    
    #hero .col-lg-6 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Typography Adjustments */
    h1, .display-5 {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.6rem !important;
        margin-bottom: 1rem;
    }
    
    h3, .h4 {
        font-size: 1.4rem !important;
    }
    
    .h5, .h6 {
        font-size: 1rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    /* Cards and Content */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    overflow-x: hidden;
}
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0 !important;
    }
    
    /* Team Images */
    #team img {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    /* Process Steps */
    .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Gallery */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Contact Form */
    .form-control {
        font-size: 1rem;
        padding: 1rem;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* Hide decorative elements on mobile */
    .hero-shapes {
        display: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Reduce animations for better performance */
    [data-sal] {
        animation-duration: 0.5s !important;
    }
    
    /* Typography */
    h1, .display-5 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    /* Cards */
    .card-columns {
        column-count: 1;
    }
    
    /* Team */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero adjustments */
    #hero {
        padding: 4rem 0;
    }
    
    /* Cards in grid */
    .col-md-6 .card {
        height: 100%;
    }
    
    /* Team layout */
    #team .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Services grid */
    .services-grid .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Process steps */
    .process-steps .col-md-4 {
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Fine-tune spacing */
    .container {
        max-width: 960px;
    }
    
    /* Card hover effects */
    .card:hover {
        transform: translateY(-3px);
    }
    
    /* Team member spacing */
    #team .col-lg-2 {
        padding: 0 0.5rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced spacing for large screens */
    .container {
        max-width: 1140px;
    }
    
    /* Larger typography for better readability */
    .lead {
        font-size: 1.25rem;
    }
    
    /* Enhanced hover effects */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }
    
    /* Hero shapes enhancement */
    .shape-1 {
        width: 300px;
        height: 300px;
    }
    
    .shape-2 {
        width: 250px;
        height: 250px;
    }
}

/* Ultra-wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Prevent content from becoming too wide */
    .col-lg-8 {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Portrait Orientation Specific */
@media (orientation: portrait) and (max-width: 768px) {
    /* Optimize for portrait mobile */
    #hero {
        min-height: 90vh;
    }
    
    .vh-100 {
        min-height: 90vh !important;
    }
    
    /* Reduce vertical spacing */
    section {
        padding: 2.5rem 0 !important;
    }
}

/* Landscape Orientation Specific */
@media (orientation: landscape) and (max-height: 500px) {
    /* Optimize for landscape mobile */
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    /* Compact navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    /* Reduce section padding */
    section {
        padding: 2rem 0 !important;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina */
    .fa-3x {
        font-size: 2.8rem;
    }
    
    .fa-2x {
        font-size: 1.8rem;
    }
    
    /* Sharper borders */
    .card {
        border-width: 0.5px;
    }
    
    .btn {
        border-width: 1px;
    }
}

/* Print Media Queries */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    .card:hover,
    [data-sal],
    .hero-shapes {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    /* Ensure proper spacing */
    section {
        padding: 1rem 0 !important;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions for accessibility */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover effects */
    .card:hover {
        transform: none !important;
        box-shadow: inherit !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
    
    #team img:hover {
        transform: none !important;
    }
    
    #gallery img:hover {
        transform: none !important;
    }
}

/* Dark Mode Support */

/* High contrast mode */
@media (prefers-contrast: high) {
    /* Enhanced contrast for accessibility */
    .text-muted {
        color: #4a5568 !important;
    }
    
    .card {
        border: 2px solid #2d3748;
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
}

/* Specific Bootstrap Grid Overrides */
@media (max-width: 575.98px) {
    .col-lg-2,
    .col-lg-3,
    .col-lg-4,
    .col-lg-6 {
        margin-bottom: 1.5rem;
    }
    
    .row.g-4 > * {
        margin-bottom: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Optimize for touch devices */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    /* Larger touch targets */
    .form-control {
        min-height: 44px;
    }
} 