/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 3rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.25rem;
    overflow-x: hidden;
}
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Forms */
    .contact-form {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Team Section */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Process Steps */
    .process-step .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Price Cards */
    .price-card {
        margin-bottom: 2rem;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Disable hover effects on mobile */
    .feature-card:hover,
    .service-card:hover,
    .review-card:hover,
    .case-study-card:hover,
    .blog-post:hover,
    .price-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* Disable animations on mobile when prefers-reduced-motion */
    * {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    .hero-section {
        padding-top: 110px;
    }
    
    .contact-form {
        padding: 1.75rem;
    }
    
    .btn {
        width: auto;
    }
    
    .service-card .card-img-top {
        height: 190px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding-top: 120px;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    /* Enable hover effects on tablets */
    .feature-card:hover,
    .service-card:hover,
    .review-card:hover,
    .case-study-card:hover,
    .blog-post:hover,
    .price-card:hover {
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
        transform: translateY(-3px);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section {
        padding-top: 120px;
    }
    
    .contact-form {
        max-width: 800px;
        margin: 0 auto;
    }
    
    /* Team grid adjustments */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Price cards alignment */
    .price-card {
        max-width: 350px;
        margin: 0 auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-4 {
        font-size: 2.75rem;
    }
    
    .lead {
        font-size: 1.2rem;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section {
        padding-top: 140px;
    }
    
    .display-4 {
        font-size: 3rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 2rem;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on high DPI displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    #footer,
    .btn,
    .breadcrumb-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero-section {
        background: none;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .card {
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        animation: none;
    }
    
    .card::before {
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-dark: #000000;
        --bg-light: #ffffff;
        --border-light: #000000;
    }
    
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Dark mode support */

/* Focus indicators for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    *:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .btn:focus,
    .form-control:focus {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.5);
    }
}

/* Container adjustments for better mobile experience */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Flexible grid adjustments */
@media (max-width: 991.98px) {
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

/* Ensure proper spacing on all devices */
@media (min-width: 576px) {
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Additional mobile optimizations */
@media (max-width: 575.98px) {
    /* Make sure text is readable on small screens */
    .small,
    small {
        font-size: 0.875rem;
    }
    
    /* Adjust icon sizes */
    .fa-3x {
        font-size: 2.5em;
    }
    
    .fa-2x {
        font-size: 1.75em;
    }
    
    /* Better touch targets */
    .btn,
    .nav-link,
    .form-control {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve readability */
    p,
    .card-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
} 

.hero-section h1 {
    padding-top: 200px;
}