/* ============================
   Pure Suds - Responsive CSS
   ========================== */

/* Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1, .h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    padding-top: 275px;
}
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Remove animations on mobile per requirements */
    .blob {
        display: none;
    }
    
    /* Cards */
    .card-body {
        padding: 1.25rem;
    overflow-x: hidden;
}
    
    .service-card .card-body {
        padding: 1.5rem;
    }
    
    /* Process Steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Timeline */
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-date {
        flex: none;
        margin-bottom: 1rem;
    }
    
    .timeline-content {
        margin-left: 0;
    }
    
    /* Gallery */
    .gallery-item img {
        height: 200px;
    }
    
    /* Contact */
    .contact-form {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    footer .text-end {
        text-align: start !important;
    }
    
    /* Team photos */
    .team-photo img {
        width: 100px;
        height: 100px;
    }
    
    /* Pricing cards */
    .pricing-card {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile spacing */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-cta .btn {
        display: inline-block;
        width: auto;
        margin-right: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .timeline-item {
        flex-direction: row;
        text-align: left;
    }
    
    .timeline-date {
        flex: 0 0 80px;
        margin-bottom: 0;
    }
    
    .timeline-content {
        margin-left: 1.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero adjustments */
    .hero-section {
        min-height: 80vh;
    }
    
    /* Gallery grid */
    .gallery-item img {
        height: 220px;
    }
    
    /* Services grid */
    .service-card .card-img-top {
        height: 200px;
    }
    
    /* Team spacing */
    .team-member {
        margin-bottom: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Hero section full experience */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Enable animations on larger screens */
    .blob {
        display: block;
    }
    
    /* Gallery hover effects */
    .gallery-item:hover {
        transform: scale(1.05);
    }
    
    /* Card hover effects */
    .card:hover {
        transform: translateY(-5px);
    }
    
    /* Timeline layout */
    .timeline-item {
        padding: 2rem;
    }
    
    .timeline-date {
        flex: 0 0 100px;
    }
    
    .timeline-content {
        margin-left: 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing */
    .py-5 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Larger cards */
    .service-card .card-body {
        padding: 2.5rem;
    }
    
    /* Gallery enhanced */
    .gallery-item img {
        height: 280px;
    }
}

/* XXL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Typography enhancements */
    h1, .h1 {
        font-size: 2.75rem;
    }
    
    .display-4 {
        font-size: 3.25rem;
    }
    
    /* Enhanced hero */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Larger blobs */
    .blob-1 {
        width: 400px;
        height: 400px;
    }
    
    .blob-2 {
        width: 250px;
        height: 250px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-decoration,
    .btn,
    footer {
        display: none !important;
    }
    
    .hero-section,
    section {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark);
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Reduced transparency for accessibility */
@media (prefers-reduced-transparency) {
    .blob {
        opacity: 0.05;
    }
    
    .hero-section {
        background: var(--white);
    }
}

/* Dark mode preference support */

/* Focus management for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        transform: scale(1.02);
    }
}

/* Specific adjustments for common mobile devices */

/* iPhone SE */
@media only screen and (device-width: 375px) and (device-height: 667px) {
    .hero-section {
        min-height: 90vh;
    }
}

/* iPhone 12/13/14 */
@media only screen and (device-width: 390px) and (device-height: 844px) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
}

/* iPad adjustments */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .card-img-top {
        height: 240px;
    }
    
    .service-card .card-img-top {
        height: 220px;
    }
}

/* Container adjustments for edge cases */
@media (max-width: 1199.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Flexbox fallbacks for older browsers */
@supports not (display: flex) {
    .timeline-item {
        display: block;
    }
    
    .hero-section .row {
        display: block;
    }
    
    .d-flex {
        display: block;
    }
}

/* Grid fallbacks */
@supports not (display: grid) {
    .row {
        display: block;
    }
    
    .col-lg-4,
    .col-lg-6,
    .col-md-6 {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Motion preferences fine-tuning */
@media (prefers-reduced-motion: reduce) {
    /* Disable mobile animations regardless */
    @media (max-width: 991.98px) {
        *,
        *::before,
        *::after {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* Performance optimization for mobile */
@media (max-width: 767.98px) {
    /* Reduce heavy effects on mobile */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    /* Optimize images for mobile */
    .card-img-top,
    .gallery-item img {
        image-rendering: optimizeSpeed;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover,
    .gallery-item:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.75rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
} 