/* Mobile First Responsive Styles */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.913px) {
    .display-4 {
        font-size: 1.96rem;
    }
    
    .navbar-brand {
        font-size: 1.28rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-title {
        font-size: 1.24rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .fa-3x {
        font-size: 2rem;
    }
    
    .fa-2x {
        font-size: 1.60rem;
    }
    
    #hero {
        min-height: 70vh;
        padding: 1rem 0;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    #hero {
        min-height: 80vh;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.40rem;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    .container {
        max-width: 720px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .card-img-top {
        height: 220px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .card-img-top {
        height: 240px;
    }
}

/* Mobile Navigation Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 0.5rem;
        margin-top: 0.80rem;
        padding: 1rem;
        box-shadow: 0 8px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid #c1d2e6;
        margin-bottom: 0.40rem;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

/* Hero Section Mobile Adjustments */
@media (max-width: 991.98px) {
    #hero .row {
        flex-direction: column-reverse;
    }
    
    #hero .col-lg-6:first-child {
        text-align: center;
        margin-top: 2rem;
    }
    
    #hero img {
        max-width: 80%;
        height: auto;
    }
}

/* Card Responsive Adjustments */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1.68rem;
    }
    
    .card-body {
        text-align: center;
    }
    
    .h-100 {
        height: auto !important;
    }
}

/* Form Responsive Adjustments */
@media (max-width: 767.98px) {
    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    .form-label {
        font-size: 1.05rem;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
}

/* Gallery Mobile Adjustments */
@media (max-width: 767.98px) {
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    #gallery img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
}

/* Team Section Mobile */
@media (max-width: 767.98px) {
    #team .col-md-6 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
}

/* Process Section Mobile */
@media (max-width: 991.98px) {
    #process .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    #process .rounded-circle {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Footer Mobile Adjustments */
@media (max-width: 767.98px) {
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    #footer .row:last-child .col-md-6 {
        text-align: center;
        margin-bottom: 1rem;
    }
}

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

/* Animation Adjustments for Mobile */
@media (max-width: 767.98px) {
    .card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
        filter: none;
    }
}

/* Accessibility Improvements */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Print Responsive Styles */
@media print {
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .col-lg-4,
    .col-lg-6,
    .col-lg-8,
    .col-md-4,
    .col-md-6 {
        width: 100% !important;
        float: none !important;
    }
    
    .py-5 {
        padding: 1rem 0 !important;
    }
    
    .mb-5 {
        margin-bottom: 1rem !important;
    }
}

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

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .py-5 {
        padding: 1.5rem 0 !important;
    }
}

/* Dark Mode Support (if needed) */