/* Responsive Styles for Plant-Based Meal Prep Service */

/* Mobile First - Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .navbar-brand { font-size: 1.25rem !important; }
    .navbar-nav .nav-link { padding: 0.75rem 1rem; text-align: center; }
    
    .hero-section { padding: 2rem 0; min-height: 70vh; }
    .hero-section h1 { font-size: 1.75rem; }
    .hero-section h2 { font-size: 1.25rem; }
    
    .btn { padding: 10px 20px; font-size: 0.875rem; width: 100%; margin-bottom: 0.5rem; }
    .card-body { padding: 1rem; }
    
    .team-member img { width: 100px; height: 100px; }
    .step-number { width: 50px; height: 50px; font-size: 1.25rem; }
    
    section { padding: 2rem 0; }
    footer { text-align: center; }
    footer .col-lg-4 { margin-bottom: 2rem; }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section { min-height: 80vh; }
    .hero-section h1 { font-size: 2.25rem; }
    .btn { width: auto; display: inline-block; margin-right: 0.5rem; }
    section { padding: 3rem 0; }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section { min-height: 90vh; }
    .card-img-top { height: 200px; }
    .gallery img { height: 280px; }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section { min-height: 100vh; }
    .card-img-top { height: 220px; }
    .gallery img { height: 300px; }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
    .hero-section h1 { font-size: 3rem; }
    .hero-section h2 { font-size: 2.25rem; }
    .gallery img { height: 320px; }
}

/* Portrait Mobile */
@media (orientation: portrait) and (max-width: 768px) {
    .hero-section .row { flex-direction: column-reverse; }
    .col-lg-2, .col-md-4 { flex: 0 0 100%; max-width: 100%; margin-bottom: 1rem; }
}

/* Landscape Mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section { min-height: 80vh; padding: 1rem 0; }
    .hero-section h1 { font-size: 2rem; }
    section { padding: 2rem 0; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .card, .btn, .services-item, .feature-item { transition: none !important; }
    .card:hover, .btn:hover { transform: none !important; }
}

@media (prefers-contrast: high) {
    .card { border: 2px solid var(--primary-green) !important; }
    .btn-outline-primary { border-width: 3px; }
}

/* Touch Devices */
@media (any-hover: none) {
    .btn, .nav-link, .form-control { min-height: 44px; min-width: 44px; }
}

/* 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;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 0;
        min-height: 70vh;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Services and Feature Items */
    .services-item, .feature-item, .info-item,
    .protein-item, .planning-item, .benefit-item,
    .start-item, .impact-item, .practice-item,
    .food-item, .waste-item, .future-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Team Members */
    .team-member {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Process Steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Timeline */
    .timeline-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .contact-form .form-control {
        padding: 10px 12px;
        margin-bottom: 1rem;
    }
    
    /* FAQ */
    .accordion-button {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    /* Gallery */
    .gallery img {
        height: 200px;
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer {
        text-align: center;
    }
    
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Section Spacing */
    section {
        padding: 2rem 0;
    }
    
    /* Price Display */
    .price-display {
        font-size: 1.25rem;
    }
    
    .price-display span {
        font-size: 1.5rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
    }
    
    /* Team Members */
    .team-member img {
        width: 110px;
        height: 110px;
    }
    
    /* Gallery */
    .gallery img {
        height: 250px;
    }
    
    /* Section Spacing */
    section {
        padding: 3rem 0;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 90vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Services Grid */
    .services-item, .feature-item {
        margin-bottom: 1.5rem;
    }
    
    /* Team Layout */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Process Steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Contact Form */
    .contact-form .col-md-6 {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }
    
    /* Gallery Grid */
    #gallery .col-md-4 {
        padding: 0.5rem;
    }
    
    .gallery img {
        height: 280px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    /* Services Layout */
    .services-item, .feature-item {
        height: auto;
        min-height: 200px;
    }
    
    /* Team Grid */
    .team-member {
        margin-bottom: 1.5rem;
    }
    
    /* Gallery */
    .gallery img {
        height: 300px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container Max Width */
    .container {
        max-width: 1140px;
    }
    
    /* Hero Section */
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section h2 {
        font-size: 2.25rem;
    }
    
    .hero-section p {
        font-size: 1.125rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 250px;
    }
    
    /* Services Layout */
    .services-item, .feature-item {
        min-height: 220px;
    }
    
    /* Gallery */
    .gallery img {
        height: 320px;
    }
}

/* Ultra-wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Hero Section */
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section h2 {
        font-size: 2.5rem;
    }
    
    /* Large spacing for ultra-wide */
    section {
        padding: 5rem 0;
    }
}

/* Portrait Orientation */
@media (orientation: portrait) and (max-width: 768px) {
    /* Hero adjustments for portrait mobile */
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-top: 2rem;
    }
    
    /* Stack cards vertically */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Single column layout for small items */
    .col-lg-2, .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Additional pages 5-element sections */
    .info-item, .protein-item, .planning-item, .benefit-item, .start-item,
    .impact-item, .practice-item, .food-item, .waste-item, .future-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape mobile */
    .hero-section {
        min-height: 80vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Reduce section spacing */
    section {
        padding: 2rem 0;
    }
    
    /* Navbar adjustment */
    .navbar {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images are crisp on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Slightly thinner borders for crisp appearance */
    .card, .form-control, .btn {
        border-width: 0.5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Note: Based on user requirements, we're not implementing dark theme for accessibility */
    /* But we can add subtle adjustments if needed */
}

/* Reduced Data / Slow Connections */
@media (prefers-reduced-data: reduce) {
    /* Disable background images on slow connections */
    .hero-section::before {
        display: none;
    }
    
    /* Simplify gradients */
    .bg-light {
        background: var(--warm-beige) !important;
    }
    
    /* Remove hover effects that might cause repaints */
    .card:hover,
    .services-item:hover,
    .feature-item:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
}

/* Print Specific Responsive */
@media print {
    /* Ensure proper page breaks */
    .hero-section,
    section {
        page-break-inside: avoid;
    }
    
    /* Single column layout for print */
    .col-lg-6, .col-lg-4, .col-lg-3, .col-lg-2,
    .col-md-6, .col-md-4, .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Hide interactive elements */
    .btn, .form-control, .accordion-button {
        display: none !important;
    }
    
    /* Simplify colors for print */
    * {
        color: #000 !important;
        background: #fff !important;
    }
}

/* Focus and Keyboard Navigation */
@media (any-hover: none) {
    /* Touch devices - remove hover effects */
    .card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none;
        color: inherit;
    }
    
    /* Larger touch targets */
    .btn, .nav-link, .form-control {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Accessibility - High Contrast */
@media (prefers-contrast: high) {
    /* Ensure all elements meet contrast requirements */
    .card {
        border: 2px solid var(--primary-green) !important;
    }
    
    .btn-outline-primary {
        border-width: 3px;
    }
    
    /* Higher contrast for text */
    p, .card-text {
        color: #000 !important;
    }
}

/* Animation Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Ensure all animations respect user preferences */
    .card, .btn, .services-item, .feature-item,
    .team-member img, #gallery img {
        transition: none !important;
    }
    
    /* Remove transform animations */
    .card:hover, .btn:hover {
        transform: none !important;
    }
    
    /* Keep focus indicators for accessibility */
    .btn:focus, .form-control:focus {
        outline: 3px solid var(--accent-lime);
        outline-offset: 2px;
    }
} 