/* Responsive Design - Mobile First Approach */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile as required */
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    /* Typography adjustments */
    h1, .display-4 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navbar brand smaller on mobile */
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    /* Hero section mobile */
    .hero {
        padding-top: 80px;
        text-align: center;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0.5rem 0;
        display: block;
    }
    
    /* Section padding reduction */
    section {
        padding: 3rem 0;
    }
    
    /* Cards spacing */
    .feature-card, .service-card, .price-card, .review-card, .faq-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    /* Team member images smaller */
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Contact form mobile */
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Gallery images spacing */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer mobile */
    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) {
    h1, .display-4 {
        font-size: 2.25rem;
    }
    
    .hero {
        padding-top: 90px;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Re-enable animations for tablet and above */
    * {
        animation: initial !important;
        transition: initial !important;
        transform: initial !important;
    }
    
    /* Apply responsive animation preferences */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
    
    .hero {
        padding-top: 100px;
    }
    
    /* Adjust grid for tablets */
    .service-card, .price-card {
        margin-bottom: 2rem;
    }
    
    /* Team section adjustments */
    .team-member {
        margin-bottom: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Full animations for desktop */
    * {
        animation: initial !important;
        transition: initial !important;
        transform: initial !important;
    }
    
    /* Apply responsive animation preferences */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
    
    /* Hero section desktop optimization */
    .hero-image {
        padding-left: 2rem;
    }
    
    /* Services grid optimization */
    .services .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
    
    /* FAQ grid optimization */
    .faq .col-md-6:nth-child(2n+1) {
        clear: left;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-max-width);
    }
    
    /* Larger hero content */
    .hero h1 {
        font-size: 3rem;
    padding-top: 150px;
}
    
    /* Enhanced spacing for large screens */
    .hero-image {
        padding-left: 3rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
}

/* Dark mode support */

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 667px) {
    .hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and non-essential elements */
    .navbar, .hero-buttons, footer {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card, .feature-card, .service-card {
        border: 1pt solid #ccc;
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    /* Enhanced accessibility for reduced motion */
    .hero {
        background: var(--primary-light);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .feature-card:hover, .service-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #8B4513;
        --accent-color: #006400;
        --warning-color: #8B0000;
        --info-color: #000080;
    }
    
    .btn-primary {
        background-color: #000080;
        border-color: #000080;
    }
    
    .navbar-brand, .text-primary {
        color: #000080;
    }
} 