/* ========================================
   SOLAR COMMUNITY TEMPLATE - RESPONSIVE CSS
   ======================================== */

/* Mobile First Approach */
/* Base styles are for mobile, then scale up */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    :root {
        --font-size-h1: 1.5rem;
        --font-size-h2: 1.375rem;
        --font-size-h3: 1.25rem;
        --section-padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        background: rgba(43, 122, 11, 0.95);
        padding: 1rem;
        border-radius: 10px;
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 0;
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    padding-top: 150px;
}
    
    .hero-section .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* Cards */
    .feature-card,
    .service-card,
    .price-card,
    .review-card,
    .case-study-card,
    .blog-card {
        margin-bottom: 1.5rem;
    }
    
    .price-card.featured {
        transform: none;
        border-width: 2px;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 150px;
    }
    
    /* Team Members */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Process Steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Gallery */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Hide some complex elements on very small screens */
    .hero-bg {
        opacity: 0.05;
    }
    
    /* Make text more readable on small screens */
    body {
        font-size: 0.9rem;
    }
    
    /* Reduce margins and padding */
    section {
        padding: 2rem 0;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.125rem !important;
    }
    
    /* Hero */
    .hero-section h1 {
        font-size: 2rem;
    padding-top: 150px;
}
    
    /* Cards in 2 columns for better use of space */
    .feature-card,
    .service-card {
        height: auto;
        min-height: 300px;
    }
    
    /* Team members in 2 columns */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Contact form */
    .contact-form {
        padding: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .navbar-collapse {
        background: none;
        margin: 0;
        padding: 0;
    }
    
    .navbar-nav {
        text-align: left;
    }
    
    /* Hero */
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    padding-top: 150px;
}
    
    /* Grid adjustments */
    .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Service cards in 2 columns */
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Price cards */
    .price-card.featured {
        transform: scale(1.02);
    }
    
    /* Team members in 3 columns */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Reviews in 2-3 columns */
    .review-card {
        height: auto;
        min-height: 200px;
    }
    
    /* FAQ layout */
    .faq-item {
        margin-bottom: 1rem;
    }
    
    /* Gallery 3 columns */
    #gallery .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    /* Full desktop experience starts here */
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    padding-top: 150px;
}
    
    /* Adjust grid for better spacing */
    .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Service cards optimal size */
    .service-card .card-img-top {
        height: 200px;
    }
    
    /* Team layout optimization */
    .team-member {
        margin-bottom: 1rem;
    }
    
    /* Price card scaling */
    .price-card.featured {
        transform: scale(1.05);
    }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Full hero experience */
    .hero-section h1 {
        font-size: 2.25rem;
    padding-top: 150px;
}
    
    /* Optimal card sizing */
    .service-card .card-img-top,
    .blog-card .card-img-top,
    .case-study-card .card-img-top {
        height: 220px;
    }
    
    /* Enhanced spacing */
    .feature-card,
    .service-card,
    .price-card {
        padding: 2.5rem 2rem;
    }
    
    /* Team optimal layout */
    .team-member img {
        width: 140px;
        height: 140px;
    }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Scale up for ultra-wide */
    .hero-section h1 {
        font-size: 2.5rem;
    padding-top: 150px;
}
    
    .hero-section {
        padding: 0 2rem;
    }
    
    /* Larger card images */
    .service-card .card-img-top,
    .blog-card .card-img-top {
        height: 250px;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 80vh;
        padding: 1rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects for touch devices */
    .feature-card:hover,
    .service-card:hover,
    .price-card:hover,
    .case-study-card:hover,
    .blog-card:hover,
    .career-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .price-card.featured:hover {
        transform: scale(1.05);
    }
    
    /* Larger touch targets */
    .navbar-nav .nav-link {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Form controls */
    .form-control {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .hero-bg {
        background-size: cover;
        background-position: center;
    }
    
    /* Ensure crisp borders */
    .card, .btn, .form-control {
        border-width: 0.5px;
    }
}

/* Print Responsive */
@media print {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .container {
        max-width: none !important;
        width: 100% !important;
    }
    
    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, 
    .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8,
    .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        width: 100% !important;
        float: none !important;
    }
    
    .row {
        display: block !important;
    }
    
    .col-md-6 {
        width: 50% !important;
        float: left !important;
    }
    
    section {
        padding: 1rem 0 !important;
    }
    
    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .feature-card,
    .service-card,
    .price-card,
    .case-study-card,
    .blog-card,
    .career-card,
    .btn,
    .navbar-nav .nav-link,
    .form-control,
    #gallery img {
        transition: none !important;
        animation: none !important;
    }
    
    .price-card.featured {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #FFD700;
        --text-primary: #000000;
        --text-light: #FFFFFF;
        --complement-color: #FFFFFF;
    }
    
    .navbar {
        background: #000000 !important;
    }
    
    .feature-card,
    .service-card,
    .price-card,
    .review-card,
    .case-study-card,
    .blog-card,
    .career-card,
    .contact-form,
    .faq-item {
        border: 2px solid #000000;
        background: #FFFFFF;
    }
    
    .btn-primary {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 2px solid #000000 !important;
    }
}

/* Dark Mode Support */

/* Container Responsive Behavior */
.container-fluid {
    padding-right: 1rem;
    padding-left: 1rem;
}

/* Bootstrap Grid Enhancements */
@media (max-width: 575.98px) {
    .row {
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }
    
    .row > * {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
}

/* Improved Button Responsive */
@media (max-width: 767.98px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

/* Image Responsive Enhancements */
.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Table Responsive */
@media (max-width: 767.98px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Navigation Mobile Enhancements */
@media (max-width: 991.98px) {
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.25rem;
        border-radius: 0.375rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(43, 122, 11, 0.25);
    }
} 