/* Responsive CSS - Mobile First Approach */

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Typography */
    h1, .h1 {
        font-size: 1.81rem;
    }
    
    h2, .h2 {
        font-size: 1.55rem;
    }
    
    .display-4 {
        font-size: 1.76rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.17rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
    
    /* Hero Section */
    #hero {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    #hero .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Sections */
    section {
        padding: 1.5rem 0;
    }
    
    .py-5 {
        padding-top: 1.70rem !important;
        padding-bottom: 1.56rem !important;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Team Grid */
    .col-lg-2-4 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Process Steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Contact Form */
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    .display-4 {
        font-size: 2rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 70vh;
    }
    
    /* Team Grid */
    .col-lg-2-4 {
        width: 50%;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    .display-4 {
        font-size: 2.34rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
    }
    
    /* Team Grid */
    .col-lg-2-4 {
        width: 33.333333%;
    }
    
    /* Services Grid */
    #services .col-md-6 {
        margin-bottom: 1.73rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Process Section */
    .process-item {
        margin-bottom: 2rem;
    }
}

/* Large Devices (Desktops, 997px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Team Grid */
    .col-lg-2-4 {
        width: 20%;
    }
    
    /* Hero Section */
    #hero {
        min-height: 90vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container */
    .container {
        max-width: 1200px;
    }
    
    /* Hero Section */
    #hero {
        min-height: 100vh;
    }
    
    /* Typography */
    .display-4 {
        font-size: 2.54rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 240px;
    }
    
    /* Team Images */
    .team-img {
        width: 180px;
        height: 180px;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .navbar-brand {
        font-size: 1.12rem !important;
    }
    
    section {
        padding: 1rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering on high DPI displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #footer {
        display: none !important;
    }
    
    /* Ensure readable text */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Remove backgrounds and shadows */
    * {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover effects that rely on transforms */
    .card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Dark Mode Support (if user prefers dark color scheme) */

/* Accessibility Improvements */
@media (prefers-contrast: high) {
    /* Increase contrast for better accessibility */
    .card {
        border: 2px solid var(--neutral-color);
    }
    
    .btn-primary {
        border: 2px solid var(--primary-dark);
    }
    
    .form-control {
        border: 2px solid var(--neutral-dark);
    }
}

/* Focus Styles for Keyboard Navigation */
@media (any-hover: none) {
    /* Touch device specific styles */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Mobile Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* Grid System Responsive Adjustments */
@media (max-width: 575.98px) {
    .row.g-4 > * {
        margin-bottom: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .row.g-4 > * {
        margin-bottom: 1.48rem;
    }
}

@media (min-width: 768px) {
    .row.g-4 > * {
        margin-bottom: 1.60rem;
    }
}

/* Ensure proper spacing on all devices */
.mb-5 {
    margin-bottom: 2rem !important;
}

@media (min-width: 768px) {
    .mb-5 {
        margin-bottom: 3rem !important;
    }
}

/* Gallery Responsive Adjustments */
@media (max-width: 767.98px) {
    #gallery .col-md-4 {
        margin-bottom: 0.72rem;
    }
}

/* Form Responsive Improvements */
@media (max-width: 575.98px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
} 