/* Smart Indoor Air Quality Monitors - Responsive CSS */

/* Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile for better performance */
    * {
        animation-duration: 0s;
        transition-duration: 0s;
    }
    
    /* Typography adjustments */
    .display-5 {
        font-size: 1.89rem;
    }
    
    h1, .h1 {
        font-size: 1.64rem;
    }
    
    h2, .h2 {
        font-size: 1.47rem;
    }
    
    h3, .h3 {
        font-size: 1.29rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.31rem;
    }
    
    /* Hero section */
    #hero {
        padding-top: 80px;
        text-align: center;
    }
    
    #hero .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.60rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Team images */
    #team img {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    /* Padding adjustments */
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Contact form */
    .form-control {
        padding: 10px 12px;
        font-size: 1.00rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 1.05rem;
    }
    
    /* Gallery images */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Disable animations on mobile for better performance */
    [data-aos] {
        animation: none;
        transform: none;
        opacity: 1;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    #hero {
        padding-top: 90px;
    }
    
    .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) {
    .display-5 {
        font-size: 2.21rem;
    }
    
    #hero {
        padding-top: 95px;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    #team img {
        width: 110px;
        height: 110px;
    }
    
    /* Adjust grid spacing */
    .g-4 > * {
        margin-bottom: 1.69rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-5 {
        font-size: 2.82rem;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 768px) {
    #hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card img,
    #gallery img,
    #team img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Dark Mode Support */

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #gallery,
    .breadcrumb-nav {
        display: none;
    }
    
    /* Adjust colors for print */
    * {
        color: black;
        background: white;
    }
    
    /* Ensure readability */
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Add page breaks */
    section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    /* Remove hover effects that use transform */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Focus Visible Support */
@supports selector(:focus-visible) {
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: none;
    }
    
    .btn:focus-visible,
    .form-control:focus-visible,
    .nav-link:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Container Queries Support */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-title {
            font-size: 1.01rem;
        }
        
        .card-text {
            font-size: 0.86rem;
        }
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 767.98px) {
    /* Improve touch targets */
    .btn,
    .nav-link,
    .card {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    /* Optimize text selection */
    .card-title,
    .card-text {
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px;
    }
    
    /* Optimize scrolling */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve button spacing */
    .btn + .btn {
        margin-top: 0.74rem;
    }
}

/* Tablet Specific Optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Optimize for tablet touch */
    .card:hover {
        transform: none;
    }
    
    .btn {
        min-height: 48px;
    }
    
    /* Improve layout spacing */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
} 