/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.43rem !important;
    }
    
    .display-5 {
        font-size: 1.89rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .btn {
        font-size: 1.15rem;
        padding: 0.625rem 1.25rem;
    }
    
    .rounded-circle {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* No animations on mobile */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .rounded-circle {
        width: 100px !important;
        height: 100px !important;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-5 {
        font-size: 2.38rem;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .rounded-circle {
        width: 110px !important;
        height: 110px !important;
    }
    
    section {
        padding: 3.5rem 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .display-5 {
        font-size: 2.63rem;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    section {
        padding: 5rem 0;
    }
}

/* Navbar Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--secondary-color);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }
}

/* Hero Section Responsive */
@media (max-width: 767.98px) {
    #hero {
        min-height: 70vh;
        text-align: center;
    }
    
    #hero .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    .hero-shapes {
        display: none;
    }
}

/* Cards Responsive */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-title {
        font-size: 1.30rem;
    }
}

/* Team Section Responsive */
@media (max-width: 575.98px) {
    .col-lg-2.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Process Steps Responsive */
@media (max-width: 767.98px) {
    .col-lg-2.col-md-4.col-sm-6 {
        margin-bottom: 2rem;
    }
    
    .bg-primary.rounded-circle {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Form Responsive */
@media (max-width: 767.98px) {
    .col-lg-8 form {
        margin-bottom: 2rem;
    }
}

/* Gallery Responsive */
@media (max-width: 575.98px) {
    #gallery .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
}

/* Footer Responsive */
@media (max-width: 767.98px) {
    #footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    #footer .row.align-items-center > div {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Pricing Cards Responsive */
@media (max-width: 991.98px) {
    .col-lg-4.col-md-6:last-child {
        margin-top: 1rem;
    }
}

/* Services Grid Responsive */
@media (max-width: 767.98px) {
    .col-lg-4.col-md-6 {
        margin-bottom: 1.66rem;
    }
}

/* Features List Responsive */
@media (max-width: 767.98px) {
    .col-lg-6 .d-flex {
        margin-bottom: 1.76rem;
    }
    
    .flex-shrink-0 {
        margin-right: 1rem !important;
    }
}

/* Blog Grid Responsive */
@media (max-width: 991.98px) {
    #blog .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Reviews Grid Responsive */
@media (max-width: 767.98px) {
    #reviews .col-lg-4.col-md-6 {
        margin-bottom: 1.60rem;
    }
}

/* Case Studies Responsive */
@media (max-width: 991.98px) {
    #casestudy .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Additional Pages Responsive */
@media (max-width: 767.98px) {
    .breadcrumb {
        padding: 1rem 0;
    }
}

/* Utility Classes for Mobile */
@media (max-width: 767.98px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .mb-mobile-2 {
        margin-bottom: 1rem !important;
    }
    
    .px-mobile-3 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    .rounded-circle,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #footer,
    .btn,
    .hero-shapes {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .card {
        border: 1px solid #d8d8d8;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    /* No animations on mobile for accessibility */
    @media (max-width: 767.98px) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Dark Mode Support (if needed in future) */