/* Responsive Design - Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.75rem;
        --font-size-h3: 1.25rem;
        --navbar-brand-size: 1.2rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: var(--navbar-brand-size) !important;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: var(--font-size-h1);
        margin-bottom: 0.75rem;
    }
    
    .hero-section h3 {
        font-size: var(--font-size-h3);
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: var(--font-size-base);
    }
    
    /* Cards and components */
    .feature-card,
    .service-card,
    .story-card,
    .info-card {
        margin-bottom: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card i {
        font-size: 2.5rem;
    }
    
    /* Contact form */
    .contact-form {
        padding: 2rem 1rem;
    }
    
    /* Feature items */
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .feature-item i {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    /* Footer adjustments */
    footer .row > div {
        margin-bottom: 2rem;
    }
    
    /* Contact info stacking */
    #contact-info-phone,
    #contact-info-email,
    #contact-info-address {
        font-size: var(--font-size-base);
        margin: 0.5rem 0;
    }
    
    /* Service card prices */
    .service-card .price {
        font-size: 1.25rem;
    }
    
    /* Blog cards */
    .blog-card img {
        height: 150px;
    }
    
    /* Breadcrumb */
    .breadcrumb-section {
        padding: 0.5rem 0;
        margin-top: 70px;
    }
    
    /* Space section */
    #space {
        margin-top: 70px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .feature-item {
        flex-direction: row;
        text-align: left;
    }
    
    .feature-item i {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .contact-form {
        padding: 2.5rem;
    }
    
    .breadcrumb-section,
    #space {
        margin-top: 72px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .feature-card {
        height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .service-card img {
        height: 180px;
    }
    
    .blog-card img {
        height: 180px;
    }
    
    .contact-form {
        padding: 2.5rem;
    }
    
    .breadcrumb-section,
    #space {
        margin-top: 74px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 95vh;
    }
    
    .feature-card {
        height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .service-card {
        transition: transform 0.3s ease;
    }
    
    .breadcrumb-section,
    #space {
        margin-top: 76px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .container {
        max-width: 1140px;
    }
    
    .feature-card {
        height: 320px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .service-card img {
        height: 220px;
    }
    
    .blog-card img {
        height: 220px;
    }
    
    .breadcrumb-section,
    #space {
        margin-top: 76px;
    }
}

/* Mobile-specific rules for Swiper (< 768px) */
@media (max-width: 767.98px) {
    /* Disable autoplay and effects on mobile */
    .swiper {
        --swiper-pagination-bullet-size: 8px;
    }
    
    .swiper-slide {
        padding: 1rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    .swiper-pagination {
        bottom: 10px !important;
    }
    
    /* Ensure touch scrolling works */
    .swiper-wrapper {
        transition-timing-function: ease-out;
    }
}

/* Tablet adjustments for Swiper */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17.5px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .swiper-pagination,
    .swiper-button-next,
    .swiper-button-prev,
    footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        background: none !important;
    }
    
    .hero-section::before {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .feature-card,
    .service-card,
    .story-card,
    .info-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #1a3009;
        --secondary-sage: #5a6352;
        --accent-earth: #5d2d0a;
        --highlight-amber: #b8955d;
        --neutral-cream: #ffffff;
    }
    
    .feature-card,
    .service-card,
    .story-card,
    .info-card,
    .contact-form {
        border: 2px solid var(--primary-green);
    }
}

/* Dark mode preference (even though we don't implement dark mode) */
@media (prefers-color-scheme: dark) {
    /* Keep the same light theme as per requirements */
    /* This ensures consistent appearance regardless of system preference */
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 60vh;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .breadcrumb-section {
        padding: 0.25rem 0;
    }
    
    section {
        padding: 1.5rem 0;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .swiper-slide {
        transition: none !important;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .story-card:hover,
    .info-card:hover,
    .btn-primary:hover,
    .feature-item:hover {
        transform: none !important;
    }
    
    .animate-fade-in {
        animation: none !important;
    }
}

/* Focus management for accessibility */
@media (max-width: 767.98px) {
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.5);
    }
    
    .btn:focus,
    .form-control:focus {
        box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.25);
    }
}

/* Grid adjustments for very small screens */
@media (max-width: 480px) {
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Horizontal scroll prevention */
@media (max-width: 767.98px) {
    body {
  overflow-x: hidden !important;
        overflow-x: hidden;
    }
    
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
} 