/* Responsive CSS - Mobile First Approach */

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography Adjustments */
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 100px 0 40px;
        text-align: center;
    }
    
    .hero-buttons .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }
    
    /* Remove decorative shapes on mobile */
    .hero-shape-1,
    .hero-shape-2 {
        display: none;
    }
    
    /* Cards and Components */
    .feature-card,
    .service-card,
    .pricing-card,
    .review-card {
        margin-bottom: 1.5rem;
    }
    
    /* Contact Form */
    .contact-form .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Process Steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number .badge {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Team Images */
    .team-image img {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-section {
        padding: 110px 0 50px;
    }
    
    /* Timeline Adjustments */
    .timeline-item {
        padding-left: 2.5rem !important;
    }
    
    /* Service Cards Grid */
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* Contact Section */
    .contact-info .contact-item {
        margin-bottom: 1.5rem;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    .hero-section {
        padding: 120px 0 60px;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Cards Layout */
    .service-card,
    .pricing-card {
        height: 100%;
    }
    
    /* Timeline */
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 1rem !important;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }
    
    /* Contact Form Layout */
    .contact-form {
        margin-bottom: 3rem;
    }
    
    /* Process Section */
    .process-step {
        margin-bottom: 2rem;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container Adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 130px 0 70px;
    }
    
    /* Service Cards */
    .service-card .service-image img {
        height: 180px;
    }
    
    /* Timeline Full Layout */
    .timeline-item {
        width: 50%;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        padding-right: 3rem;
    }
    
    .timeline-item:nth-child(even) {
        left: 50%;
        padding-left: 3rem;
    }
    
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item:nth-child(odd)::before {
        right: -10px;
    }
    
    .timeline-item:nth-child(even)::before {
        left: -10px;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container Max Width */
    .container {
        max-width: 1140px;
    }
    
    /* Hero Section Full Layout */
    .hero-section {
        padding: 140px 0 80px;
    }
    
    /* Enhanced Spacing */
    section {
        padding: 5rem 0;
    }
    
    /* Service Cards Enhanced */
    .service-card .service-image img {
        height: 220px;
    }
    
    /* Feature Icons Larger */
    .feature-icon {
        width: 100px;
        height: 100px;
    }
    
    /* Team Images Larger */
    .team-image img {
        width: 180px;
        height: 180px;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced Typography for Large Screens */
    h1, .h1 {
        font-size: 3rem;
    }
    
    h2, .h2 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    /* Hero Section Enhanced */
    .hero-section {
        padding: 150px 0 100px;
    }
    
    /* Enhanced Decorative Elements */
    .hero-shape-1 {
        width: 250px;
        height: 250px;
    }
    
    .hero-shape-2 {
        width: 200px;
        height: 200px;
    }
}

/* Landscape Orientation Specific */
@media screen and (orientation: landscape) and (max-height: 768px) {
    /* Reduce hero section height in landscape */
    .hero-section {
        min-height: 80vh;
        padding: 100px 0 40px;
    }
    
    /* Compact navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    /* Reduce section padding */
    section {
        padding: 3rem 0;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images are crisp on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .hero-buttons,
    .social-links,
    footer {
        display: none !important;
    }
    
    /* Ensure readability */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        font-weight: bold;
        color: #000;
    }
    
    /* Remove shadows and effects */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure links are readable */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #000;
        --accent-color: #000;
        --neutral-color: #ccc;
        --earth-color: #000;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .btn-primary {
        background: black !important;
        border-color: black !important;
        color: white !important;
    }
    
    .btn-outline-primary {
        border-color: black !important;
        color: black !important;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable 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;
    }
    
    /* Remove transform effects */
    .hero-buttons .btn:hover,
    .feature-card:hover,
    .service-card:hover,
    .pricing-card:hover,
    .team-card:hover,
    .review-card:hover,
    .gallery img:hover {
        transform: none !important;
    }
    
    /* Hide decorative elements that might cause motion sensitivity */
    .hero-shape-1,
    .hero-shape-2 {
        display: none;
    }
}

/* Dark Mode Support */

/* Specific Mobile Breakpoints for Popular Devices */

/* iPhone SE (375px) */
@media (max-width: 375px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-buttons .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1.25rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
}

/* iPhone 12/13/14 (390px) */
@media (min-width: 376px) and (max-width: 390px) {
    .hero-section {
        padding: 110px 0 50px;
    }
    
    .service-card .service-image img {
        height: 180px;
    }
}

/* iPad Mini (768px) */
@media (min-width: 768px) and (max-width: 820px) {
    .hero-section .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    .timeline-item {
        margin: 1.5rem 0;
    }
}

/* iPad Pro (1024px) */
@media (min-width: 1024px) and (max-width: 1080px) {
    .container {
        max-width: 960px;
    }
    
    .service-card .price-tag {
        margin-top: auto;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem 0.75rem;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .service-card:hover,
    .pricing-card:hover,
    .team-card:hover,
    .review-card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Ensure form controls are touch-friendly */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Touch-friendly gallery */
    .gallery img {
        margin-bottom: 1rem;
    }
}

/* Keyboard Navigation Support */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
.text-muted {
    color: #666 !important; /* Ensures 4.5:1 contrast ratio */
}

/* Fix for iOS Safari viewport height */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
} 

.hero-section h1 {
    padding-top: 150px;
}