/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography Adjustments */
    .navbar-brand {
        font-size: 1.12rem !important;
    }
    
    h1, .display-5 {
        font-size: 1.87rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.56rem;
        line-height: 1.3;
    }
    
    h3, h4, h5 {
        font-size: 1.32rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 70px 0 30px;
        text-align: center;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    /* Button Adjustments */
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Card Adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
    
    /* Section Spacing */
    section {
        padding: 40px 0;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Form Adjustments */
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Team Images */
    .rounded-circle {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Gallery Grid */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Pricing Cards */
    .display-4 {
        font-size: 2rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Navigation */
    .navbar-nav {
        text-align: center;
    }
    
    .nav-link {
        padding: 0.75rem 0;
    }
    
    /* Disable animations on mobile for better performance */
    @media (prefers-reduced-motion: no-preference) {
        .card:hover {
            transform: none;
        }
        
        .btn-primary:hover {
            transform: none;
        }
        
        .rounded-circle:hover {
            transform: none;
        }
        
        .img-fluid:hover {
            transform: none;
        }
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    h1, .display-5 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.82rem;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .rounded-circle {
        width: 140px !important;
        height: 140px !important;
    }
    
    .btn {
        width: auto;
        display: inline-block;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 90px 0 50px;
    }
    
    h1, .display-5 {
        font-size: 2.37rem;
    }
    
    h2 {
        font-size: 1.97rem;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    section {
        padding: 70px 0;
    }
    
    /* Tablet specific adjustments */
    .col-md-6.col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Services grid adjustment */
    #services .row.g-4 {
        row-gap: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    section {
        padding: 80px 0;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section {
        padding: 120px 0 80px;
    }
    
    section {
        padding: 100px 0;
    }
    
    h1, .display-5 {
        font-size: 2.83rem;
    }
    
    h2 {
        font-size: 2.28rem;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: 60px 0 30px;
        min-height: auto;
    }
    
    .min-vh-100 {
        min-height: auto;
    }
    
    section {
        padding: 40px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    .img-fluid,
    .rounded-circle {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #footer,
    .btn,
    #gallery {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #c3bfc0;
        page-break-inside: avoid;
    }
    
    section {
        padding: 20px 0;
    }
}

/* Accessibility Improvements */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #4d2c94;
        --text-color: #000000;
        --text-muted: #393534;
    }
    
    .card {
        border: 2px solid #434343;
    }
    
    .btn-primary {
        background-color: #442aaa;
        border-color: #482a85;
    }
}

/* Focus Styles for Better Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Dark Mode Support (if browser supports it) */

.hero-section h1 {
    padding-top: 275px;
}