/* ========================================
   VoiceChef - Responsive CSS Stylesheet
   ======================================== */

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

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-decorative {
        display: none;
    }
    
    /* Typography Mobile */
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Card Spacing Mobile */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Button Mobile */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Team Grid Mobile */
    .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Gallery Mobile */
    #gallery .col-md-3 {
        margin-bottom: 1rem;
    }
    
    /* Process Steps Mobile */
    .process-step .badge {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Form Mobile */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer Mobile */
    footer .row > div {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Enhanced Footer Contrast on Mobile */
    footer {
        background-color: #000000 !important;
    }
    
    footer .text-muted {
        color: #f0f0f0 !important;
    }
    
    footer a {
        color: #e0e0e0 !important;
        font-size: 1.1rem;
        padding: 0.25rem 0;
        display: inline-block;
    }
    
    footer a:hover {
        color: #ffffff !important;
    }
    
    /* Navbar Mobile */
    .navbar-collapse {
        margin-top: 1rem;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    /* Contact Info Mobile */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* No hover effects on mobile */
    .card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    /* Cards in rows */
    .card {
        margin-bottom: 2rem;
    }
    
    /* Team grid adjustment */
    .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Process steps */
    .process-step .badge {
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 5rem 0;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    /* Feature icons tablet */
    .feature-icon, .core-icon, .timeline-icon {
        width: 70px;
        height: 70px;
    }
    
    /* Team grid tablet */
    .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
    
    /* Gallery tablet */
    #gallery .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1rem;
    }
    
    /* Process steps tablet */
    .process-step .badge {
        width: 58px;
        height: 58px;
        font-size: 1.15rem;
    }
    
    /* Cards grid adjustment */
    .services .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        padding: 6rem 0;
    }
    
    /* Feature spacing */
    .feature-icon, .core-icon, .timeline-icon {
        width: 75px;
        height: 75px;
    }
    
    /* Team spacing */
    .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    /* Gallery columns */
    #gallery .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        padding: 8rem 0;
    }
    
    .container {
        max-width: 1140px;
    }
    
    /* Full feature display */
    .feature-icon, .core-icon, .timeline-icon {
        width: 80px;
        height: 80px;
    }
    
    /* Team full display */
    .col-lg-2 {
        margin-bottom: 1rem;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section {
        padding: 10rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

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

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

/* Print styles */
@media print {
    .navbar,
    .btn,
    #gallery,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .card {
        border: 1px solid #000;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-outline-primary {
        border-color: #000;
        color: #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-decorative {
        display: none;
    }
    
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Dark mode support (future-proofing) */

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* Apple's recommended touch target */
        padding: 0.875rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Internet Explorer 11 support (legacy) */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .card {
        display: block;
    }
    
    .feature-icon, .core-icon, .timeline-icon {
        display: block;
        text-align: center;
    }
}

/* Focus management for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* Error handling for missing images */
img {
    max-width: 100%;
    height: auto;
}

img:not([src]),
img[src=""] {
    opacity: 0;
}

/* Performance optimization - will-change for animated elements */
.card,
.btn,
#gallery img {
    will-change: transform;
}

/* Remove will-change after animation completes */
.card:not(:hover),
.btn:not(:hover),
#gallery img:not(:hover) {
    will-change: auto;
} 

.hero-section h1 {
    padding-top: 100px;
}