/* ========================================
   EcoPopCafé - Responsive Stylesheet
   Mobile-First Responsive Design
======================================== */

/* Base Mobile Styles (320px and up) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    .display-4 {
        font-size: 2rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Disable animations on mobile to respect reduced motion */
    .shape-1, .shape-2 {
        animation: none;
        display: none;
    }
    
    /* Hero section mobile adjustments */
    #hero {
        padding: 2rem 0;
        min-height: 70vh;
    }
    
    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-cta .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Section padding reduction for mobile */
    section {
        padding: 2rem 0;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }
    
    /* Card adjustments */
    .feature-card, .service-card, .pricing-card, .review-card {
        margin-bottom: 1.5rem;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 150px;
    }
    
    /* Team member images */
    .team-member img {
        width: 150px;
        height: 150px;
    }
    
    /* Process steps mobile layout */
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number, .step-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Contact form mobile adjustments */
    .contact-form {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    /* Gallery mobile optimization */
    #gallery img {
        height: 120px;
        margin-bottom: 0.5rem;
    }
    
    /* Timeline mobile adjustments */
    .timeline-item {
        padding-left: 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* Statistics display mobile */
    .stat-number {
        font-size: 2rem;
    }
    
    /* Footer mobile adjustments */
    #footer {
        text-align: center;
    }
    
    #footer .row > div {
        margin-bottom: 2rem;
    }
    
    /* Button sizing for mobile */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Card spacing adjustments */
    .row.g-4 > * {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile-specific utility classes */
    .mobile-center {
        text-align: center;
    }
    
    .mobile-hide {
        display: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    #hero {
        min-height: 80vh;
    }
    
    .hero-cta {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 180px;
    }
    
    .team-member img {
        width: 175px;
        height: 175px;
    }
    
    .step-number, .step-circle {
        width: 60px;
        height: 60px;
    }
    
    #gallery img {
        height: 150px;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    .hero-cta .btn {
        margin-right: 1rem;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 200px;
    }
    
    .team-member img {
        width: 200px;
        height: 200px;
    }
    
    .step-number, .step-circle {
        width: 70px;
        height: 70px;
    }
    
    #gallery img {
        height: 180px;
    }
    
    /* Tablet-specific adjustments */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .display-4 {
        font-size: 2.75rem;
    }
    
    #hero {
        min-height: 100vh;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 220px;
    }
    
    .team-member img {
        width: 220px;
        height: 220px;
    }
    
    #gallery img {
        height: 200px;
    }
    
    /* Desktop optimizations */
    .feature-card:hover, .service-card:hover, .pricing-card:hover {
        transform: translateY(-8px);
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .display-4 {
        font-size: 3rem;
    }
    
    .container {
        max-width: 1200px;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 240px;
    }
    
    .team-member img {
        width: 240px;
        height: 240px;
    }
    
    #gallery img {
        height: 220px;
    }
    
    /* Large desktop enhancements */
    .hero-shapes .shape-1 {
        width: 400px;
        height: 400px;
    }
    
    .hero-shapes .shape-2 {
        width: 300px;
        height: 300px;
    }
    
    section {
        padding: 5rem 0;
    }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .display-4 {
        font-size: 3.5rem;
    }
    
    .service-card img, .case-study-card img, .blog-post img {
        height: 260px;
    }
    
    #gallery img {
        height: 240px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 80vh;
        padding: 1rem 0;
    }
    
    .hero-cta {
        margin-top: 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .navbar {
        min-height: auto;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent;
        color: black;
        box-shadow: none;
        text-shadow: none;
    }
    
    .navbar, .hero-shapes, #gallery, .contact-form {
        display: none;
    }
    
    .container {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .service-card, .pricing-card, .review-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* High DPI/Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon, .team-member img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode preferences */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
    
    .hero-shapes {
        display: none;
    }
    
    .feature-card:hover, .service-card:hover, .pricing-card:hover,
    .review-card:hover, .case-study-card:hover {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feature-card, .service-card, .pricing-card, .review-card,
    .case-study-card, .faq-card, .contact-form {
        border: 2px solid;
    }
    
    .btn {
        border-width: 2px;
        font-weight: bold;
    }
    
    .text-muted {
        color: #333;
    }
}

/* Focus management for keyboard navigation */
@media (max-width: 991.98px) {
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(46, 125, 79, 0.25);
    }
    
    .nav-link:focus {
        background-color: rgba(46, 125, 79, 0.1);
        border-radius: 0.25rem;
    }
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .feature-card, .service-card, .pricing-card {
        padding: 1.5rem;
    }
    
    /* Increase touch targets */
    .contact-info a, .footer a {
        display: inline-block;
        padding: 0.5rem;
        margin: 0.25rem;
    }
}

/* Hover capability detection */
@media (hover: none) {
    .feature-card:hover, .service-card:hover, .pricing-card:hover,
    .review-card:hover, .case-study-card:hover, .team-member:hover img {
        transform: none;
        box-shadow: none;
    }
}

/* Container queries for modern browsers */
@supports (container-type: inline-size) {
    .service-card {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .service-card .btn {
            width: 100%;
            margin-top: 1rem;
        }
    }
}

/* Grid fallback for older browsers */
@supports not (display: grid) {
    .row {
        display: flex;
        flex-wrap: wrap;
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .col-lg-4, .col-md-6, .col-sm-6 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Flexbox fallback */
@supports not (display: flex) {
    .hero-cta {
        text-align: center;
    }
    
    .hero-cta .btn {
        display: inline-block;
        margin: 0.5rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 767.98px) {
    /* Reduce transform calculations on mobile */
    .feature-card, .service-card, .pricing-card, .review-card {
        will-change: auto;
    }
    
    /* Optimize images for mobile */
    img {
        image-rendering: optimizeSpeed;
    }
    
    /* Reduce box shadows on mobile for performance */
    .shadow-sm, .shadow {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .shadow-lg {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Accessibility enhancements for mobile */
@media (max-width: 575.98px) {
    /* Ensure minimum touch target size */
    button, .btn, a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve focus visibility on mobile */
    :focus {
        outline: 3px solid #007bff;
        outline-offset: 2px;
    }
    
    /* Ensure readable font sizes */
    body {
        font-size: 16px;
        line-height: 1.5;
    overflow-x: hidden;
}
    
    /* Improve form usability on mobile */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Better spacing for mobile reading */
    p, .lead {
        margin-bottom: 1.5rem;
    }
}

/* Content adaptations for very small screens */
@media (max-width: 360px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    #gallery img {
        height: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Large screens optimization */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    /* Prevent content from becoming too wide on very large screens */
    .col-lg-8.mx-auto {
        max-width: 600px;
    }
    
    section {
        padding: 6rem 0;
    }
    
    .display-4 {
        font-size: 4rem;
    }
} 