/* Smart Irrigation Pro - Responsive Stylesheet */

/* Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
    
    /* Team Section - 5 members on mobile */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Review Section - stack reviews vertically */
    .reviews-section .row {
        flex-direction: column;
    }
    
    .review-card {
        margin-bottom: 1.5rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 0;
        background-attachment: scroll;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Sections */
    .section {
        padding: 3rem 0;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 2rem 1rem;
    }
    
    .contact-info {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    /* Timeline */
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    /* Process Steps */
    .process-step {
        padding: 1.5rem 0.5rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Gallery */
    .gallery-image {
        height: 150px;
        margin-bottom: 1rem;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Utilities */
    .text-center-mobile {
        text-align: center !important;
    }
    
    .mb-mobile {
        margin-bottom: 2rem !important;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    /* Cards */
    .service-card .card-img-top,
    .blog-card .card-img-top,
    .commercial-card .card-img-top,
    .case-study-card .card-img-top {
        height: 180px;
    }
    
    /* Gallery */
    .gallery-image {
        height: 175px;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 2.5rem 1.5rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Cards */
    .card-columns {
        column-count: 2;
    }
    
    /* Timeline */
    .timeline-item {
        padding-left: 2rem;
    }
    
    /* Process Steps */
    .process-step {
        padding: 2rem 1rem;
    }
    
    /* Gallery */
    .gallery-image {
        height: 200px;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 3rem 2rem;
    }
    
    /* Footer */
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 2.75rem;
    }
    
    /* Cards */
    .card-columns {
        column-count: 3;
    }
    
    /* Gallery */
    .gallery-image {
        height: 220px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 3rem;
    }
    
    /* Container */
    .container {
        max-width: 1200px;
    }
    
    /* Cards */
    .card-columns {
        column-count: 4;
    }
    
    /* Gallery */
    .gallery-image {
        height: 250px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Adjust shadows for high DPI */
    .card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section {
        background-attachment: scroll !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #1B5E20;
        --secondary-color: #2E7D32;
        --text-dark: #000000;
        --text-light: #333333;
    }
    
    .card {
        border: 2px solid var(--primary-color);
    }
    
    .btn-primary {
        border-width: 3px;
    }
}

/* Dark Mode Support */

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .header-section,
    .footer,
    .btn,
    .navbar,
    nav,
    .breadcrumb-section {
        display: none !important;
    }
    
    /* Reset colors for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        break-after: avoid;
    }
    
    .card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Ensure proper spacing */
    .section {
        padding: 1rem 0 !important;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem !important;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .feature-card:hover,
    .feature-box:hover,
    .info-card:hover,
    .benefit-card:hover,
    .strategy-card:hover,
    .innovation-card:hover {
        transform: none !important;
        background: var(--white) !important;
    }
    
    /* Ensure buttons are easily tappable */
    .btn-primary,
    .btn-secondary {
        border-width: 2px;
        font-weight: 600;
    }
}

/* Reduced Data Mode */
@media (prefers-reduced-data: reduce) {
    /* Simplify gradients */
    .hero-section {
        background: var(--primary-color) !important;
    }
    
    /* Remove background images */
    .hero-section,
    .gallery-image {
        background-image: none !important;
    }
    
    /* Simplify shadows */
    .card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
}

/* Focus Management */
@media (any-hover: hover) {
    .btn:focus,
    .form-control:focus,
    .navbar-nav .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Responsive Typography Scale */
@media (min-width: 576px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 992px) {
    html {
        font-size: 18px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
}

/* Responsive Grid Helpers */
.col-xs-12 { width: 100%; }
.col-xs-6 { width: 50%; }
.col-xs-4 { width: 33.333%; }
.col-xs-3 { width: 25%; }

/* Responsive Spacing */
.p-responsive {
    padding: 1rem;
}

.m-responsive {
    margin: 1rem;
}

@media (min-width: 768px) {
    .p-responsive {
        padding: 2rem;
    }
    
    .m-responsive {
        margin: 2rem;
    }
}

@media (min-width: 992px) {
    .p-responsive {
        padding: 3rem;
    }
    
    .m-responsive {
        margin: 3rem;
    }
}

/* Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive Tables */
@media (max-width: 767.98px) {
    .table-responsive-stack tr,
    .table-responsive-stack td {
        display: block;
        border: none;
    }
    
    .table-responsive-stack td {
        padding-left: 50%;
        position: relative;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }
}

/* Responsive Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--white);
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid var(--bg-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Responsive Utilities */
.visible-xs { display: none !important; }
.visible-sm { display: none !important; }
.visible-md { display: none !important; }
.visible-lg { display: none !important; }
.visible-xl { display: none !important; }

@media (max-width: 575.98px) {
    .visible-xs { display: block !important; }
    .hidden-xs { display: none !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .visible-sm { display: block !important; }
    .hidden-sm { display: none !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .visible-md { display: block !important; }
    .hidden-md { display: none !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .visible-lg { display: block !important; }
    .hidden-lg { display: none !important; }
}

@media (min-width: 1200px) {
    .visible-xl { display: block !important; }
    .hidden-xl { display: none !important; }
} 