/* ==========================================
   AI Recipe Engine - Responsive CSS
   ========================================== */

/* Mobile First Approach - Base styles for mobile */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1, .display-1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-section .container {
        text-align: center;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Card spacing */
    .card-body {
        padding: 1rem;
    }
    
    /* Form adjustments */
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Section padding reduction */
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Team member images */
    .team img {
        width: 80px;
        height: 80px;
    }
    
    /* Gallery grid adjustment */
    #gallery .col-6 {
        padding: 2px;
    }
    
    /* Footer adjustments */
    footer .container {
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps mobile layout */
    .process .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    /* Timeline mobile adjustments */
    .timeline .card::before {
        display: none;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb-nav img {
        height: 30px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero section adjustments */
    .hero-section {
        padding-top: 100px;
    }
    
    h1, .display-1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    /* Card improvements */
    .card-img-top {
        height: 180px;
    }
    
    /* Button sizing */
    .btn-lg {
        padding: 12px 24px;
    }
    
    /* Section spacing */
    .py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* Team grid adjustment */
    .team .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation improvements */
    .navbar-nav {
        margin-top: 1rem;
    }
    
    /* Hero section tablet optimization */
    .hero-section {
        padding-top: 120px;
    }
    
    h1, .display-1 {
        font-size: 2.25rem;
    }
    
    /* Services grid optimization */
    .services .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
    
    /* Features layout */
    .features .col-lg-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Pricing cards */
    .pricing .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps tablet layout */
    .process .col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    /* Gallery optimization */
    #gallery .col-lg-2 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Contact form layout */
    .contact-form .col-lg-8 {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Hero section desktop optimization */
    .hero-section {
        padding-top: 140px;
    }
    
    /* Typography fine-tuning */
    h1, .display-1 {
        font-size: 2.5rem;
    }
    
    /* Card image optimization */
    .card-img-top {
        height: 220px;
    }
    
    /* Services grid spacing */
    .services .col-lg-4 {
        padding: 0 15px;
        margin-bottom: 2rem;
    }
    
    /* Team layout optimization */
    .team .col-lg-2 {
        margin-bottom: 1rem;
    }
    
    /* Process steps spacing */
    .process .col-lg-2 {
        padding: 0 10px;
    }
    
    /* FAQ layout */
    .faq .col-lg-6 {
        padding: 0 15px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Hero section large screen optimization */
    .hero-section {
        padding-top: 160px;
    }
    
    /* Typography scaling */
    h1, .display-1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Enhanced card images */
    .card-img-top {
        height: 250px;
    }
    
    /* Services grid enhancement */
    .services .col-lg-4 {
        padding: 0 20px;
        margin-bottom: 2.5rem;
    }
    
    /* Features spacing */
    .features .col-lg-6 {
        padding: 0 30px;
    }
    
    /* Team member optimization */
    .team img {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery grid enhancement */
    #gallery .col-lg-2 {
        padding: 5px;
    }
    
    /* Process steps large screen */
    .process .col-lg-2 {
        padding: 0 20px;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced spacing for ultra-wide */
    .py-5 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* Hero section ultra-wide */
    .hero-section {
        padding-top: 180px;
    }
    
    /* Card images ultra-wide */
    .card-img-top {
        height: 280px;
    }
    
    /* Services ultra-wide spacing */
    .services .col-lg-4 {
        padding: 0 25px;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 600px) {
    /* Hero section landscape mobile */
    .hero-section {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    padding-top: 100px;
}
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Section padding reduction in landscape */
    .py-5 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    /* Space page landscape */
    #space {
        min-height: 100vh;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhanced image rendering */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Sharper icons */
    .fas, .far {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Print media adjustments */
@media print {
    /* Hide interactive elements */
    .navbar,
    .breadcrumb-nav,
    footer,
    .btn,
    form {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        page-break-inside: avoid;
        border: 1pt solid #000;
        margin-bottom: 1rem;
    }
    
    /* Remove background colors for print */
    .hero-section,
    .bg-light,
    section {
        background: white;
        color: black;
    }
    
    /* Ensure text is visible */
    .text-white {
        color: black;
    }
}

/* Accessibility - Motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Remove animations and transitions */
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
    
    /* Remove parallax and floating effects */
    .hero-section::before,
    #space::before {
        animation: none;
    }
    
    /* Remove hover transforms */
    .card:hover,
    .btn-primary:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Dark mode support (future-proofing) */

/* Container queries (future CSS feature support) */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-body {
            padding: 0.75rem;
        }
        
        .card-title {
            font-size: 1rem;
        }
    }
} 