/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    :root {
        --font-size-base: 0.9rem;
        --font-size-lg: 1rem;
        --font-size-xl: 1.125rem;
        --font-size-xxl: 1.25rem;
        --spacing-xl: 2rem;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .card-body {
  overflow-x: hidden;
        padding: 1rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Disable autoplay and effects on mobile as specified */
    .swiper-slide {
        transition: none !important;
    }
    
    .swiper[data-swiper-autoplay] {
        --swiper-autoplay-delay: 0;
    }
    
    /* Stack cards vertically on mobile */
    .row.g-4 > .col-md-6,
    .row.g-4 > .col-lg-4,
    .row.g-4 > .col-xl-3 {
        margin-bottom: 1rem;
    }
    
    /* Adjust hero section for mobile */
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-section .container .row {
        text-align: center;
    }
    
    .hero-section img {
        margin-top: 2rem;
        max-width: 100%;
        height: auto;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Contact info stack */
    .contact-info-item {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Gallery grid for mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Blog grid for mobile */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Pricing cards stack */
    .pricing-card.featured {
        transform: none;
        margin-bottom: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Disable autoplay on small devices */
    .swiper[data-swiper-autoplay] {
        --swiper-autoplay-delay: 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tablet-specific navbar */
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-item {
        margin: 0.25rem 0;
    }
    
    /* Process steps for tablet */
    .process-step::after {
        display: none;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    /* Enable full Swiper functionality on desktop */
    .swiper {
        --swiper-autoplay-delay: 5000;
    }
    
    /* Desktop gallery layout */
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Desktop-specific hover effects */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }
    
    /* Process steps line for desktop */
    .process-step::after {
        display: block;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .lead {
        font-size: 1.25rem;
    }
    
    .card-img-top {
        height: 250px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section {
        min-height: 100vh;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
  font-size: 10px !important;
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section::before {
        background-image: url('../PRO_images/hero-background@2x.webp');
    }
}

/* Print styles */
@media print {
    .navbar,
    .breadcrumb-container,
    footer,
    .btn,
    .form-control {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    a {
        text-decoration: underline !important;
    }
}

/* Accessibility improvements for smaller screens */
@media (max-width: 991.98px) {
    /* Ensure adequate contrast for small screens */
    .text-muted {
        color: #495057 !important;
    }
    
    /* Larger click targets for mobile */
    .navbar-toggler {
        padding: 0.5rem;
        border: none;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(45, 122, 90, 0.25);
    }
    
    /* Mobile menu improvements */
    .navbar-collapse {
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid #e9ecef;
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable Swiper autoplay and transitions */
    .swiper {
        --swiper-autoplay-delay: 0;
    }
    
    .swiper-slide,
    .swiper-wrapper {
        transition: none !important;
        transform: none !important;
    }
    
    /* Disable all hover effects */
    .card:hover,
    .btn:hover,
    .services-card:hover,
    .about-feature:hover {
        transform: none !important;
    }
    
    /* Simplify animations */
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}


/* Focus management for keyboard navigation */
@media (any-hover: none) {
    .nav-link:focus,
    .btn:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-green);
        outline-offset: 2px;
    }
}

/* Container adjustments for very small screens */
@media (max-width: 375px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section h1 {
        font-size: 1.25rem;
    }
    
    .btn-lg {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .card-body {
  overflow-x: hidden;
        padding: 0.75rem;
    }
}

/* Fix for iOS Safari bottom bar */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
} 