/* ========================================
   EcoTunes - Responsive CSS
   Mobile-First Responsive Design
   ======================================== */

/* Base Mobile Styles (< 576px) */
@media (max-width: 575.98px) {
    /* Typography Adjustments */
    h1, .h1 {
        font-size: 1.79rem;
    }
    
    h2, .h2 {
        font-size: 1.57rem;
    }
    
    h3, .h3 {
        font-size: 1.38rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.13rem !important;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.92rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    #hero .container {
        text-align: center;
    }
    
    #hero img {
        margin-top: 2rem;
    }
    
    /* Sections */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    }
    
    /* Team Images */
    #team .card-img-top {
        width: 120px;
        height: 120px;
    }
    
    /* Contact Form */
    #contact .col-lg-8,
    #contact .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 1.67rem;
    }
    
    /* Process Steps */
    .col-lg-2-4 {
        width: 100% !important;
        margin-bottom: 1.62rem;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Breadcrumb */
    .breadcrumb-item img {
        width: 16px;
        height: 16px;
    }
}

/* Small Devices (≥ 576px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    #hero {
        min-height: 85vh;
    }
    
    /* Process grid */
    .col-lg-2-4 {
        width: 50% !important;
    }
    
    /* Team images */
    #team .card-img-top {
        width: 140px;
        height: 140px;
    }
    
    /* Cards spacing */
    .g-4 > * {
        margin-bottom: 1.58rem;
    }
}

/* Medium Devices (≥ 768px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation spacing */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Hero section */
    #hero .container .row {
        align-items: center;
    }
    
    /* Team grid adjustments */
    #team .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Process steps */
    .col-lg-2-4 {
        width: 50% !important;
    }
    
    /* Services grid */
    #services .col-md-6 {
        margin-bottom: 1.74rem;
    }
    
    /* Footer columns */
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Large Devices (≥ 992px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.4rem;
    }
    
    /* Process layout */
    .col-lg-2-4 {
        width: 20%;
    }
    
    /* Cards in grids */
    .col-lg-4 .card,
    .col-lg-3 .card {
        height: 100%;
    }
}

/* Extra Large Devices (≥ 1200px) */
@media (min-width: 1200px) {
    /* Full layout */
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing */
    .navbar-nav .nav-link {
        margin: 0 0.6rem;
    }
    
    /* Larger hero content */
    #hero .display-4 {
        font-size: 2.54rem;
    }
    
    /* Process steps full width */
    .col-lg-2-4 {
        width: 20%;
    }
    
    /* Enhanced card spacing */
    .g-4 > * {
        padding: 1.5rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape phones */
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    /* Navbar adjustments */
    .navbar {
        padding: 0.5rem 0;
    }
    
    /* Section padding */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Sharper images and borders */
    .card {
        border-width: 0.5px;
    }
    
    /* Crisper icons */
    .fas, .far, .fab {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark Mode Support */

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #contact form,
    footer {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .py-5 {
        padding: 1rem 0 !important;
    }
    
    /* Ensure content is readable */
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
    
    /* Remove shadows and effects */
    .card,
    .shadow,
    .shadow-sm {
        box-shadow: none !important;
        border: 1px solid #cbcbcb;
    }
    
    /* Simplify backgrounds */
    .bg-light,
    .bg-primary,
    .bg-success {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover effects */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
}

/* Focus Management for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    /* Enhanced focus indicators */
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-green);
        outline-offset: 2px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        padding: 1rem 0.5rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Larger form elements */
    .form-control {
        min-height: 44px;
        padding: 0.875rem 1rem;
    }
    
    /* Touch-friendly gallery */
    #gallery img {
        margin-bottom: 1rem;
    }
}

/* Container Query Support (Future-proofing) */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-body {
            padding: 0.75rem;
        }
        
        .card-title {
            font-size: 0.94rem;
        }
    }
}

/* Flexible Grid Utilities */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Fluid Typography */
@media (min-width: 576px) {
    .fluid-text {
        font-size: clamp(1rem, 2.5vw, 1.25rem);
    }
}

/* Image Responsiveness */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 575.98px) {
    .responsive-image {
        max-height: 200px;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .responsive-image {
        max-height: 250px;
    }
}

@media (min-width: 992px) {
    .responsive-image {
        max-height: 300px;
    }
} 