/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    body {
        padding-top: 70px;
    overflow-x: hidden;
}
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero Section Mobile */
    #hero {
        min-height: 80vh;
        text-align: center;
    }
    
    #hero .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    /* Typography Mobile */
    .display-5 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    h1, .h1 {
        font-size: 1.5rem;
    }
    
    h2, .h2 {
        font-size: 1.3rem;
    }
    
    h3, .h3 {
        font-size: 1.2rem;
    }
    
    .lead {
        font-size: 0.95rem;
    }
    
    /* Cards Mobile */
    .card-img-top {
        height: 150px;
    }
    
    /* Section Padding Mobile */
    section {
        padding: 2.5rem 0;
    }
    
    /* Team Images Mobile */
    #team img {
        width: 80px;
        height: 80px;
    }
    
    /* Timeline Mobile */
    .timeline-year {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Footer Mobile */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Form Mobile */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Gallery Mobile */
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* FAQ Mobile */
    #faq .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    /* Blog Mobile */
    #blog .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Services Mobile */
    #services .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* No animations on mobile for performance */
    @media (prefers-reduced-motion: no-preference) {
        * {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    #hero {
        min-height: 85vh;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    #team img {
        width: 100px;
        height: 100px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-5 {
        font-size: 2.2rem;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    section {
        padding: 3.5rem 0;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Tablet specific adjustments */
    .col-md-6 {
        margin-bottom: 2rem;
    }
    
    #team img {
        width: 110px;
        height: 110px;
    }
    
    /* Tablet layout for services */
    #services .row {
        justify-content: center;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .display-5 {
        font-size: 2.3rem;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    /* Enhanced spacing for large screens */
    .hero-shapes .shape-blob-1 {
        width: 400px;
        height: 400px;
    }
    
    .hero-shapes .shape-blob-2 {
        width: 250px;
        height: 250px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .card-img-top,
    #gallery img,
    #team img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation Specific */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    body {
        padding-top: 60px;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #footer,
    .btn,
    .breadcrumb {
        display: none;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066CC;
        --text-color: #000000;
        --text-light: #333333;
        --secondary-color: #FFFFFF;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .hero-shapes {
        display: none;
    }
}

/* Dark Mode Support */