/* =================================================================
   Responsive CSS - Mobile-First Approach
   Renewable Energy Microgrid Design Consulting Template
   ================================================================= */

/* Base Mobile Styles (up to 576px) */
@media (max-width: 575.98px) {
    /* Typography Adjustments */
    :root {
        --font-size-h1: 1.5rem;
        --font-size-h2: 1.375rem;
        --font-size-h3: 1.25rem;
        --font-size-h4: 1.125rem;
        --section-padding: 2rem 0;
        --card-padding: 1rem;
    }
    
    /* Container Padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        min-height: 80vh;
        text-align: center;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    padding-top: 225px;
}
    
    .hero-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    /* Navbar Mobile */
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    /* Cards Mobile */
    .feature-card,
    .service-card,
    .price-card,
    .team-card,
    .review-card,
    .case-card,
    .career-card,
    .info-card,
    .blog-card,
    .faq-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* Service Cards Mobile */
    .service-card .card-img-top {
        height: 200px;
        object-fit: cover;
    }
    
    /* Price Cards Mobile */
    .price-card .price-amount {
        font-size: 1.5rem;
    }
    
    /* Team Photos Mobile */
    .team-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Process Steps Mobile */
    .process-step {
        padding: 1rem 0.5rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Contact Form Mobile */
    .contact-form {
        padding: 1.5rem;
        margin: 0 -0.5rem;
    }
    
    /* Gallery Mobile */
    .gallery-img {
        height: 200px;
        margin-bottom: 1rem;
    }
    
    /* Footer Mobile */
    footer {
        text-align: center;
    }
    
    footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Disable animations on mobile for better performance */
    .sal-animate {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Small Tablets (576px - 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    .hero-section {
        min-height: 90vh;
    }
    
    /* Card grid adjustments */
    .feature-card,
    .info-card {
        margin-bottom: 1.5rem;
    }
    
    /* Team layout */
    .team-card {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Medium Tablets (768px - 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Section padding */
    :root {
        --section-padding: 3rem 0;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 95vh;
    }
    
    /* Service cards in 2 columns */
    .service-card .card-img-top {
        height: 220px;
    }
    
    /* Gallery grid */
    .gallery-img {
        height: 220px;
    }
}

/* Large Tablets and Small Desktops (992px - 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full section padding */
    :root {
        --section-padding: 4rem 0;
    }
    
    /* Service cards in 3 columns */
    .service-card .card-img-top {
        height: 240px;
    }
    
    /* Price cards better spacing */
    .price-card {
        margin-bottom: 2rem;
    }
}

/* Large Desktops (1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced spacing for large screens */
    .container {
        max-width: 1140px;
    }
    
    /* Hero enhancements */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Service cards optimal height */
    .service-card .card-img-top {
        height: 260px;
    }
    
    /* Gallery optimal height */
    .gallery-img {
        height: 280px;
    }
}

/* Extra Large Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced typography for very large screens */
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.75rem;
        --font-size-h3: 1.5rem;
    }
}

/* Landscape Mobile Devices */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 70vh;
        padding: 1rem 0;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        margin-top: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .breadcrumb-section,
    footer,
    .btn,
    [data-sal] {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card,
    .feature-card,
    .service-card {
        border: 1px solid #000;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions for users who prefer reduced motion */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .sal-animate {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero-section,
    .feature-card:hover,
    .service-card:hover,
    .gallery-img:hover {
        transform: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000;
        --text-light: #000000;
        --primary-color: #0066CC;
        --secondary-color: #006600;
        --accent-color: #CC0000;
    }
    
    .card,
    .feature-card,
    .service-card,
    .price-card {
        border: 2px solid #000000;
    }
    
    .btn-primary {
        background-color: #0066CC;
        border: 2px solid #000000;
        color: #FFFFFF;
    }
}

/* Focus Indicators for Better Accessibility */
@media (any-hover: none) {
    /* Touch device specific styles */
    .feature-card:hover,
    .service-card:hover,
    .gallery-img:hover {
        transform: none;
    }
    
    .btn,
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for high-density displays */
    .gallery-img,
    .service-card .card-img-top,
    .team-photo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
} 
/* Disable horizontal scroll on desktop resolutions */
@media (min-width: 992px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
}
