/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile for better performance */
    .sal-animate {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
    }
    
    /* Typography adjustments for mobile */
    .display-4 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Hero section adjustments */
    .hero-section {
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }
    
    /* Section padding adjustments */
    section {
        padding: 60px 0;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
    
    /* Form adjustments */
    .contact-form {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .form-control {
        padding: 1rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Team member photos */
    .member-photo img {
        width: 150px !important;
        height: 150px !important;
    }
    
    /* Process steps */
    .step-number {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Timeline adjustments */
    .timeline-item {
        margin-bottom: 2rem;
    }
    
    /* Gallery adjustments */
    #gallery .col-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Contact info stacking */
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    /* Footer adjustments */
    #footer {
        text-align: center;
    }
    
    #footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Disable animations on small devices */
    @media (prefers-reduced-motion: no-preference) {
        .sal-animate {
            transform: none !important;
            opacity: 1 !important;
            animation: none !important;
            transition: none !important;
        }
    }
    
    .hero-section {
        padding: 120px 0 60px;
    }
    
    .hero-buttons .btn {
        display: inline-block;
        width: auto;
        margin: 0.5rem 0.25rem;
    }
    
    section {
        padding: 70px 0;
    }
    
    .member-photo img {
        width: 175px !important;
        height: 175px !important;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 140px 0 70px;
    }
    
    section {
        padding: 80px 0;
    }
    
    /* Card grid adjustments */
    .services .col-md-6:nth-child(odd) {
        padding-right: 1rem;
    }
    
    .services .col-md-6:nth-child(even) {
        padding-left: 1rem;
    }
    
    /* Team layout adjustments */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .member-photo img {
        width: 180px !important;
        height: 180px !important;
    }
    
    /* FAQ grid adjustments */
    .faq-card {
        margin-bottom: 1rem;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        padding: 160px 0 80px;
    }
    
    section {
        padding: 100px 0;
    }
    
    /* Better spacing for large screens */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Team member grid optimization */
    .team .row {
        justify-content: center;
    }
    
    .team .col-lg-4.offset-lg-2:first-child {
        margin-left: 16.66667%;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        padding: 180px 0 100px;
    }
    
    section {
        padding: 120px 0;
    }
    
    /* Enhanced spacing for very large screens */
    .container {
        max-width: 1140px;
        padding-left: 3rem;
        padding-right: 3rem;
    }
    
    /* Better card spacing */
    .card-body {
        padding: 2.5rem;
    }
    
    /* Enhanced form styling */
    .contact-form {
        padding: 3rem;
    }
    
    .form-control {
        padding: 1rem 1.25rem;
    }
}

/* XXL Devices (Extra Large Desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    section {
        padding: 140px 0;
    }
    
    /* Even more generous spacing */
    .hero-section {
        padding: 200px 0 120px;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .navbar {
        padding: 0.25rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    section {
        padding: 60px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for high DPI displays */
    .card-img-top,
    .member-photo img,
    #gallery 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,
    .feature-card:hover,
    .service-card:hover,
    .price-card:hover,
    .team-member:hover,
    .review-card:hover,
    .case-study-card:hover,
    .process-step:hover,
    .timeline-item:hover,
    .career-card:hover,
    .info-card:hover,
    .blog-card:hover,
    .faq-card:hover,
    .contact-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    /* Remove transform effects on images */
    .card:hover .card-img-top,
    .team-member:hover .member-photo img,
    #gallery img:hover {
        transform: none;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    
    /* Remove parallax effects */
    .hero-shape-1,
    .hero-shape-2 {
        display: none;
    }
    
    /* Disable sal.js animations */
    .sal-animate {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Print Optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    .hero-buttons,
    .btn,
    .contact-form,
    #gallery {
        display: none !important;
    }
    
    /* Optimize colors for print */
    .hero-section,
    .bg-light,
    #footer {
        background: white !important;
        color: black !important;
    }
    
    /* Ensure good contrast */
    .card {
        border: 1px solid #333 !important;
        box-shadow: none !important;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2 {
        font-size: 16pt;
        font-weight: bold;
    }
    
    h3, h4 {
        font-size: 14pt;
        font-weight: bold;
    }
    
    /* Urls for print */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* Dark Mode Support */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --primary-light: #333333;
        --primary-dark: #000000;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .card {
        border: 2px solid black;
    }
    
    .btn {
        border-width: 2px;
        font-weight: bold;
    }
    
    .form-control {
        border: 2px solid black;
    }
}

/* Container Queries (Future-proofing) */
@container (max-width: 400px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Utility Classes for Responsive Design */
.d-mobile-none {
    display: none;
}

@media (min-width: 768px) {
    .d-mobile-none {
        display: block;
    }
    
    .d-desktop-none {
        display: none;
    }
}

/* Responsive Text Sizes */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.heading-responsive {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

/* Responsive Spacing */
.py-responsive {
    padding-top: clamp(2rem, 5vw, 5rem);
    padding-bottom: clamp(2rem, 5vw, 5rem);
}

.my-responsive {
    margin-top: clamp(1rem, 3vw, 3rem);
    margin-bottom: clamp(1rem, 3vw, 3rem);
} 

.hero-section h1 {
    padding-top: 225px;
}