/* PlantPop Markets - Responsive CSS */

/* Mobile First Approach - Base styles for mobile */

/* Mobile Specific Variables */
:root {
    --mobile-padding: 1rem;
    --mobile-section-padding: 3rem 0;
}

/* Disable scroll animations on mobile */
@media (max-width: 767.98px) {
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
    }
    
    /* Remove any custom scroll-triggered animations */
    .sal-animate {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography Scaling */
    h1, .display-4 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    h4 {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    p.lead {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Section Padding */
    section {
        padding: var(--mobile-section-padding);
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-content {
        padding: var(--mobile-padding);
        margin-bottom: 2rem;
    padding-top: 200px;
}
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.375rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        background-color: rgba(255, 255, 255, 0.98);
        border-radius: 0.5rem;
        padding: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
    
    /* Services Cards */
    #services .card-img-top {
        height: 200px;
    }
    
    /* Team Images */
    #team img {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    /* Process Steps */
    .process-step .step-number,
    .timeline-item .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Footer */
    #footer {
        text-align: center;
    }
    
    #footer .row > div {
        margin-bottom: 2rem;
    }
    
    /* Gallery */
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Blog Grid */
    #blog_grid .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Still disable scroll animations */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
    }
    
    /* Typography */
    h1, .display-4 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.675rem;
    }
    
    /* Section Padding */
    section {
        padding: 4rem 0;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
    }
    
    /* Buttons */
    .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Team Layout */
    #team .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
    
    /* Process and Timeline */
    .col-lg-2.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Re-enable animations on tablet and up */
    section {
        padding: 4.5rem 0;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 85vh;
    }
    
    /* Navigation */
    .navbar {
        padding: 1.25rem 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    #services .card-img-top {
        height: 240px;
    }
    
    /* Team Layout */
    #team .col-lg-2 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
        margin-bottom: 2rem;
    }
    
    /* Process Steps - 2 per row on tablet */
    .col-lg-2.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
    
    /* Footer */
    #footer .text-md-end {
        text-align: left !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full animations enabled */
    section {
        padding: 5rem 0;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 90vh;
    }
    
    /* Typography */
    h1, .display-4 {
        font-size: 2.5rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 240px;
    }
    
    #services .card-img-top {
        height: 260px;
    }
    
    /* Team Full Layout */
    #team .col-lg-2 {
        margin-bottom: 1.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Optimal desktop experience */
    section {
        padding: 5.5rem 0;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Container max-width adjustment */
    .container {
        max-width: 1200px;
    }
    
    /* Typography */
    h1, .display-4 {
        font-size: 2.75rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 260px;
    }
    
    #services .card-img-top {
        height: 280px;
    }
    
    /* Enhanced hover effects on large screens */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 1.5rem 2.5rem rgba(45, 95, 63, 0.2);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #1a5d32;
        --secondary-green: #2d7a45;
        --charcoal: #000000;
        --pure-white: #ffffff;
    }
    
    .btn-success {
        background-color: #000000;
        border-color: #000000;
        color: #ffffff;
    }
    
    .btn-success:hover {
        background-color: #333333;
        border-color: #333333;
    }
    
    .card {
        border: 2px solid #000000;
    }
}

/* Print optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    #footer,
    .btn,
    [data-sal] {
        display: none !important;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000000;
    }
    
    h1, h2, h3, h4, h5 {
        color: #000000;
        page-break-after: avoid;
    }
    
    /* Remove backgrounds and shadows */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Optimize spacing */
    section {
        padding: 1rem 0;
    }
    
    .container {
        max-width: none;
        width: 100%;
    }
}

/* Motion preferences - Enhanced */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable all transform hover effects */
    .card:hover,
    .btn:hover,
    img:hover {
        transform: none !important;
    }
    
    /* Remove parallax and decorative animations */
    .hero-section::before {
        display: none;
    }
}

/* Focus management for mobile */
@media (max-width: 767.98px) {
    a:focus,
    button:focus,
    .btn:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 3px solid var(--primary-green);
        outline-offset: 2px;
    }
    
    /* Larger touch targets */
    .btn,
    .nav-link,
    .form-control {
        min-height: 44px;
    }
    
    /* Improved form spacing on mobile */
    .form-group,
    .mb-3 {
        margin-bottom: 1.5rem;
    }
}
