/* Mobile-first responsive design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile to respect reduced motion */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Typography adjustments */
    #hero h1 {
        font-size: 2rem;
    }
    
    #hero h2 {
        font-size: 1.25rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    section h3 {
        font-size: 1.125rem;
    }
    
    /* Hero section mobile adjustments */
    #hero {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-cta .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
    
    /* Process steps mobile layout */
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Timeline mobile adjustments */
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 0.5rem;
    }
    
    .timeline-item {
        padding-left: 2rem;
    }
    
    .timeline-item::before {
        left: -0.25rem;
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .timeline-date {
        position: static;
        display: inline-block;
        margin-top: 0.5rem;
    }
    
    /* Team member images */
    .team-member img {
        width: 150px;
        height: 150px;
    }
    
    /* Pricing cards mobile */
    .pricing-card .price {
        font-size: 2.5rem;
    }
    
    /* Contact form mobile */
    .contact-form .btn-primary {
        width: 100%;
        padding: 1rem;
    }
    
    /* Feature items mobile */
    .feature-item {
        text-align: center;
        flex-direction: column;
    }
    
    .feature-icon {
        margin-bottom: 1rem;
    }
    
    /* Section padding adjustments */
    section {
        padding: 3rem 0;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Gallery mobile spacing */
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h2 {
        font-size: 1.375rem;
    }
    
    section h2 {
        font-size: 2.25rem;
    }
    
    .hero-cta .btn {
        width: auto;
        margin-right: 1rem;
    }
    
    .team-member img {
        width: 175px;
        height: 175px;
    }
    
    .pricing-card .price {
        font-size: 2.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    
    #hero h2 {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 2.375rem;
    }
    
    .team-member img {
        width: 180px;
        height: 180px;
    }
    
    /* Timeline tablet adjustments */
    .timeline-date {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
    
    /* Feature items tablet */
    .feature-item {
        flex-direction: row;
        text-align: left;
    }
    
    .feature-icon {
        margin-bottom: 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Full desktop experience */
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero h2 {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 2.5rem;
    }
    
    .team-member img {
        width: 200px;
        height: 200px;
    }
    
    .pricing-card .price {
        font-size: 3rem;
    }
    
    /* Process steps desktop layout */
    .process-step {
        position: relative;
    }
    
    /* Timeline desktop */
    .timeline-date {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
    
    /* Feature items desktop */
    .feature-item {
        flex-direction: row;
        text-align: left;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced spacing for large screens */
    .container {
        max-width: 1140px;
    }
    
    section {
        padding: 6rem 0;
    }
    
    #hero {
        padding-top: 140px;
    }
    
    .card-body {
        padding: 2.5rem;
    }
    
    .feature-card {
        padding: 2.5rem;
    }
    
    .info-card {
        padding: 2.5rem;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    section {
        padding: 7rem 0;
    }
    
    #hero h1 {
        font-size: 3.5rem;
    }
    
    #hero h2 {
        font-size: 1.75rem;
    }
    
    section h2 {
        font-size: 3rem;
    }
}

/* Height-based media queries for better mobile experience */
@media (max-height: 600px) and (max-width: 991.98px) {
    #hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    #hero h2 {
        font-size: 1.25rem;
    }
    
    .hero-cta {
        margin-top: 1rem;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    #header,
    #footer,
    .breadcrumbs,
    .hero-cta {
        display: none !important;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --primary-dark: #000060;
        --neutral-color: #000000;
        --neutral-dark: #000000;
        --background-color: #FFFFFF;
        --background-light: #FFFFFF;
        --background-dark: #F0F0F0;
    }
    
    .card {
        border: 2px solid #000000;
    }
    
    .btn-primary {
        background-color: #000080;
        border: 2px solid #000080;
        color: #FFFFFF;
    }
    
    .btn-outline-primary {
        border: 2px solid #000080;
        color: #000080;
    }
}

/* Focus management for keyboard navigation */
@media (any-hover: none) {
    .card:hover,
    .feature-card:hover,
    .info-card:hover,
    .feature-item:hover {
        transform: none;
        box-shadow: var(--box-shadow-sm);
    }
}

/* Reduced data usage for slow connections */
@media (prefers-reduced-data: reduce) {
    .card-img-top,
    .blog-card .card-img-top,
    .service-card .card-img-top {
        background-color: var(--background-dark);
        min-height: 200px;
    }
    
    .team-member img {
        background-color: var(--background-dark);
        border-radius: 50%;
    }
}

/* Dark mode support */